mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-07 07:50:27 +00:00
Merge branch 'mc-1.21.x' into mc-1.21.y
Oh, so many issues here. Most notably, NF changed the translation for config files. We should clean up these translation files, and remove the suffix from them.
This commit is contained in:
commit
205c589b56
10
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
10
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@ -6,7 +6,8 @@ body:
|
||||
id: mc-version
|
||||
attributes:
|
||||
label: Minecraft Version
|
||||
description: What version of Minecraft are you using?
|
||||
description: |
|
||||
What version of Minecraft are you using? If your version is not listed, please try to reproduce on one of the supported versions.
|
||||
options:
|
||||
- 1.20.1
|
||||
- 1.21.x
|
||||
@ -26,8 +27,5 @@ body:
|
||||
label: Details
|
||||
description: |
|
||||
Description of the bug. Please include the following:
|
||||
- Logs: These will be located in the `logs/` directory of your Minecraft
|
||||
instance. Please upload them as a gist or directly into this editor.
|
||||
- Detailed reproduction steps: sometimes I can spot a bug pretty easily,
|
||||
but often it's much more obscure. The more information I have to help
|
||||
reproduce it, the quicker it'll get fixed.
|
||||
- Logs: These will be located in the `logs/` directory of your Minecraft instance. This is always useful, even if it doesn't include errors, so please upload this!
|
||||
- Detailed reproduction steps: sometimes I can spot a bug pretty easily, but often it's much more obscure. The more information I have to help reproduce it, the quicker it'll get fixed.
|
||||
|
18
.github/workflows/main-ci.yml
vendored
18
.github/workflows/main-ci.yml
vendored
@ -30,8 +30,16 @@ jobs:
|
||||
- name: ⚒️ Build
|
||||
run: ./gradlew assemble || ./gradlew assemble
|
||||
|
||||
- name: Cache pre-commit
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
|
||||
- name: 💡 Lint
|
||||
uses: pre-commit/action@v3.0.0
|
||||
run: |
|
||||
pipx install pre-commit
|
||||
pre-commit run --show-diff-on-failure --color=always
|
||||
|
||||
- name: 🧪 Run tests
|
||||
run: ./gradlew test validateMixinNames checkChangelog
|
||||
@ -42,11 +50,6 @@ jobs:
|
||||
- name: 🧪 Run integration tests
|
||||
run: ./gradlew runGametest
|
||||
|
||||
- name: 🧪 Run client tests
|
||||
run: ./gradlew runGametestClient # Not checkClient, as no point running rendering tests.
|
||||
# These are a little flaky on GH actions: its useful to run them, but don't break the build.
|
||||
continue-on-error: true
|
||||
|
||||
- name: 🧪 Parse test reports
|
||||
run: ./tools/parse-reports.py
|
||||
if: ${{ failure() }}
|
||||
@ -63,9 +66,6 @@ jobs:
|
||||
name: CC-Tweaked
|
||||
path: ./jars
|
||||
|
||||
- name: 📤 Upload coverage
|
||||
uses: codecov/codecov-action@v4
|
||||
|
||||
build-core:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -11,14 +11,13 @@ SPDX-License-Identifier: MPL-2.0
|
||||
</picture>
|
||||
|
||||
[![Current build status](https://github.com/cc-tweaked/CC-Tweaked/workflows/Build/badge.svg)](https://github.com/cc-tweaked/CC-Tweaked/actions "Current build status")
|
||||
[![Download CC: Tweaked on CurseForge](https://img.shields.io/static/v1?label=Download&message=CC:%20Tweaked&color=E04E14&logoColor=E04E14&logo=CurseForge)][CurseForge]
|
||||
[![Download CC: Tweaked on Modrinth](https://img.shields.io/static/v1?label=Download&color=00AF5C&logoColor=00AF5C&logo=Modrinth&message=CC:%20Tweaked)][Modrinth]
|
||||
|
||||
CC: Tweaked is a mod for Minecraft which adds programmable computers, turtles and more to the game. A fork of the
|
||||
much-beloved [ComputerCraft], it continues its legacy with improved performance and stability, along with a wealth of
|
||||
new features.
|
||||
|
||||
CC: Tweaked can be installed from [CurseForge] or [Modrinth]. It runs on both [Minecraft Forge] and [Fabric].
|
||||
CC: Tweaked can be installed from [Modrinth]. It runs on both [Minecraft Forge] and [Fabric].
|
||||
|
||||
## Contributing
|
||||
Any contribution is welcome, be that using the mod, reporting bugs or contributing code. If you want to get started
|
||||
@ -82,7 +81,6 @@ We bundle the API sources with the jar, so documentation should be easily viewab
|
||||
the generated documentation [can be browsed online](https://tweaked.cc/javadoc/).
|
||||
|
||||
[computercraft]: https://github.com/dan200/ComputerCraft "ComputerCraft on GitHub"
|
||||
[curseforge]: https://minecraft.curseforge.com/projects/cc-tweaked "Download CC: Tweaked from CurseForge"
|
||||
[modrinth]: https://modrinth.com/mod/gu7yAYhd "Download CC: Tweaked from Modrinth"
|
||||
[Minecraft Forge]: https://files.minecraftforge.net/ "Download Minecraft Forge."
|
||||
[Fabric]: https://fabricmc.net/use/installer/ "Download Fabric."
|
||||
|
@ -45,7 +45,6 @@ dependencies {
|
||||
implementation(libs.kotlin.plugin)
|
||||
implementation(libs.spotless)
|
||||
|
||||
implementation(libs.curseForgeGradle)
|
||||
implementation(libs.fabric.loom)
|
||||
implementation(libs.ideaExt)
|
||||
implementation(libs.minotaur)
|
||||
|
@ -2,11 +2,9 @@
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
import net.darkhax.curseforgegradle.TaskPublishCurseForge
|
||||
import cc.tweaked.gradle.setProvider
|
||||
|
||||
plugins {
|
||||
id("net.darkhax.curseforgegradle")
|
||||
id("com.modrinth.minotaur")
|
||||
id("cc-tweaked.publishing")
|
||||
}
|
||||
@ -25,23 +23,6 @@ val isUnstable = project.properties["isUnstable"] == "true"
|
||||
val modVersion: String by extra
|
||||
val mcVersion: String by extra
|
||||
|
||||
val publishCurseForge by tasks.registering(TaskPublishCurseForge::class) {
|
||||
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
||||
description = "Upload artifacts to CurseForge"
|
||||
|
||||
apiToken = findProperty("curseForgeApiKey") ?: ""
|
||||
enabled = apiToken != ""
|
||||
|
||||
val mainFile = upload("282001", modPublishing.output)
|
||||
mainFile.changelog =
|
||||
"Release notes can be found on the [GitHub repository](https://github.com/cc-tweaked/CC-Tweaked/releases/tag/v$mcVersion-$modVersion)."
|
||||
mainFile.changelogType = "markdown"
|
||||
mainFile.releaseType = if (isUnstable) "alpha" else "release"
|
||||
mainFile.gameVersions.add(mcVersion)
|
||||
}
|
||||
|
||||
tasks.publish { dependsOn(publishCurseForge) }
|
||||
|
||||
modrinth {
|
||||
token.set(findProperty("modrinthApiKey") as String? ?: "")
|
||||
projectId.set("gu7yAYhd")
|
||||
|
@ -269,7 +269,7 @@ abstract class CCTweakedExtension(
|
||||
companion object {
|
||||
private val COMMIT_COUNTS = Pattern.compile("""^\s*[0-9]+\s+(.*)$""")
|
||||
private val IGNORED_USERS = setOf(
|
||||
"GitHub", "Daniel Ratcliffe", "Weblate",
|
||||
"GitHub", "Daniel Ratcliffe", "NotSquidDev", "Weblate",
|
||||
)
|
||||
|
||||
private fun <T> gitProvider(project: Project, default: T, supplier: () -> T): Provider<T> {
|
||||
|
@ -21,6 +21,15 @@ SPDX-License-Identifier: MPL-2.0
|
||||
<property name="file" value="${config_loc}/suppressions.xml" />
|
||||
</module>
|
||||
|
||||
<!--
|
||||
Checkstyle doesn't support @snippet (https://github.com/checkstyle/checkstyle/issues/11455),
|
||||
so suppress warnings nearby
|
||||
-->
|
||||
<module name="SuppressWithNearbyTextFilter">
|
||||
<property name="nearbyTextPattern" value="@snippet" />
|
||||
<property name="lineRange" value="20" />
|
||||
</module>
|
||||
|
||||
<module name="BeforeExecutionExclusionFileFilter">
|
||||
<property name="fileNamePattern" value="render_old"/>
|
||||
</module>
|
||||
|
@ -1,12 +1,13 @@
|
||||
# SPDX-FileCopyrightText: 2017 The CC: Tweaked Developers
|
||||
#
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
files:
|
||||
- source: projects/common/src/generated/resources/assets/computercraft/lang/en_us.json
|
||||
translation: /projects/common/src/main/resources/assets/computercraft/lang/%locale_with_underscore%.json
|
||||
languages_mapping:
|
||||
locale_with_underscore:
|
||||
cs: cs_cs # Czech
|
||||
cs: cs_cz # Czech
|
||||
da: da_dk # Danish
|
||||
de: de_de # German
|
||||
es-ES: es_es # Spanish
|
||||
@ -21,6 +22,7 @@ files:
|
||||
ru: ru_ru # Russian
|
||||
sv-SE: sv_se # Sweedish
|
||||
tok: tok # Toki Pona
|
||||
tr: tr_tr # Turkish
|
||||
uk: uk_ua # Ukraine
|
||||
vi: vi_vn # Vietnamese
|
||||
zh-CN: zh_cn # Chinese Simplified
|
||||
|
@ -8,7 +8,7 @@ SPDX-FileCopyrightText: 2021 The CC: Tweaked Developers
|
||||
SPDX-License-Identifier: MPL-2.0
|
||||
-->
|
||||
|
||||
The [`event!redstone`] event is fired whenever any redstone inputs on the computer change.
|
||||
The [`event!redstone`] event is fired whenever any redstone inputs on the computer or [relay][`redstone_relay`] change.
|
||||
|
||||
## Return values
|
||||
1. [`string`]: The event name.
|
||||
@ -21,3 +21,7 @@ while true do
|
||||
print("A redstone input has changed!")
|
||||
end
|
||||
```
|
||||
|
||||
## See also
|
||||
- [The `redstone` API on computers][`module!redstone`]
|
||||
- [The `redstone_relay` peripheral][`redstone_relay`]
|
||||
|
@ -16,7 +16,7 @@ CC: Tweaked is a mod for Minecraft which adds programmable computers, turtles an
|
||||
much-beloved [ComputerCraft], it continues its legacy with improved performance and stability, along with a wealth of
|
||||
new features.
|
||||
|
||||
CC: Tweaked can be installed from [CurseForge] or [Modrinth]. It runs on both [Minecraft Forge] and [Fabric].
|
||||
CC: Tweaked can be installed from [Modrinth]. It runs on both [Minecraft Forge] and [Fabric].
|
||||
|
||||
## Features
|
||||
Controlled using the [Lua programming language][lua], CC: Tweaked's computers provides all the tools you need to start
|
||||
@ -62,7 +62,6 @@ CC: Tweaked lives on [GitHub]. If you've got any ideas, feedback or bugs please
|
||||
[github]: https://github.com/cc-tweaked/CC-Tweaked/ "CC: Tweaked on GitHub"
|
||||
[bug]: https://github.com/cc-tweaked/CC-Tweaked/issues/new/choose
|
||||
[computercraft]: https://github.com/dan200/ComputerCraft "ComputerCraft on GitHub"
|
||||
[curseforge]: https://minecraft.curseforge.com/projects/cc-tweaked "Download CC: Tweaked from CurseForge"
|
||||
[modrinth]: https://modrinth.com/mod/gu7yAYhd "Download CC: Tweaked from Modrinth"
|
||||
[forge]: https://files.minecraftforge.net/ "Download Minecraft Forge."
|
||||
[Minecraft Forge]: https://files.minecraftforge.net/ "Download Minecraft Forge."
|
||||
|
@ -81,7 +81,7 @@ compatibility for these newer versions.
|
||||
| `string.dump` strip argument | ✔ | |
|
||||
| `string.pack`/`string.unpack`/`string.packsize` | ✔ | |
|
||||
| `table.move` | ✔ | |
|
||||
| `math.atan2` -> `math.atan` | ❌ | |
|
||||
| `math.atan2` -> `math.atan` | 🔶 | `math.atan` supports its two argument form. |
|
||||
| Removed `math.frexp`, `math.ldexp`, `math.pow`, `math.cosh`, `math.sinh`, `math.tanh` | ❌ | |
|
||||
| `math.maxinteger`/`math.mininteger` | ❌ | |
|
||||
| `math.tointeger` | ❌ | |
|
||||
|
@ -12,7 +12,7 @@ neogradle.subsystems.conventions.runs.enabled=false
|
||||
|
||||
# Mod properties
|
||||
isUnstable=true
|
||||
modVersion=1.113.1
|
||||
modVersion=1.114.2
|
||||
|
||||
# Minecraft properties: We want to configure this here so we can read it in settings.gradle
|
||||
mcVersion=1.21.3
|
||||
|
@ -7,14 +7,14 @@
|
||||
# Minecraft
|
||||
# MC version is specified in gradle.properties, as we need that in settings.gradle.
|
||||
# Remember to update corresponding versions in fabric.mod.json/neoforge.mods.toml
|
||||
fabric-api = "0.106.1+1.21.3"
|
||||
fabric-loader = "0.16.7"
|
||||
neoForge = "21.3.0-beta"
|
||||
fabric-api = "0.109.0+1.21.3"
|
||||
fabric-loader = "0.16.9"
|
||||
neoForge = "21.3.38-beta"
|
||||
neoForgeSpi = "8.0.1"
|
||||
mixin = "0.8.5"
|
||||
parchment = "2024.07.28"
|
||||
parchmentMc = "1.21"
|
||||
yarn = "1.21.3+build.1"
|
||||
yarn = "1.21.3+build.2"
|
||||
|
||||
# Core dependencies (these versions are tied to the version Minecraft uses)
|
||||
fastutil = "8.5.12"
|
||||
@ -26,7 +26,7 @@ slf4j = "2.0.9"
|
||||
asm = "9.6"
|
||||
autoService = "1.1.1"
|
||||
checkerFramework = "3.42.0"
|
||||
cobalt = { strictly = "0.9.3" }
|
||||
cobalt = { strictly = "0.9.5" }
|
||||
commonsCli = "1.6.0"
|
||||
jetbrainsAnnotations = "24.1.0"
|
||||
jsr305 = "3.0.2"
|
||||
@ -57,19 +57,18 @@ junit = "5.10.1"
|
||||
jmh = "1.37"
|
||||
|
||||
# Build tools
|
||||
cctJavadoc = "1.8.2"
|
||||
checkstyle = "10.14.1"
|
||||
curseForgeGradle = "1.1.18"
|
||||
cctJavadoc = "1.8.3"
|
||||
checkstyle = "10.20.1"
|
||||
errorProne-core = "2.27.0"
|
||||
errorProne-plugin = "3.1.0"
|
||||
fabric-loom = "1.8.10"
|
||||
githubRelease = "2.5.2"
|
||||
gradleVersions = "0.50.0"
|
||||
ideaExt = "1.1.7"
|
||||
illuaminate = "0.1.0-73-g43ee16c"
|
||||
illuaminate = "0.1.0-74-gf1551d5"
|
||||
lwjgl = "3.3.3"
|
||||
minotaur = "2.8.7"
|
||||
neoGradle = "7.0.165"
|
||||
neoGradle = "7.0.170"
|
||||
nullAway = "0.10.25"
|
||||
shadow = "8.3.1"
|
||||
spotless = "6.23.3"
|
||||
@ -146,7 +145,6 @@ lwjgl-glfw = { module = "org.lwjgl:lwjgl-glfw" }
|
||||
# Build tools
|
||||
cctJavadoc = { module = "cc.tweaked:cct-javadoc", version.ref = "cctJavadoc" }
|
||||
checkstyle = { module = "com.puppycrawl.tools:checkstyle", version.ref = "checkstyle" }
|
||||
curseForgeGradle = { module = "net.darkhax.curseforgegradle:CurseForgeGradle", version.ref = "curseForgeGradle" }
|
||||
errorProne-annotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "errorProne-core" }
|
||||
errorProne-api = { module = "com.google.errorprone:error_prone_check_api", version.ref = "errorProne-core" }
|
||||
errorProne-core = { module = "com.google.errorprone:error_prone_core", version.ref = "errorProne-core" }
|
||||
|
1277
package-lock.json
generated
1277
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -13,10 +13,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-node-resolve": "^15.2.1",
|
||||
"@rollup/plugin-typescript": "^11.0.0",
|
||||
"@rollup/plugin-typescript": "^12.0.0",
|
||||
"@rollup/plugin-url": "^8.0.1",
|
||||
"@swc/core": "^1.3.92",
|
||||
"@types/node": "^20.8.3",
|
||||
"@types/node": "^22.0.0",
|
||||
"lightningcss": "^1.22.0",
|
||||
"preact-render-to-string": "^6.2.1",
|
||||
"rehype": "^13.0.0",
|
||||
|
@ -8,6 +8,8 @@ plugins {
|
||||
id("cc-tweaked.vanilla")
|
||||
}
|
||||
|
||||
val mcVersion: String by extra
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
}
|
||||
@ -17,8 +19,36 @@ dependencies {
|
||||
}
|
||||
|
||||
tasks.javadoc {
|
||||
title = "CC: Tweaked $version Minecraft $mcVersion"
|
||||
include("dan200/computercraft/api/**/*.java")
|
||||
|
||||
options {
|
||||
(this as StandardJavadocDocletOptions)
|
||||
|
||||
groups = mapOf(
|
||||
"Common" to listOf(
|
||||
"dan200.computercraft.api",
|
||||
"dan200.computercraft.api.lua",
|
||||
"dan200.computercraft.api.peripheral",
|
||||
),
|
||||
"Upgrades" to listOf(
|
||||
"dan200.computercraft.api.client.turtle",
|
||||
"dan200.computercraft.api.pocket",
|
||||
"dan200.computercraft.api.turtle",
|
||||
"dan200.computercraft.api.upgrades",
|
||||
),
|
||||
)
|
||||
|
||||
addBooleanOption("-allow-script-in-comments", true)
|
||||
bottom(
|
||||
"""
|
||||
<script src="https://cdn.jsdelivr.net/npm/prismjs@v1.29.0/components/prism-core.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/prismjs@v1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
|
||||
<link href=" https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism.min.css " rel="stylesheet">
|
||||
""".trimIndent(),
|
||||
)
|
||||
}
|
||||
|
||||
// Include the core-api in our javadoc export. This is wrong, but it means we can export a single javadoc dump.
|
||||
source(project(":core-api").sourceSets.main.map { it.allJava })
|
||||
|
||||
|
@ -173,14 +173,14 @@ public final class ComputerCraftAPI {
|
||||
* This may be used with {@link IComputerSystem#getComponent(ComputerComponent)} to only attach APIs to specific
|
||||
* computers. For example, one can add an additional API just to turtles with the following code:
|
||||
*
|
||||
* <pre>{@code
|
||||
* {@snippet lang="java":
|
||||
* ComputerCraftAPI.registerAPIFactory(computer -> {
|
||||
* // Read the turtle component.
|
||||
* var turtle = computer.getComponent(ComputerComponents.TURTLE);
|
||||
* // If present then add our API.
|
||||
* return turtle == null ? null : new MyCustomTurtleApi(turtle);
|
||||
* });
|
||||
* }</pre>
|
||||
* }
|
||||
*
|
||||
* @param factory The factory for your API subclass.
|
||||
* @see ILuaAPIFactory
|
||||
|
@ -14,7 +14,7 @@ import dan200.computercraft.api.ComputerCraftAPI;
|
||||
* as a proxy for all network objects. Whilst the node may change networks, an element's node should remain constant
|
||||
* for its lifespan.
|
||||
* <p>
|
||||
* Elements are generally tied to a block or tile entity in world. In such as case, one should provide the
|
||||
* Elements are generally tied to a block or block entity in world. In such as case, one should provide the
|
||||
* {@link WiredElement} capability for the appropriate sides.
|
||||
*/
|
||||
public interface WiredElement extends WiredSender {
|
||||
|
@ -63,6 +63,9 @@ public final class ClientHooks {
|
||||
public static void onWorldUnload() {
|
||||
MonitorRenderState.destroyAll();
|
||||
SpeakerManager.reset();
|
||||
}
|
||||
|
||||
public static void onDisconnect() {
|
||||
ClientPocketComputers.reset();
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ public class MonitorBlockEntityRenderer implements BlockEntityRenderer<MonitorBl
|
||||
var size = DirectFixedWidthFontRenderer.getVertexCount(terminal);
|
||||
|
||||
// In an ideal world we could upload these both into one buffer. However, we can't render VBOs with
|
||||
// and starting and ending offset, and so need to use two buffers instead.
|
||||
// a starting and ending offset, and so need to use two buffers instead.
|
||||
|
||||
renderToBuffer(backgroundBuffer, size, sink ->
|
||||
DirectFixedWidthFontRenderer.drawTerminalBackground(sink, 0, 0, terminal, yMargin, yMargin, xMargin, xMargin));
|
||||
@ -168,10 +168,10 @@ public class MonitorBlockEntityRenderer implements BlockEntityRenderer<MonitorBl
|
||||
foregroundBuffer.bind();
|
||||
drawWithShader(
|
||||
foregroundBuffer, modelView, RenderSystem.getProjectionMatrix(), RenderSystem.getShader(),
|
||||
// As mentioned in the above comment, render the extra cursor quad if it is visible this frame.
|
||||
FixedWidthFontRenderer.isCursorVisible(terminal) && FrameInfo.getGlobalCursorBlink()
|
||||
? foregroundBuffer.indexCount
|
||||
: foregroundBuffer.indexCount - FixedWidthFontRenderer.TERMINAL_TEXT.mode().indexCount(4)
|
||||
// Skip the cursor quad if it is not visible this frame.
|
||||
FixedWidthFontRenderer.isCursorVisible(terminal) && !FrameInfo.getGlobalCursorBlink()
|
||||
? foregroundBuffer.indexCount - FixedWidthFontRenderer.TERMINAL_TEXT.mode().indexCount(4)
|
||||
: foregroundBuffer.indexCount
|
||||
);
|
||||
|
||||
// Clear state
|
||||
|
8
projects/common/src/generated/resources/assets/computercraft/blockstates/redstone_relay.json
generated
Normal file
8
projects/common/src/generated/resources/assets/computercraft/blockstates/redstone_relay.json
generated
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east": {"model": "computercraft:block/redstone_relay", "y": 90},
|
||||
"facing=north": {"model": "computercraft:block/redstone_relay", "y": 0},
|
||||
"facing=south": {"model": "computercraft:block/redstone_relay", "y": 180},
|
||||
"facing=west": {"model": "computercraft:block/redstone_relay", "y": 270}
|
||||
}
|
||||
}
|
@ -17,6 +17,7 @@
|
||||
"block.computercraft.monitor_advanced": "Advanced Monitor",
|
||||
"block.computercraft.monitor_normal": "Monitor",
|
||||
"block.computercraft.printer": "Printer",
|
||||
"block.computercraft.redstone_relay": "Redstone Relay",
|
||||
"block.computercraft.speaker": "Speaker",
|
||||
"block.computercraft.turtle_advanced": "Advanced Turtle",
|
||||
"block.computercraft.turtle_advanced.upgraded": "Advanced %s Turtle",
|
||||
@ -38,8 +39,6 @@
|
||||
"commands.computercraft.generic.additional_rows": "%d additional rows…",
|
||||
"commands.computercraft.generic.exception": "Unhandled exception (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<no pos>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "Y",
|
||||
"commands.computercraft.help.desc": "Displays this help message",
|
||||
"commands.computercraft.help.no_children": "%s has no sub-commands",
|
||||
|
9
projects/common/src/generated/resources/assets/computercraft/models/block/redstone_relay.json
generated
Normal file
9
projects/common/src/generated/resources/assets/computercraft/models/block/redstone_relay.json
generated
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"parent": "minecraft:block/orientable_with_bottom",
|
||||
"textures": {
|
||||
"bottom": "computercraft:block/redstone_relay_bottom",
|
||||
"front": "computercraft:block/redstone_relay_front",
|
||||
"side": "computercraft:block/redstone_relay_side",
|
||||
"top": "computercraft:block/redstone_relay_top"
|
||||
}
|
||||
}
|
1
projects/common/src/generated/resources/assets/computercraft/models/item/redstone_relay.json
generated
Normal file
1
projects/common/src/generated/resources/assets/computercraft/models/item/redstone_relay.json
generated
Normal file
@ -0,0 +1 @@
|
||||
{"parent": "computercraft:block/redstone_relay"}
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"parent": "minecraft:recipes/root",
|
||||
"criteria": {
|
||||
"has_cable": {
|
||||
"conditions": {"items": [{"items": "computercraft:wired_modem"}]},
|
||||
"trigger": "minecraft:inventory_changed"
|
||||
},
|
||||
"has_the_recipe": {
|
||||
"conditions": {"recipe": "computercraft:redstone_relay"},
|
||||
"trigger": "minecraft:recipe_unlocked"
|
||||
}
|
||||
},
|
||||
"requirements": [["has_the_recipe", "has_cable"]],
|
||||
"rewards": {"recipes": ["computercraft:redstone_relay"]}
|
||||
}
|
12
projects/common/src/generated/resources/data/computercraft/loot_table/blocks/redstone_relay.json
generated
Normal file
12
projects/common/src/generated/resources/data/computercraft/loot_table/blocks/redstone_relay.json
generated
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [{"condition": "minecraft:survives_explosion"}],
|
||||
"entries": [{"type": "minecraft:item", "name": "computercraft:redstone_relay"}],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "computercraft:blocks/redstone_relay"
|
||||
}
|
7
projects/common/src/generated/resources/data/computercraft/recipe/redstone_relay.json
generated
Normal file
7
projects/common/src/generated/resources/data/computercraft/recipe/redstone_relay.json
generated
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "redstone",
|
||||
"key": {"C": "computercraft:wired_modem", "R": "#c:dusts/redstone", "S": "minecraft:stone"},
|
||||
"pattern": ["SRS", "RCR", "SRS"],
|
||||
"result": {"count": 1, "id": "computercraft:redstone_relay"}
|
||||
}
|
1
projects/common/src/generated/resources/data/minecraft/tags/block/mineable/axe.json
generated
Normal file
1
projects/common/src/generated/resources/data/minecraft/tags/block/mineable/axe.json
generated
Normal file
@ -0,0 +1 @@
|
||||
{"values": ["computercraft:lectern"]}
|
@ -12,6 +12,7 @@
|
||||
"computercraft:wireless_modem_normal",
|
||||
"computercraft:wireless_modem_advanced",
|
||||
"computercraft:wired_modem_full",
|
||||
"computercraft:cable"
|
||||
"computercraft:cable",
|
||||
"computercraft:redstone_relay"
|
||||
]
|
||||
}
|
||||
|
@ -97,6 +97,8 @@ class BlockModelProvider {
|
||||
|
||||
registerCable(generators);
|
||||
|
||||
registerRedstoneControl(generators);
|
||||
|
||||
registerTurtleUpgrade(generators, "block/turtle_crafting_table", "block/turtle_crafty_face");
|
||||
registerTurtleUpgrade(generators, "block/turtle_speaker", "block/turtle_speaker_face");
|
||||
registerTurtleModem(generators, "block/turtle_modem_normal", "block/wireless_modem_normal_face");
|
||||
@ -355,6 +357,18 @@ class BlockModelProvider {
|
||||
generators.blockStateOutput.accept(generator);
|
||||
}
|
||||
|
||||
private static void registerRedstoneControl(BlockModelGenerators generators) {
|
||||
var redstoneControl = ModRegistry.Blocks.REDSTONE_RELAY.get();
|
||||
var model = ModelTemplates.CUBE_ORIENTABLE_TOP_BOTTOM.create(
|
||||
redstoneControl, TextureMapping.orientableCube(redstoneControl), generators.modelOutput
|
||||
);
|
||||
generators.blockStateOutput.accept(
|
||||
MultiVariantGenerator.multiVariant(redstoneControl, Variant.variant().with(VariantProperties.MODEL, model))
|
||||
.with(createHorizontalFacingDispatch())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
private static final BooleanProperty[] CABLE_DIRECTIONS = { CableBlock.DOWN, CableBlock.UP, CableBlock.NORTH, CableBlock.SOUTH, CableBlock.WEST, CableBlock.EAST };
|
||||
private static final boolean[] BOOLEANS = new boolean[]{ false, true };
|
||||
|
||||
|
@ -82,6 +82,7 @@ public final class LanguageProvider implements DataProvider {
|
||||
add(ModRegistry.Items.WIRED_MODEM.get(), "Wired Modem");
|
||||
add(ModRegistry.Items.CABLE.get(), "Networking Cable");
|
||||
add(ModRegistry.Items.WIRED_MODEM_FULL.get(), "Wired Modem");
|
||||
add(ModRegistry.Items.REDSTONE_RELAY.get(), "Redstone Relay");
|
||||
|
||||
add(ModRegistry.Items.TURTLE_NORMAL.get(), "Turtle");
|
||||
add(ModRegistry.Blocks.TURTLE_NORMAL.get().getDescriptionId() + ".upgraded", "%s Turtle");
|
||||
@ -164,8 +165,6 @@ public final class LanguageProvider implements DataProvider {
|
||||
add("commands.computercraft.queue.synopsis", "Send a computer_command event to a command computer");
|
||||
add("commands.computercraft.queue.desc", "Send a computer_command event to a command computer, passing through the additional arguments. This is mostly designed for map makers, acting as a more computer-friendly version of /trigger. Any player can run the command, which would most likely be done through a text component's click event.");
|
||||
|
||||
add("commands.computercraft.generic.no_position", "<no pos>");
|
||||
add("commands.computercraft.generic.position", "%s, %s, %s");
|
||||
add("commands.computercraft.generic.yes", "Y");
|
||||
add("commands.computercraft.generic.no", "N");
|
||||
add("commands.computercraft.generic.exception", "Unhandled exception (%s)");
|
||||
|
@ -50,6 +50,7 @@ class LootTableProvider {
|
||||
selfDrop(add, ModRegistry.Blocks.WIRED_MODEM_FULL);
|
||||
selfDrop(add, ModRegistry.Blocks.WIRELESS_MODEM_NORMAL);
|
||||
selfDrop(add, ModRegistry.Blocks.WIRELESS_MODEM_ADVANCED);
|
||||
selfDrop(add, ModRegistry.Blocks.REDSTONE_RELAY);
|
||||
|
||||
computerDrop(add, ModRegistry.Blocks.COMPUTER_NORMAL);
|
||||
computerDrop(add, ModRegistry.Blocks.COMPUTER_ADVANCED);
|
||||
|
@ -425,6 +425,16 @@ final class RecipeProvider extends net.minecraft.data.recipes.RecipeProvider {
|
||||
.unlockedBy("has_printer", has(ModRegistry.Items.PRINTER.get()))
|
||||
.build(x -> new PrintoutRecipe(x, pages, 1))
|
||||
.save(output);
|
||||
|
||||
shaped(RecipeCategory.REDSTONE, ModRegistry.Blocks.REDSTONE_RELAY.get())
|
||||
.pattern("SRS")
|
||||
.pattern("RCR")
|
||||
.pattern("SRS")
|
||||
.define('S', Items.STONE)
|
||||
.define('R', ingredients.redstone())
|
||||
.define('C', ModRegistry.Blocks.CABLE.get())
|
||||
.unlockedBy("has_cable", has(ModRegistry.Blocks.CABLE.get()))
|
||||
.save(output);
|
||||
}
|
||||
|
||||
private static Criterion<InventoryChangeTrigger.TriggerInstance> has(ItemLike... items) {
|
||||
|
@ -79,9 +79,12 @@ class TagProvider {
|
||||
ModRegistry.Blocks.WIRELESS_MODEM_NORMAL.get(),
|
||||
ModRegistry.Blocks.WIRELESS_MODEM_ADVANCED.get(),
|
||||
ModRegistry.Blocks.WIRED_MODEM_FULL.get(),
|
||||
ModRegistry.Blocks.CABLE.get()
|
||||
ModRegistry.Blocks.CABLE.get(),
|
||||
ModRegistry.Blocks.REDSTONE_RELAY.get()
|
||||
);
|
||||
|
||||
tags.tag(BlockTags.MINEABLE_WITH_AXE).add(ModRegistry.Blocks.LECTERN.get());
|
||||
|
||||
tags.tag(BlockTags.WITHER_IMMUNE).add(ModRegistry.Blocks.COMPUTER_COMMAND.get());
|
||||
|
||||
tags.tag(ExternalModTags.Blocks.CREATE_BRITTLE).add(
|
||||
|
@ -0,0 +1,51 @@
|
||||
// SPDX-FileCopyrightText: 2024 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.mixin;
|
||||
|
||||
import com.llamalad7.mixinextras.sugar.Local;
|
||||
import com.mojang.datafixers.DataFixUtils;
|
||||
import com.mojang.datafixers.DataFixerBuilder;
|
||||
import com.mojang.datafixers.schemas.Schema;
|
||||
import dan200.computercraft.shared.datafix.TurtleUpgradeComponentizationFix;
|
||||
import net.minecraft.util.datafix.DataFixers;
|
||||
import net.minecraft.util.datafix.fixes.ItemStackComponentizationFix;
|
||||
import net.minecraft.util.datafix.schemas.V3818_5;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||
|
||||
@Mixin(DataFixers.class)
|
||||
abstract class DataFixersMixin {
|
||||
/**
|
||||
* Register {@link TurtleUpgradeComponentizationFix} alongside {@link ItemStackComponentizationFix}.
|
||||
* <p>
|
||||
* We use a {@link ModifyArg} to capture the schema passed to {@link ItemStackComponentizationFix}. This is a
|
||||
* little gross, but is the easiest way to obtain the schema without hard-coding local ordinals.
|
||||
*
|
||||
* @param schema The {@link V3818_5} schema.
|
||||
* @param builder The current datafixer builder
|
||||
* @return The input schema.
|
||||
*/
|
||||
@ModifyArg(
|
||||
method = "addFixers",
|
||||
at = @At(value = "INVOKE", target = "Lnet/minecraft/util/datafix/fixes/ItemStackComponentizationFix;<init>(Lcom/mojang/datafixers/schemas/Schema;)V"),
|
||||
index = 0,
|
||||
allow = 1
|
||||
)
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private static Schema addComponentizationFixes(Schema schema, @Local DataFixerBuilder builder) {
|
||||
assertSchemaVersion(schema, DataFixUtils.makeKey(3818, 5));
|
||||
builder.addFixer(new TurtleUpgradeComponentizationFix(schema));
|
||||
return schema;
|
||||
}
|
||||
|
||||
@Unique
|
||||
private static void assertSchemaVersion(Schema schema, int version) {
|
||||
if (schema.getVersionKey() != version) {
|
||||
throw new IllegalStateException("Unexpected schema version. Expected " + version + ", got " + schema.getVersionKey());
|
||||
}
|
||||
}
|
||||
}
|
@ -4,14 +4,11 @@
|
||||
|
||||
package dan200.computercraft.mixin;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
||||
import com.mojang.datafixers.DataFix;
|
||||
import com.mojang.datafixers.TypeRewriteRule;
|
||||
import com.mojang.datafixers.schemas.Schema;
|
||||
import com.mojang.serialization.Dynamic;
|
||||
import dan200.computercraft.shared.util.ComponentizationFixers;
|
||||
import dan200.computercraft.shared.datafix.ComponentizationFixers;
|
||||
import net.minecraft.util.datafix.fixes.ItemStackComponentizationFix;
|
||||
import net.minecraft.util.datafix.fixes.References;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
@ -35,15 +32,4 @@ abstract class ItemStackComponentizationFixMixin extends DataFix {
|
||||
private static void fixItemStack(ItemStackComponentizationFix.ItemStackData data, Dynamic<?> ops, CallbackInfo ci) {
|
||||
ComponentizationFixers.fixItemComponents(data, ops);
|
||||
}
|
||||
|
||||
@ModifyReturnValue(method = "makeRule", at = @At("RETURN"), remap = false)
|
||||
@SuppressWarnings("UnusedMethod")
|
||||
private TypeRewriteRule wrapMakeRule(TypeRewriteRule existing) {
|
||||
return TypeRewriteRule.seq(existing, fixTypeEverywhereTyped(
|
||||
"Turtle upgrade componentization",
|
||||
getInputSchema().getType(References.BLOCK_ENTITY),
|
||||
getOutputSchema().getType(References.BLOCK_ENTITY),
|
||||
ComponentizationFixers.makeBlockEntityRewrites(getInputSchema(), getOutputSchema())
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ package dan200.computercraft.mixin;
|
||||
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
||||
import com.mojang.datafixers.schemas.Schema;
|
||||
import com.mojang.datafixers.types.templates.TypeTemplate;
|
||||
import dan200.computercraft.shared.util.ComponentizationFixers;
|
||||
import dan200.computercraft.shared.datafix.ComponentizationFixers;
|
||||
import net.minecraft.util.datafix.schemas.V3818_3;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@ -62,6 +62,8 @@ import dan200.computercraft.shared.peripheral.monitor.MonitorBlockEntity;
|
||||
import dan200.computercraft.shared.peripheral.printer.PrinterBlock;
|
||||
import dan200.computercraft.shared.peripheral.printer.PrinterBlockEntity;
|
||||
import dan200.computercraft.shared.peripheral.printer.PrinterMenu;
|
||||
import dan200.computercraft.shared.peripheral.redstone.RedstoneRelayBlock;
|
||||
import dan200.computercraft.shared.peripheral.redstone.RedstoneRelayBlockEntity;
|
||||
import dan200.computercraft.shared.peripheral.speaker.SpeakerBlock;
|
||||
import dan200.computercraft.shared.peripheral.speaker.SpeakerBlockEntity;
|
||||
import dan200.computercraft.shared.platform.PlatformHelper;
|
||||
@ -150,7 +152,7 @@ public final class ModRegistry {
|
||||
return BlockBehaviour.Properties.of().strength(2);
|
||||
}
|
||||
|
||||
private static BlockBehaviour.Properties computerProperties() {
|
||||
private static BlockBehaviour.Properties redstoneConductor() {
|
||||
// Computers shouldn't conduct redstone through them, so set isRedstoneConductor to false. This still allows
|
||||
// redstone to connect to computers though as it's a signal source.
|
||||
return properties().isRedstoneConductor((block, level, blockPos) -> false);
|
||||
@ -165,11 +167,11 @@ public final class ModRegistry {
|
||||
}
|
||||
|
||||
public static final RegistryEntry<ComputerBlock<ComputerBlockEntity>> COMPUTER_NORMAL = register("computer_normal",
|
||||
p -> new ComputerBlock<>(p, BlockEntities.COMPUTER_NORMAL), computerProperties().mapColor(MapColor.STONE));
|
||||
p -> new ComputerBlock<>(p, BlockEntities.COMPUTER_NORMAL), redstoneConductor().mapColor(MapColor.STONE));
|
||||
public static final RegistryEntry<ComputerBlock<ComputerBlockEntity>> COMPUTER_ADVANCED = register("computer_advanced",
|
||||
p -> new ComputerBlock<>(p, BlockEntities.COMPUTER_ADVANCED), computerProperties().mapColor(MapColor.GOLD));
|
||||
p -> new ComputerBlock<>(p, BlockEntities.COMPUTER_ADVANCED), redstoneConductor().mapColor(MapColor.GOLD));
|
||||
public static final RegistryEntry<ComputerBlock<ComputerBlockEntity>> COMPUTER_COMMAND = register("computer_command",
|
||||
p -> new CommandComputerBlock<>(p, BlockEntities.COMPUTER_COMMAND), computerProperties().strength(-1, 6000000.0F));
|
||||
p -> new CommandComputerBlock<>(p, BlockEntities.COMPUTER_COMMAND), redstoneConductor().strength(-1, 6000000.0F));
|
||||
|
||||
public static final RegistryEntry<TurtleBlock> TURTLE_NORMAL = register("turtle_normal",
|
||||
p -> new TurtleBlock(p, BlockEntities.TURTLE_NORMAL), turtleProperties().mapColor(MapColor.STONE));
|
||||
@ -198,6 +200,9 @@ public final class ModRegistry {
|
||||
BlockBehaviour.Properties.ofFullCopy(net.minecraft.world.level.block.Blocks.LECTERN)
|
||||
.overrideDescription(net.minecraft.world.level.block.Blocks.LECTERN.getDescriptionId())
|
||||
);
|
||||
|
||||
public static final RegistryEntry<RedstoneRelayBlock> REDSTONE_RELAY = register("redstone_relay", RedstoneRelayBlock::new,
|
||||
redstoneConductor().mapColor(MapColor.STONE));
|
||||
}
|
||||
|
||||
public static class BlockEntities {
|
||||
@ -241,6 +246,8 @@ public final class ModRegistry {
|
||||
ofBlock(Blocks.WIRELESS_MODEM_ADVANCED, (p, s) -> new WirelessModemBlockEntity(BlockEntities.WIRELESS_MODEM_ADVANCED.get(), p, s, true));
|
||||
|
||||
public static final RegistryEntry<BlockEntityType<CustomLecternBlockEntity>> LECTERN = ofBlock(Blocks.LECTERN, CustomLecternBlockEntity::new);
|
||||
|
||||
public static final RegistryEntry<BlockEntityType<RedstoneRelayBlockEntity>> REDSTONE_RELAY = ofBlock(Blocks.REDSTONE_RELAY, RedstoneRelayBlockEntity::new);
|
||||
}
|
||||
|
||||
public static final class Items {
|
||||
@ -298,6 +305,7 @@ public final class ModRegistry {
|
||||
public static final RegistryEntry<BlockItem> WIRELESS_MODEM_NORMAL = ofBlock(Blocks.WIRELESS_MODEM_NORMAL, BlockItem::new);
|
||||
public static final RegistryEntry<BlockItem> WIRELESS_MODEM_ADVANCED = ofBlock(Blocks.WIRELESS_MODEM_ADVANCED, BlockItem::new);
|
||||
public static final RegistryEntry<BlockItem> WIRED_MODEM_FULL = ofBlock(Blocks.WIRED_MODEM_FULL, BlockItem::new);
|
||||
public static final RegistryEntry<BlockItem> REDSTONE_RELAY = ofBlock(Blocks.REDSTONE_RELAY, BlockItem::new);
|
||||
|
||||
public static final RegistryEntry<CableBlockItem.Cable> CABLE = register("cable",
|
||||
p -> new CableBlockItem.Cable(Blocks.CABLE.get(), p), properties().useBlockDescriptionPrefix());
|
||||
@ -560,6 +568,7 @@ public final class ModRegistry {
|
||||
out.accept(Items.CABLE.get());
|
||||
out.accept(Items.WIRED_MODEM.get());
|
||||
out.accept(Items.WIRED_MODEM_FULL.get());
|
||||
out.accept(Items.REDSTONE_RELAY.get());
|
||||
|
||||
out.accept(Items.MONITOR_NORMAL.get());
|
||||
out.accept(Items.MONITOR_ADVANCED.get());
|
||||
|
@ -39,9 +39,8 @@ public final class ChatHelpers {
|
||||
return component;
|
||||
}
|
||||
|
||||
public static MutableComponent position(@Nullable BlockPos pos) {
|
||||
if (pos == null) return Component.translatable("commands.computercraft.generic.no_position");
|
||||
return Component.translatable("commands.computercraft.generic.position", pos.getX(), pos.getY(), pos.getZ());
|
||||
public static MutableComponent position(BlockPos pos) {
|
||||
return Component.literal(pos.toShortString());
|
||||
}
|
||||
|
||||
public static MutableComponent bool(boolean value) {
|
||||
|
@ -256,7 +256,7 @@ public class CommandAPI implements ILuaAPI {
|
||||
* Get some basic information about a block.
|
||||
* <p>
|
||||
* The returned table contains the current name, metadata and block state (as
|
||||
* with [`turtle.inspect`]). If there is a tile entity for that block, its NBT
|
||||
* with [`turtle.inspect`]). If there is a block entity for that block, its NBT
|
||||
* will also be returned.
|
||||
*
|
||||
* @param x The x position of the block to query.
|
||||
|
@ -131,17 +131,11 @@ public abstract class AbstractComputerBlock<T extends AbstractComputerBlockEntit
|
||||
return super.useWithoutItem(state, level, pos, player, hit);
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
protected final void neighborChanged(BlockState state, Level world, BlockPos pos, Block neighbourBlock, BlockPos neighbourPos, boolean isMoving) {
|
||||
// TODO: Add back
|
||||
var be = world.getBlockEntity(pos);
|
||||
if (be instanceof AbstractComputerBlockEntity computer) computer.neighborChanged(neighbourPos);
|
||||
}*/
|
||||
|
||||
@Override
|
||||
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @org.jetbrains.annotations.Nullable Orientation orientation, boolean bl) {
|
||||
super.neighborChanged(blockState, level, blockPos, block, orientation, bl);
|
||||
protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, Block block, @Nullable Orientation orientation, boolean bl) {
|
||||
if (level.getBlockEntity(blockPos) instanceof AbstractComputerBlockEntity computer) {
|
||||
// TODO: computer.neighborChanged(neighbourPos);
|
||||
}
|
||||
}
|
||||
|
||||
@ForgeOverride
|
||||
|
@ -128,7 +128,7 @@ public abstract class AbstractComputerBlockEntity extends BlockEntity implements
|
||||
// Update the block state if needed.
|
||||
updateBlockState(computer.getState());
|
||||
|
||||
var changes = computer.pollAndResetChanges();
|
||||
var changes = computer.pollRedstoneChanges();
|
||||
if (changes != 0) {
|
||||
for (var direction : DirectionUtil.FACINGS) {
|
||||
if ((changes & (1 << remapToLocalSide(direction).ordinal())) != 0) updateRedstoneTo(direction);
|
||||
@ -221,8 +221,10 @@ public abstract class AbstractComputerBlockEntity extends BlockEntity implements
|
||||
var offsetSide = dir.getOpposite();
|
||||
var localDir = remapToLocalSide(dir);
|
||||
|
||||
computer.setRedstoneInput(localDir, RedstoneUtil.getRedstoneInput(getLevel(), targetPos, dir));
|
||||
computer.setBundledRedstoneInput(localDir, BundledRedstone.getOutput(getLevel(), targetPos, offsetSide));
|
||||
computer.setRedstoneInput(localDir,
|
||||
RedstoneUtil.getRedstoneInput(getLevel(), targetPos, dir),
|
||||
BundledRedstone.getOutput(getLevel(), targetPos, offsetSide)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -132,8 +132,8 @@ public class ServerComputer implements InputHandler, ComputerEnvironment {
|
||||
*
|
||||
* @return What sides on the computer have changed.
|
||||
*/
|
||||
public int pollAndResetChanges() {
|
||||
return computer.pollAndResetChanges();
|
||||
public int pollRedstoneChanges() {
|
||||
return computer.pollRedstoneChanges();
|
||||
}
|
||||
|
||||
public UUID register() {
|
||||
@ -216,19 +216,15 @@ public class ServerComputer implements InputHandler, ComputerEnvironment {
|
||||
}
|
||||
|
||||
public int getRedstoneOutput(ComputerSide side) {
|
||||
return computer.getEnvironment().getExternalRedstoneOutput(side);
|
||||
return computer.isOn() ? computer.getRedstone().getExternalOutput(side) : 0;
|
||||
}
|
||||
|
||||
public void setRedstoneInput(ComputerSide side, int level) {
|
||||
computer.getEnvironment().setRedstoneInput(side, level);
|
||||
public void setRedstoneInput(ComputerSide side, int level, int bundledState) {
|
||||
computer.getRedstone().setInput(side, level, bundledState);
|
||||
}
|
||||
|
||||
public int getBundledRedstoneOutput(ComputerSide side) {
|
||||
return computer.getEnvironment().getExternalBundledRedstoneOutput(side);
|
||||
}
|
||||
|
||||
public void setBundledRedstoneInput(ComputerSide side, int combination) {
|
||||
computer.getEnvironment().setBundledRedstoneInput(side, combination);
|
||||
return computer.isOn() ? computer.getRedstone().getExternalBundledOutput(side) : 0;
|
||||
}
|
||||
|
||||
public void setPeripheral(ComputerSide side, @Nullable IPeripheral peripheral) {
|
||||
|
@ -15,7 +15,7 @@ import net.minecraft.world.level.storage.loot.predicates.LootItemConditionType;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* A loot condition which checks if the tile entity has a non-0 ID.
|
||||
* A loot condition which checks if the block entity has a computer ID.
|
||||
*/
|
||||
public final class HasComputerIdLootCondition implements LootItemCondition {
|
||||
public static final HasComputerIdLootCondition INSTANCE = new HasComputerIdLootCondition();
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.shared.util;
|
||||
package dan200.computercraft.shared.datafix;
|
||||
|
||||
import com.mojang.datafixers.DSL;
|
||||
import com.mojang.datafixers.Typed;
|
@ -0,0 +1,31 @@
|
||||
// SPDX-FileCopyrightText: 2024 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.shared.datafix;
|
||||
|
||||
import com.mojang.datafixers.DataFix;
|
||||
import com.mojang.datafixers.TypeRewriteRule;
|
||||
import com.mojang.datafixers.schemas.Schema;
|
||||
import net.minecraft.util.datafix.fixes.References;
|
||||
|
||||
/**
|
||||
* Rewrites turtle block entities to store upgrades as components.
|
||||
*
|
||||
* @see ComponentizationFixers#makeBlockEntityRewrites(Schema, Schema)
|
||||
*/
|
||||
public class TurtleUpgradeComponentizationFix extends DataFix {
|
||||
public TurtleUpgradeComponentizationFix(Schema outputSchema) {
|
||||
super(outputSchema, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TypeRewriteRule makeRule() {
|
||||
return fixTypeEverywhereTyped(
|
||||
"Turtle upgrade componentization",
|
||||
getInputSchema().getType(References.BLOCK_ENTITY),
|
||||
getOutputSchema().getType(References.BLOCK_ENTITY),
|
||||
ComponentizationFixers.makeBlockEntityRewrites(getInputSchema(), getOutputSchema())
|
||||
);
|
||||
}
|
||||
}
|
@ -121,7 +121,7 @@ public final class CustomLecternBlockEntity extends BlockEntity implements MenuP
|
||||
@Override
|
||||
public CompoundTag getUpdateTag(HolderLookup.Provider registries) {
|
||||
var tag = super.getUpdateTag(registries);
|
||||
tag.put(NBT_ITEM, item.save(registries));
|
||||
if (!item.isEmpty()) tag.put(NBT_ITEM, item.save(registries));
|
||||
return tag;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-FileCopyrightText: 2020 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: LicenseRef-CCPL
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.shared.peripheral.generic.methods;
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
package dan200.computercraft.shared.peripheral.monitor;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import dan200.computercraft.api.peripheral.AttachedComputerSet;
|
||||
import dan200.computercraft.api.peripheral.IComputerAccess;
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import dan200.computercraft.core.terminal.Terminal;
|
||||
@ -25,9 +26,6 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class MonitorBlockEntity extends BlockEntity {
|
||||
@ -53,7 +51,7 @@ public class MonitorBlockEntity extends BlockEntity {
|
||||
private @Nullable ClientMonitor clientMonitor;
|
||||
|
||||
private @Nullable MonitorPeripheral peripheral;
|
||||
private final Set<IComputerAccess> computers = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
private final AttachedComputerSet computers = new AttachedComputerSet();
|
||||
|
||||
private boolean needsUpdate = false;
|
||||
private boolean needsValidating = false;
|
||||
@ -487,7 +485,7 @@ public class MonitorBlockEntity extends BlockEntity {
|
||||
var monitor = getLoadedMonitor(x, y).getMonitor();
|
||||
if (monitor == null) continue;
|
||||
|
||||
for (var computer : monitor.computers) fun.accept(computer);
|
||||
monitor.computers.forEach(fun);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,95 @@
|
||||
// SPDX-FileCopyrightText: 2024 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
package dan200.computercraft.shared.peripheral.redstone;
|
||||
|
||||
import com.mojang.serialization.MapCodec;
|
||||
import dan200.computercraft.shared.common.IBundledRedstoneBlock;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.EntityBlock;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.level.redstone.Orientation;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* The block for redstone relays. This mostly just forwards method calls to the {@linkplain RedstoneRelayBlockEntity
|
||||
* block entity}.
|
||||
*/
|
||||
public final class RedstoneRelayBlock extends HorizontalDirectionalBlock implements EntityBlock, IBundledRedstoneBlock {
|
||||
private static final MapCodec<RedstoneRelayBlock> CODEC = simpleCodec(RedstoneRelayBlock::new);
|
||||
|
||||
public RedstoneRelayBlock(Properties properties) {
|
||||
super(properties);
|
||||
registerDefaultState(defaultBlockState().setValue(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> properties) {
|
||||
properties.add(FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MapCodec<RedstoneRelayBlock> codec() {
|
||||
return CODEC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext placement) {
|
||||
return defaultBlockState().setValue(FACING, placement.getHorizontalDirection());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
|
||||
super.tick(state, level, pos, random);
|
||||
|
||||
if (level.getBlockEntity(pos) instanceof RedstoneRelayBlockEntity relay) relay.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean isSignalSource(@Nonnull BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public int getDirectSignal(@Nonnull BlockState state, BlockGetter level, @Nonnull BlockPos pos, @Nonnull Direction incomingSide) {
|
||||
return level.getBlockEntity(pos) instanceof RedstoneRelayBlockEntity relay ? relay.getRedstoneOutput(incomingSide.getOpposite()) : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public int getSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||
return getDirectSignal(state, level, pos, direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBundledRedstoneOutput(Level level, BlockPos pos, Direction side) {
|
||||
return level.getBlockEntity(pos) instanceof RedstoneRelayBlockEntity relay ? relay.getBundledRedstoneOutput(side) : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void neighborChanged(BlockState state, Level level, BlockPos pos, Block neighbourBlock, @Nullable Orientation orientation, boolean isMoving) {
|
||||
if (level.getBlockEntity(pos) instanceof RedstoneRelayBlockEntity relay) {
|
||||
// TODO: relay.neighborChanged(neighbourPos);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
|
||||
return new RedstoneRelayBlockEntity(pos, state);
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
// SPDX-FileCopyrightText: 2024 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
package dan200.computercraft.shared.peripheral.redstone;
|
||||
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import dan200.computercraft.core.computer.ComputerSide;
|
||||
import dan200.computercraft.core.redstone.RedstoneState;
|
||||
import dan200.computercraft.impl.BundledRedstone;
|
||||
import dan200.computercraft.shared.ModRegistry;
|
||||
import dan200.computercraft.shared.util.DirectionUtil;
|
||||
import dan200.computercraft.shared.util.RedstoneUtil;
|
||||
import dan200.computercraft.shared.util.TickScheduler;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public final class RedstoneRelayBlockEntity extends BlockEntity {
|
||||
private final TickScheduler.Token tickToken = new TickScheduler.Token(this);
|
||||
|
||||
private final RedstoneState redstoneState = new RedstoneState(() -> TickScheduler.schedule(tickToken));
|
||||
private final RedstoneRelayPeripheral peripheral = new RedstoneRelayPeripheral(redstoneState);
|
||||
|
||||
public RedstoneRelayBlockEntity(BlockPos pos, BlockState blockState) {
|
||||
super(ModRegistry.BlockEntities.REDSTONE_RELAY.get(), pos, blockState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearRemoved() {
|
||||
super.clearRemoved();
|
||||
TickScheduler.schedule(tickToken);
|
||||
}
|
||||
|
||||
void update() {
|
||||
var changes = redstoneState.updateOutput();
|
||||
if (changes != 0) {
|
||||
for (var direction : DirectionUtil.FACINGS) {
|
||||
if ((changes & (1 << mapSide(direction).ordinal())) != 0) updateRedstoneTo(direction);
|
||||
}
|
||||
}
|
||||
|
||||
if (redstoneState.pollInputChanged()) peripheral.queueRedstoneEvent();
|
||||
}
|
||||
|
||||
void neighborChanged(BlockPos neighbour) {
|
||||
for (var dir : DirectionUtil.FACINGS) {
|
||||
var offset = getBlockPos().relative(dir);
|
||||
if (offset.equals(neighbour)) {
|
||||
updateRedstoneInput(dir, offset, false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If the position is not any adjacent one, update all inputs. This is pretty terrible, but some redstone mods
|
||||
// handle this incorrectly.
|
||||
for (var dir : DirectionUtil.FACINGS) updateRedstoneInput(dir, getBlockPos().relative(dir), false);
|
||||
}
|
||||
|
||||
private void updateRedstoneTo(Direction direction) {
|
||||
RedstoneUtil.propagateRedstoneOutput(getLevel(), getBlockPos(), direction);
|
||||
updateRedstoneInput(direction, getBlockPos().relative(direction), true);
|
||||
}
|
||||
|
||||
private void updateRedstoneInput(Direction dir, BlockPos targetPos, boolean ticking) {
|
||||
var changed = redstoneState.setInput(mapSide(dir),
|
||||
RedstoneUtil.getRedstoneInput(getLevel(), targetPos, dir),
|
||||
BundledRedstone.getOutput(getLevel(), targetPos, dir.getOpposite())
|
||||
);
|
||||
|
||||
// If the input has changed, and we're not currently in update(), then schedule a new tick so we can queue a
|
||||
// redstone event.
|
||||
if (changed && !ticking) TickScheduler.schedule(tickToken);
|
||||
}
|
||||
|
||||
private ComputerSide mapSide(Direction globalSide) {
|
||||
return DirectionUtil.toLocal(getBlockState().getValue(HorizontalDirectionalBlock.FACING), globalSide);
|
||||
}
|
||||
|
||||
int getRedstoneOutput(Direction side) {
|
||||
return redstoneState.getExternalOutput(mapSide(side));
|
||||
}
|
||||
|
||||
int getBundledRedstoneOutput(Direction side) {
|
||||
return redstoneState.getExternalBundledOutput(mapSide(side));
|
||||
}
|
||||
|
||||
public IPeripheral peripheral() {
|
||||
return peripheral;
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
// SPDX-FileCopyrightText: 2024 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
package dan200.computercraft.shared.peripheral.redstone;
|
||||
|
||||
import dan200.computercraft.api.peripheral.AttachedComputerSet;
|
||||
import dan200.computercraft.api.peripheral.IComputerAccess;
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import dan200.computercraft.core.apis.RedstoneAPI;
|
||||
import dan200.computercraft.core.apis.RedstoneMethods;
|
||||
import dan200.computercraft.core.redstone.RedstoneAccess;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* The redstone relay is a peripheral that allows reading and outputting redstone signals. While this is not very useful
|
||||
* on its own (as computers have the same functionality [built-in][`redstone`]), this can be used with [wired
|
||||
* modems][`modem`] to interact with multiple redstone signals from the same computer.
|
||||
* <p>
|
||||
* The peripheral provides largely identical methods to a computer's built-in {@link RedstoneAPI} API, allowing setting
|
||||
* signals on all six sides of the block ("top", "bottom", "left", "right", "front" and "back").
|
||||
*
|
||||
* <p>
|
||||
* ## Recipe
|
||||
* <div class="recipe-container">
|
||||
* <mc-recipe recipe="computercraft:redstone_relay"></mc-recipe>
|
||||
* </div>
|
||||
*
|
||||
* @cc.usage Toggle the redstone signal above the computer every 0.5 seconds.
|
||||
*
|
||||
* <pre>{@code
|
||||
* local relay = peripheral.find("redstone_relay")
|
||||
* while true do
|
||||
* relay.setOutput("top", not relay.getOutput("top"))
|
||||
* sleep(0.5)
|
||||
* end
|
||||
* }</pre>
|
||||
* @cc.module redstone_relay
|
||||
* @cc.since 1.114.0
|
||||
*/
|
||||
public final class RedstoneRelayPeripheral extends RedstoneMethods implements IPeripheral {
|
||||
private final AttachedComputerSet computers = new AttachedComputerSet();
|
||||
|
||||
RedstoneRelayPeripheral(RedstoneAccess access) {
|
||||
super(access);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getType() {
|
||||
return "redstone_relay";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable IPeripheral other) {
|
||||
return this == other;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attach(IComputerAccess computer) {
|
||||
computers.add(computer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detach(IComputerAccess computer) {
|
||||
computers.remove(computer);
|
||||
}
|
||||
|
||||
void queueRedstoneEvent() {
|
||||
computers.queueEvent("redstone");
|
||||
}
|
||||
}
|
@ -4,11 +4,11 @@
|
||||
|
||||
package dan200.computercraft.shared.peripheral.speaker;
|
||||
|
||||
import com.google.errorprone.annotations.concurrent.GuardedBy;
|
||||
import dan200.computercraft.api.lua.ILuaContext;
|
||||
import dan200.computercraft.api.lua.LuaException;
|
||||
import dan200.computercraft.api.lua.LuaFunction;
|
||||
import dan200.computercraft.api.lua.LuaTable;
|
||||
import dan200.computercraft.api.peripheral.AttachedComputerSet;
|
||||
import dan200.computercraft.api.peripheral.IComputerAccess;
|
||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import dan200.computercraft.core.util.Nullability;
|
||||
@ -59,7 +59,7 @@ public abstract class SpeakerPeripheral implements IPeripheral {
|
||||
public static final int SAMPLE_RATE = 48000;
|
||||
|
||||
private final UUID source = UUID.randomUUID();
|
||||
private final @GuardedBy("computers") Set<IComputerAccess> computers = new HashSet<>();
|
||||
private final AttachedComputerSet computers = new AttachedComputerSet();
|
||||
|
||||
private long clock = 0;
|
||||
private long lastPositionTime;
|
||||
@ -139,11 +139,7 @@ public abstract class SpeakerPeripheral implements IPeripheral {
|
||||
syncedPosition(position);
|
||||
|
||||
// And notify computers that we have space for more audio.
|
||||
synchronized (computers) {
|
||||
for (var computer : computers) {
|
||||
computer.queueEvent("speaker_audio_empty", computer.getAttachmentName());
|
||||
}
|
||||
}
|
||||
computers.forEach(c -> c.queueEvent("speaker_audio_empty", c.getAttachmentName()));
|
||||
}
|
||||
|
||||
// Push position updates to any speakers which have ever played a note,
|
||||
@ -356,16 +352,12 @@ public abstract class SpeakerPeripheral implements IPeripheral {
|
||||
|
||||
@Override
|
||||
public void attach(IComputerAccess computer) {
|
||||
synchronized (computers) {
|
||||
computers.add(computer);
|
||||
}
|
||||
computers.add(computer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detach(IComputerAccess computer) {
|
||||
synchronized (computers) {
|
||||
computers.remove(computer);
|
||||
}
|
||||
computers.remove(computer);
|
||||
}
|
||||
|
||||
static double clampVolume(double volume) {
|
||||
|
@ -34,8 +34,6 @@ import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.crafting.CraftingInput;
|
||||
import net.minecraft.world.item.crafting.CraftingRecipe;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
@ -219,26 +217,6 @@ public interface PlatformHelper {
|
||||
*/
|
||||
ItemStack getCraftingRemainingItem(ItemStack stack);
|
||||
|
||||
/**
|
||||
* A more general version of {@link #getCraftingRemainingItem(ItemStack)} which gets all remaining items for a
|
||||
* recipe.
|
||||
*
|
||||
* @param player The player performing the crafting.
|
||||
* @param recipe The recipe currently doing the crafting.
|
||||
* @param container The crafting container.
|
||||
* @return A list of items to return to the player after crafting.
|
||||
*/
|
||||
List<ItemStack> getRecipeRemainingItems(ServerPlayer player, CraftingRecipe recipe, CraftingInput container);
|
||||
|
||||
/**
|
||||
* Fire an event after crafting has occurred.
|
||||
*
|
||||
* @param player The player performing the crafting.
|
||||
* @param container The current crafting container.
|
||||
* @param stack The resulting stack from crafting.
|
||||
*/
|
||||
void onItemCrafted(ServerPlayer player, CraftingInput container, ItemStack stack);
|
||||
|
||||
/**
|
||||
* Check whether we should notify neighbours in a particular direction.
|
||||
*
|
||||
|
@ -21,6 +21,7 @@ import net.minecraft.world.item.component.DyedItemColor;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Holds additional state for a pocket computer. This includes pocket computer upgrade,
|
||||
@ -169,6 +170,8 @@ public final class PocketBrain implements IPocketAccess {
|
||||
*/
|
||||
@Override
|
||||
public void setUpgrade(@Nullable UpgradeData<IPocketUpgrade> upgrade) {
|
||||
if (Objects.equals(this.upgrade, upgrade)) return;
|
||||
|
||||
this.upgrade = upgrade;
|
||||
dirty = true;
|
||||
invalidatePeripheral();
|
||||
|
@ -225,6 +225,18 @@ public class PocketComputerItem extends Item implements IMedia {
|
||||
return getServerComputer(ServerContext.get(server).registry(), stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCraftedPostProcess(ItemStack stack, Level level) {
|
||||
// Normally we treat the computer instance as the source of truth, and copy the computer's state back to the
|
||||
// item. However, if we've just crafted the computer with an upgrade, we should sync the other way, and update
|
||||
// the computer.
|
||||
var server = level.getServer();
|
||||
if (server != null) {
|
||||
var computer = getServerComputer(server, stack);
|
||||
if (computer != null) computer.getBrain().setUpgrade(getUpgradeWithData(stack));
|
||||
}
|
||||
}
|
||||
|
||||
public ComputerFamily getFamily() {
|
||||
return family;
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ public class TurtleCraftCommand implements TurtleCommand {
|
||||
|
||||
// Store or drop any remainders
|
||||
for (var stack : results) TurtleUtil.storeItemOrDrop(turtle, stack);
|
||||
turtle.getInventory().setChanged();
|
||||
|
||||
if (!results.isEmpty()) turtle.playAnimation(TurtleAnimation.WAIT);
|
||||
return TurtleCommandResult.success();
|
||||
|
@ -5,9 +5,7 @@
|
||||
package dan200.computercraft.shared.turtle.upgrades;
|
||||
|
||||
import dan200.computercraft.api.turtle.ITurtleAccess;
|
||||
import dan200.computercraft.shared.platform.PlatformHelper;
|
||||
import dan200.computercraft.shared.turtle.blocks.TurtleBlockEntity;
|
||||
import dan200.computercraft.shared.turtle.core.TurtlePlayer;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.Container;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
@ -80,18 +78,15 @@ public final class TurtleInventoryCrafting {
|
||||
var xStart = candidate.xStart();
|
||||
var yStart = candidate.yStart();
|
||||
|
||||
var player = TurtlePlayer.get(turtle).player();
|
||||
|
||||
var results = new ArrayList<ItemStack>();
|
||||
for (var i = 0; i < maxCount && recipe.matches(input, level); i++) {
|
||||
var result = recipe.assemble(input, level.registryAccess());
|
||||
if (result.isEmpty()) break;
|
||||
results.add(result);
|
||||
|
||||
result.onCraftedBy(level, player, result.getCount());
|
||||
PlatformHelper.get().onItemCrafted(player, input, result);
|
||||
result.onCraftedBySystem(level);
|
||||
|
||||
var remainders = PlatformHelper.get().getRecipeRemainingItems(player, recipe, input);
|
||||
var remainders = recipe.getRemainingItems(input);
|
||||
for (var y = 0; y < input.height(); y++) {
|
||||
for (var x = 0; x < input.width(); x++) {
|
||||
var slot = xStart + x + (y + yStart) * TurtleBlockEntity.INVENTORY_WIDTH;
|
||||
@ -108,10 +103,9 @@ public final class TurtleInventoryCrafting {
|
||||
// Either update the current stack or add it to the remainder list (to be inserted into the inventory
|
||||
// afterwards).
|
||||
if (existing.isEmpty()) {
|
||||
inventory.setItem(slot, existing);
|
||||
} else if (ItemStack.isSameItemSameComponents(existing, remainder)) {
|
||||
remainder.grow(existing.getCount());
|
||||
inventory.setItem(slot, remainder);
|
||||
} else if (ItemStack.isSameItemSameComponents(existing, remainder)) {
|
||||
existing.grow(remainder.getCount());
|
||||
} else {
|
||||
results.add(remainder);
|
||||
}
|
||||
|
@ -32,8 +32,6 @@
|
||||
"commands.computercraft.generic.additional_rows": "%d řádků navíc…",
|
||||
"commands.computercraft.generic.exception": "Neočekávaná chyba (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<žádná pozice>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "A",
|
||||
"commands.computercraft.help.desc": "Ukáže tuto pomocnou zprávu",
|
||||
"commands.computercraft.help.no_children": "%s nemá žádné podpříkazy",
|
||||
@ -98,6 +96,7 @@
|
||||
"gui.computercraft.config.http.max_requests.tooltip": "Počet HTTP požadavků které počítač může udělat v jedné chvíli. Požadavky navíc\nbudou zaslány do fronty, a poslány když běžící požadavky byly dokončeny. Nastav\nna 0 pro neomezeno.\nRozsah: > 0",
|
||||
"gui.computercraft.config.http.max_websockets": "Maximální souběžné websockety",
|
||||
"gui.computercraft.config.http.max_websockets.tooltip": "Počet websocketů které může mít počítač otevřené najednou: Nastav na 0 pro neomezeno.\nRozsah: > 1",
|
||||
"gui.computercraft.config.http.proxy": "Proxy",
|
||||
"gui.computercraft.config.http.proxy.host": "Název hostitele",
|
||||
"gui.computercraft.config.http.proxy.host.tooltip": "Název hostitele nebo IP adresa proxy serveru.",
|
||||
"gui.computercraft.config.http.proxy.port": "Port",
|
||||
@ -164,6 +163,7 @@
|
||||
"gui.computercraft.config.turtle.normal_fuel_limit.tooltip": "Limit paliva pro roboty.\nRozsah: > 0",
|
||||
"gui.computercraft.config.turtle.tooltip": "Různé možnosti o robotech.",
|
||||
"gui.computercraft.config.upload_max_size": "Limit velikosti nahrávaného souboru (v bajtech)",
|
||||
"gui.computercraft.config.upload_max_size.tooltip": "Limit velikosti nahrávaného souboru v bytech. Musí být v rozmezí od 1 KiB do 16 MiB.\nMěj na paměti, že nahrávání souborů je zpracováváno v jednom ticku - velké soubory nebo\nšpatný výkon sítě mohou zpomalit síťové vlákno. A nezapomeň na místo na disku!\nRozsah: 1024 ~ 16777216",
|
||||
"gui.computercraft.config.upload_nag_delay": "Nahrání zpoždění nag",
|
||||
"gui.computercraft.config.upload_nag_delay.tooltip": "Zpoždění v sekundách po kterém oznámíme o nezpracovaných importech. Nastav na 0 pro vypnutí.\nRozsah: 0 ~ 60",
|
||||
"gui.computercraft.pocket_computer_overlay": "Kapesní počítač otevřen. Zmáčkni ESC pro uzavření.",
|
||||
@ -195,6 +195,10 @@
|
||||
"item.computercraft.printed_pages": "Tisknuté stránky",
|
||||
"item.computercraft.treasure_disk": "Disketa",
|
||||
"itemGroup.computercraft": "ComputerCraft",
|
||||
"tag.item.computercraft.computer": "Počítače",
|
||||
"tag.item.computercraft.monitor": "Monitory",
|
||||
"tag.item.computercraft.turtle": "Roboti",
|
||||
"tag.item.computercraft.wired_modem": "Drátové modemy",
|
||||
"tracking_field.computercraft.avg": "%s (průměr)",
|
||||
"tracking_field.computercraft.computer_tasks.name": "Úlohy",
|
||||
"tracking_field.computercraft.count": "%s (počet)",
|
||||
@ -216,11 +220,5 @@
|
||||
"upgrade.minecraft.diamond_hoe.adjective": "Farmářský",
|
||||
"upgrade.minecraft.diamond_pickaxe.adjective": "Těžební",
|
||||
"upgrade.minecraft.diamond_shovel.adjective": "Kopací",
|
||||
"upgrade.minecraft.diamond_sword.adjective": "Bojový",
|
||||
"tag.item.computercraft.computer": "Počítače",
|
||||
"tag.item.computercraft.monitor": "Monitory",
|
||||
"tag.item.computercraft.turtle": "Roboti",
|
||||
"tag.item.computercraft.wired_modem": "Drátové modemy",
|
||||
"gui.computercraft.config.http.proxy": "Proxy",
|
||||
"gui.computercraft.config.upload_max_size.tooltip": "Limit velikosti nahrávaného souboru v bytech. Musí být v rozmezí od 1 KiB do 16 MiB.\nMěj na paměti, že nahrávání souborů je zpracováváno v jednom ticku - velké soubory nebo\nšpatný výkon sítě mohou zpomalit síťové vlákno. A nezapomeň na místo na disku!\nRozsah: 1024 ~ 16777216"
|
||||
"upgrade.minecraft.diamond_sword.adjective": "Bojový"
|
||||
}
|
||||
|
@ -1,8 +1,13 @@
|
||||
{
|
||||
"argument.computercraft.argument_expected": "Parameter erwartet",
|
||||
"argument.computercraft.computer.family": "Computer familie",
|
||||
"argument.computercraft.computer.id": "Computer ID",
|
||||
"argument.computercraft.computer.instance": "einzigartige Instanz ID",
|
||||
"argument.computercraft.computer.label": "Computer name",
|
||||
"argument.computercraft.computer.many_matching": "Mehrere Computer passen auf '%s' (Instanzen %s)",
|
||||
"argument.computercraft.computer.no_matching": "Kein Computer passt auf '%s'",
|
||||
"argument.computercraft.tracking_field.no_field": "Unbekanntes Feld '%s'",
|
||||
"argument.computercraft.unknown_computer_family": "Unbekannte computer familie '%s'",
|
||||
"block.computercraft.cable": "Netzwerkkabel",
|
||||
"block.computercraft.computer_advanced": "Erweiterter Computer",
|
||||
"block.computercraft.computer_command": "Befehlscomputer",
|
||||
@ -11,6 +16,7 @@
|
||||
"block.computercraft.monitor_advanced": "Erweiterter Monitor",
|
||||
"block.computercraft.monitor_normal": "Monitor",
|
||||
"block.computercraft.printer": "Drucker",
|
||||
"block.computercraft.redstone_relay": "Redstone Relais",
|
||||
"block.computercraft.speaker": "Lautsprecher",
|
||||
"block.computercraft.turtle_advanced": "Erweiterte Turtle",
|
||||
"block.computercraft.turtle_advanced.upgraded": "Erweiterte Turtle (%s)",
|
||||
@ -32,8 +38,6 @@
|
||||
"commands.computercraft.generic.additional_rows": "%d zusätzliche Zeilen…",
|
||||
"commands.computercraft.generic.exception": "Unbehandelte Ausnahme (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<Keine Position>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "J",
|
||||
"commands.computercraft.help.desc": "Zeigt diese Hilfe Nachricht",
|
||||
"commands.computercraft.help.no_children": "%s hat keine Unterbefehle",
|
||||
@ -82,8 +86,16 @@
|
||||
"gui.computercraft.config.execution.max_main_computer_time": "Computer Servertick Zeitlimit",
|
||||
"gui.computercraft.config.execution.max_main_computer_time.tooltip": "Die ideale maximale Zeit, in der ein Computer laufen kann im innerhalb von einem tick in Millisekunden.\nBeachte, dass wir wahrscheinlich über diesen Limit gehen werden, da es unmöglich ist zu bestimmen,\nwie lange ein Computer brauchen wird. Dies wird also die höhere Grenze der durchschnittlichen Zeit darstellen.\nBereich: > 1",
|
||||
"gui.computercraft.config.execution.max_main_global_time": "Globales Servertick Zeitlimit",
|
||||
"gui.computercraft.config.execution.max_main_global_time.tooltip": "Die maximale Zeit in millisekunden, in der Aufgaben ausgeführt werden.\nAnmerkung: Diese Zeit wird höchstwarscheinlich überschritten und dient nur als ungefähre Grenze.\nLimit: > 1",
|
||||
"gui.computercraft.config.floppy_space_limit": "Speicherplatz von Disketten (Bytes)",
|
||||
"gui.computercraft.config.floppy_space_limit.tooltip": "Die maximale Dateisystem Größe von Disketten (in bytes).",
|
||||
"gui.computercraft.config.http": "HTTP",
|
||||
"gui.computercraft.config.http.bandwidth": "Bandbreite",
|
||||
"gui.computercraft.config.http.bandwidth.global_download": "Globales download limit",
|
||||
"gui.computercraft.config.http.bandwidth.global_download.tooltip": "Die maximale Geschwindigkeit aller Computer in bytes/s mit der Heruntergeladen werden kann.\nBereich: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload": "Globales upload limit",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload.tooltip": "Die maximale Hochladungs Geschwindigkeit aller Computer in bytes/s.\nBereich: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.tooltip": "Limitiert die Bandbreite der Computer.",
|
||||
"gui.computercraft.config.http.enabled": "HTTP-API aktivieren",
|
||||
"gui.computercraft.config.http.max_requests": "Maximale Anzahl gleichzeitiger Anfragen",
|
||||
"gui.computercraft.config.http.max_websockets": "Maximale Anzahl gleichzeitiger Websockets",
|
||||
@ -130,18 +142,5 @@
|
||||
"upgrade.minecraft.diamond_hoe.adjective": "Ackerbau",
|
||||
"upgrade.minecraft.diamond_pickaxe.adjective": "Bergbau",
|
||||
"upgrade.minecraft.diamond_shovel.adjective": "Graben",
|
||||
"upgrade.minecraft.diamond_sword.adjective": "Nahkampf",
|
||||
"argument.computercraft.computer.id": "Computer ID",
|
||||
"argument.computercraft.computer.instance": "einzigartige Instanz ID",
|
||||
"argument.computercraft.computer.label": "Computer name",
|
||||
"argument.computercraft.unknown_computer_family": "Unbekannte computer familie '%s'",
|
||||
"gui.computercraft.config.floppy_space_limit.tooltip": "Die maximale Dateisystem Größe von Disketten (in bytes).",
|
||||
"gui.computercraft.config.http.bandwidth": "Bandbreite",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload": "Globales upload limit",
|
||||
"gui.computercraft.config.http.bandwidth.global_download.tooltip": "Die maximale Geschwindigkeit aller Computer in bytes/s mit der Heruntergeladen werden kann.\nBereich: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.global_download": "Globales download limit",
|
||||
"gui.computercraft.config.http.bandwidth.tooltip": "Limitiert die Bandbreite der Computer.",
|
||||
"argument.computercraft.computer.family": "Computer familie",
|
||||
"gui.computercraft.config.execution.max_main_global_time.tooltip": "Die maximale Zeit in millisekunden, in der Aufgaben ausgeführt werden.\nAnmerkung: Diese Zeit wird höchstwarscheinlich überschritten und dient nur als ungefähre Grenze.\nLimit: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload.tooltip": "Die maximale Hochladungs Geschwindigkeit aller Computer in bytes/s.\nBereich: > 1"
|
||||
"upgrade.minecraft.diamond_sword.adjective": "Nahkampf"
|
||||
}
|
||||
|
@ -1,6 +1,14 @@
|
||||
{
|
||||
"argument.computercraft.argument_expected": "Argumento esperado",
|
||||
"argument.computercraft.computer.distance": "Distancia a entidad",
|
||||
"argument.computercraft.computer.family": "Familia de computadoras",
|
||||
"argument.computercraft.computer.id": "ID de la computadora",
|
||||
"argument.computercraft.computer.instance": "ID de instancia único",
|
||||
"argument.computercraft.computer.label": "Etiqueta de la computadora",
|
||||
"argument.computercraft.computer.many_matching": "Varias computadoras que coinciden con ' %s' (instancias %s)",
|
||||
"argument.computercraft.computer.no_matching": "No hay ordenadores que coincidan con '%s'",
|
||||
"argument.computercraft.tracking_field.no_field": "Campo desconocido '%s'",
|
||||
"argument.computercraft.unknown_computer_family": "Familia de ordenadores desconocida '%s'",
|
||||
"block.computercraft.cable": "Cable de red",
|
||||
"block.computercraft.computer_advanced": "Ordenador avanzado",
|
||||
"block.computercraft.computer_command": "Ordenador de Comandos",
|
||||
@ -22,31 +30,167 @@
|
||||
"block.computercraft.wireless_modem_normal": "Módem sin cables",
|
||||
"chat.computercraft.wired_modem.peripheral_connected": "El periférico \"%s\" se conectó a la red",
|
||||
"chat.computercraft.wired_modem.peripheral_disconnected": "El periférico \"%s\" se desconectó de la red",
|
||||
"commands.computercraft.desc": "El comando /computercraft proporciona varias herramientas de depuración y administración para controlar e interactuar con computadoras.",
|
||||
"commands.computercraft.dump.action": "Ver más info acerca de esta computadora",
|
||||
"commands.computercraft.dump.desc": "Muestra el estado de todas las computadoras o información específica sobre una computadora. Puedes especificar el id de instancia de la computadora (ej. 123), el id de la computadora (ej. #123) o su etiqueta (ej. \"@Mi computadora\").",
|
||||
"commands.computercraft.dump.open_path": "Ver los archivos de esta computadora",
|
||||
"commands.computercraft.dump.synopsis": "Mostrar el estado de las computadoras.",
|
||||
"commands.computercraft.generic.additional_rows": "%d filas adicionales…",
|
||||
"commands.computercraft.generic.exception": "Excepción no controlada (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<sin pos>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "Y",
|
||||
"commands.computercraft.help.desc": "Muestra este mensaje de ayuda",
|
||||
"commands.computercraft.help.no_children": "%s no tiene sub-comandos",
|
||||
"commands.computercraft.help.no_command": "Sin comando '%s'",
|
||||
"commands.computercraft.help.synopsis": "Provee ayuda para un comando específico",
|
||||
"commands.computercraft.queue.desc": "Envía un evento computer_command a un ordenador de comandos, pasándole los argumentos adicionales. Esto está diseñado principalmente para los map makers, actuando como una versión más amigable con el ordenador de /trigger. Cualquier jugador puede ejecutar el comando, lo que probablemente se haría a través de un evento de clic de un componente de texto.",
|
||||
"commands.computercraft.queue.synopsis": "Envía un evento computer_command a un ordenador de comandos",
|
||||
"commands.computercraft.shutdown.desc": "Apagar las computadoras listadas o todas si ninguna se especifica. Puedes especificar el id de la instancia de la computadora (ej. 123), el id de la computadora (ej. #123) o la etiqueta (ej. \"@Mi Computadora\").",
|
||||
"commands.computercraft.shutdown.done": "Apague %s/%s computadoras",
|
||||
"commands.computercraft.shutdown.synopsis": "Apague las computadoras de forma remota.",
|
||||
"commands.computercraft.synopsis": "Varios comandos para controlar computadoras.",
|
||||
"commands.computercraft.tp.action": "Teletransportarse a esta computadora",
|
||||
"commands.computercraft.tp.desc": "Teletransportarse a la ubicación de una computadora. Puedes especificar tanto el id de la instancia de la computadora (ej. 123) o el id de la computadora (ej. #123).",
|
||||
"commands.computercraft.tp.synopsis": "Teletransportarse a una computadora específica.",
|
||||
"commands.computercraft.track.desc": "Seguimiento de qué tanto se ejecutan las computadoras, y también cuántos eventos manejan. Esto presenta información en una manera similar a /forge track y puede ser útil para diagnosticar lag.",
|
||||
"commands.computercraft.track.dump.computer": "Computadora",
|
||||
"commands.computercraft.track.dump.desc": "Volcar los últimos resultados del seguimiento de computadoras.",
|
||||
"commands.computercraft.track.dump.no_timings": "No hay temporizaciones disponibles",
|
||||
"commands.computercraft.track.dump.synopsis": "Volcar los últimos resultados de seguimiento",
|
||||
"commands.computercraft.track.start.desc": "Comenzar el seguimiento de todos los tiempos y conteo de eventos de las computadoras. Esto va a descartar los resultados de ejecuciones previas.",
|
||||
"commands.computercraft.track.start.stop": "Ejecute %s para detener el seguimiento y ver los resultados",
|
||||
"commands.computercraft.track.start.synopsis": "Comenzar el seguimiento de todas las computadoras",
|
||||
"commands.computercraft.track.stop.action": "Clic para detener el seguimiento",
|
||||
"commands.computercraft.track.stop.desc": "Detener el seguimiento de todos los eventos y tiempos de ejecución de las computadoras",
|
||||
"commands.computercraft.track.stop.not_enabled": "Actualmente no hay computadoras en seguimiento",
|
||||
"commands.computercraft.track.stop.synopsis": "Dejar de seguir a todas las computadoras",
|
||||
"commands.computercraft.track.synopsis": "Seguimiento de tiempos de ejecución para computadoras.",
|
||||
"commands.computercraft.turn_on.desc": "Encender las computadoras listadas. Puedes especificar el id de la instancia de la computadora (ej. 123), el id de la computadora (ej. #123) o la etiqueta (ej. \"@Mi computadora\").",
|
||||
"commands.computercraft.turn_on.done": "Encendidas %s/%s computadoras",
|
||||
"commands.computercraft.turn_on.synopsis": "Encender computadoras remotamente.",
|
||||
"commands.computercraft.view.action": "Ver esta computadora",
|
||||
"commands.computercraft.view.desc": "Abrir la terminal de una computadora, permitiendo el control remoto de esta. Esto no proporciona acceso al inventario de tortugas. Puede tanto especificar el Id de instancia de la computadora (ej. 123) o el Id de la computadora (ej. #123).",
|
||||
"commands.computercraft.view.not_player": "No se puede abrir la terminal para un no-jugador",
|
||||
"commands.computercraft.view.synopsis": "Ver la terminal de una computadora",
|
||||
"gui.computercraft.config.command_require_creative": "Las computadoras de comando requieren creativo",
|
||||
"gui.computercraft.config.command_require_creative.tooltip": "Requiere que los jugadores estén en modo creativo y sean operadores para\ninteractuar con las computadoras de comandos. Este es el comportamiento\npredeterminado para los bloques de comandos en vanilla.",
|
||||
"gui.computercraft.config.computer_space_limit": "Límite de memoria de ordenadores (en bytes)",
|
||||
"gui.computercraft.config.computer_space_limit.tooltip": "Límite de espacio en disco para computadoras y tortugas, en bytes.",
|
||||
"gui.computercraft.config.default_computer_settings": "Configuración de Ordenador por defecto",
|
||||
"gui.computercraft.config.default_computer_settings.tooltip": "Una lista separada por comas de los ajustes predeterminados para establecer en nuevas computadoras.\nEjemplo: \"shell.autocomplete=false,lua.autocomplete=false,edit.autocomplete=false\"\ndeshabilitará todo el autocompletado.",
|
||||
"gui.computercraft.config.disabled_generic_methods": "Métodos genéricos desactivados",
|
||||
"gui.computercraft.config.disabled_generic_methods.tooltip": "Una lista de métodos genéricos o métodos de fuente para deshabilitar. Los\nmétodos genéricos son métodos añadidos a un bloque/block entity cuando no hay\nun proveedor de periférico explícito. Esto incluye métodos de inventario (ej.\ninventory.getItemDetail, inventory.pushItems), y (si está en Forge), los\nmétodos fluid_storage y energy_storage.\nLos métodos en esta lista pueden ser tanto un grupo entero de métodos\n(computercraft:inventory) o un método en particular\n(computercraft:inventory#pushItems).\n",
|
||||
"gui.computercraft.config.execution": "Ejecución",
|
||||
"gui.computercraft.config.execution.computer_threads": "Hilos de la computadora",
|
||||
"gui.computercraft.config.execution.computer_threads.tooltip": "Establece el número de hilos en los que las computadoras pueden correr. Un número\nmás alto significa que más computadoras pueden ejecutarse a la vez, pero podrían\ninducir lag. Ten en cuenta que algunos mods podrían no funcionar con un número de\nhilos mayor a 1. Usar con precaución.\nRango: > 1",
|
||||
"gui.computercraft.config.execution.max_main_computer_time": "Límite de tiempo de la computadora en un tick del servidor",
|
||||
"gui.computercraft.config.execution.max_main_global_time": "Límite de tiempo global en un tick del servidor",
|
||||
"gui.computercraft.config.execution.tooltip": "Controla el comportamiento de ejecución de las computadoras. Esto es\nen gran medida destinado al control fino para servidores, y generalmente no\ndebería ser cambiado.",
|
||||
"gui.computercraft.config.floppy_space_limit": "Límite de memoria de disquetes (en bytes)",
|
||||
"gui.computercraft.config.floppy_space_limit.tooltip": "El límite de espacio en disco para los disquetes, en bytes.",
|
||||
"gui.computercraft.config.http": "HTTP",
|
||||
"gui.computercraft.config.http.bandwidth": "Ancho de banda",
|
||||
"gui.computercraft.config.http.bandwidth.global_download": "Límite de descarga global",
|
||||
"gui.computercraft.config.http.bandwidth.global_download.tooltip": "El número de bytes que se pueden descargar por segundo. Esto es compartido para todas las computadoras. (bytes/s).\nRango: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload": "Límite de subida global",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload.tooltip": "El número de bytes que se pueden subir por segundo. Esto es compartido para todas las computadoras. (bytes/s).\nRango: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.tooltip": "Limita el ancho de banda usado por las computadoras.",
|
||||
"gui.computercraft.config.http.enabled": "Habilitar API de HTTP",
|
||||
"gui.computercraft.config.http.enabled.tooltip": "Habilitar la API \"http\" en computadoras. Deshabilitar esto también desactiva los\nprogramas \"pastebin\" y \"wget\", los cuales muchos usuarios dependen. Se recomienda\ndejar esto encendido y usar la opción \"reglas\" en configuración para imponer un\ncontrol más fino.",
|
||||
"gui.computercraft.config.http.max_requests": "Máximo de solicitudes simultáneas",
|
||||
"gui.computercraft.config.http.max_requests.tooltip": "El número de solicitudes http que un equipo puede hacer a la vez. Las solicitudes\nadicionales se pondrán en cola, y se enviarán cuando las solicitudes en ejecución\nhayan finalizado. Establezca 0 para ilimitado.\nRango: > 0",
|
||||
"gui.computercraft.config.http.max_websockets": "Máximos websockets concurrentes",
|
||||
"gui.computercraft.config.http.max_websockets.tooltip": "El número de websockets que una computadora puede tener abierto\nen el mismo momento.\nRango: > 1",
|
||||
"gui.computercraft.config.http.proxy": "Proxy",
|
||||
"gui.computercraft.config.http.proxy.host": "Nombre del host",
|
||||
"gui.computercraft.config.http.proxy.host.tooltip": "El nombre del host o la dirección IP del servidor proxy.",
|
||||
"gui.computercraft.config.http.proxy.port": "Puerto",
|
||||
"gui.computercraft.config.http.proxy.port.tooltip": "El puerto del servidor proxy.\nRango: 1 ~ 65536",
|
||||
"gui.computercraft.config.http.proxy.tooltip": "Pasa los pedidos HTTP y websocket a través de un servidor proxy. Solo afecta a las\nreglas HTTP con \"use_proxy\" puesto en verdadero (falso por defecto).\nSi se requiere autenticación para el proxy, crea un archivo\n\"computercraft-proxy.pw\" en la misma carpeta que se encuentra\n\"computercraft-server.toml\", conteniendo el nombre de usuario y contraseña\nseparada por dos puntos, por ejemplo: \"miusuario:micontraseña\". Para proxys\nSOCKS4 solo se requiere el nombre de usuario.",
|
||||
"gui.computercraft.config.http.proxy.type": "Tipo de proxy",
|
||||
"gui.computercraft.config.http.proxy.type.tooltip": "El tipo de proxy a utilizar.\nValores permitidos: HTTP, HTTPS, SOCKS4, SOCKS5",
|
||||
"gui.computercraft.config.http.rules": "Reglas de permitir/denegar",
|
||||
"gui.computercraft.config.http.rules.tooltip": "Una lista de reglas que controlan el comportamiento de la API \"http\" para dominios\nespecíficos o IPs. Cada regla aplica a un hostname y un puerto opcional, y luego\nestablece varias propiedades para el pedido. Las reglas son evaluadas en orden,\nlo que quiere decir que las reglas primeras sobreescriben a las de después.\n\nPropiedades válidas:\n - \"host\" (requerido): El dominio o dirección IP con el que la regla va a operar.\n Este puede ser nombre de dominio (\"pastebin.com\"), wildcard (\"*.pastebin.com\")\n o notación CIDR (\"127.0.0.0/8\").\n - \"port\" (opcional): Solo aplicar a pedidos para un puerto específico, como 80\n o 443.\n - \"action\" (opcional): Permitir o denegar este pedido.\n - \"max_download\" (opcional): El tamaño máximo (en bytes) que una computadora \n puede descargar en este pedido.\n - \"max_upload\" (opcional): El tamaño máximo (en bytes) que una computadora puede\n subir en este pedido.\n - \"max_websocket_message\" (opcional): El tamaño máximo (en bytes) que una\n computadora puede enviar en un paquete websocket.\n - \"use_proxy\" (opcional): Habilitar el uso de el proxy HTTP/SOCKS si está\n configurado.",
|
||||
"gui.computercraft.config.http.tooltip": "Controla la API HTTP",
|
||||
"gui.computercraft.config.http.websocket_enabled": "Habilitar websockets",
|
||||
"gui.computercraft.config.http.websocket_enabled.tooltip": "Habilita el uso de websockets http. Esto requiere que la opción \"http_enable\" sea verdadera.",
|
||||
"gui.computercraft.config.log_computer_errors": "Grabar errores periféricos",
|
||||
"gui.computercraft.config.log_computer_errors.tooltip": "Registra excepciones lanzadas por los periféricos y otros objetos de Lua. Esto facilita\ndepurar problemas para los autores de mods, pero puede resultar en spam en el\nregistro si la gente utiliza métodos con errores potenciales.",
|
||||
"gui.computercraft.config.maximum_open_files": "Archivos abiertos máximos por cada ordenador",
|
||||
"gui.computercraft.config.maximum_open_files.tooltip": "Establece cuántos archivos puede tener abiertos una computadora al mismo tiempo. Establezca 0 para ilimitados.\nRango: > 0",
|
||||
"gui.computercraft.config.monitor_distance": "Distancia al monitor",
|
||||
"gui.computercraft.config.monitor_distance.tooltip": "La distancia máxima a la que los monitores se renderizarán. El valor\npredeterminado es el límite de los tile entities, pero puede ser extendido si quieres\nconstruir monitores más grandes.\nRango: 16 ~ 1024",
|
||||
"gui.computercraft.config.monitor_renderer": "Renderizador del monitor",
|
||||
"gui.computercraft.config.monitor_renderer.tooltip": "El renderizador a usar en monitores. Generalmente esto debe estar en \"BEST\"\n(mejor) - si los monitores tienen problemas de rendimiento, podrías querer\nexperimentar con renderizadores alternativos.\nValores permitidos: BEST, TBO, VBO",
|
||||
"gui.computercraft.config.peripheral": "Periféricos",
|
||||
"gui.computercraft.config.peripheral.command_block_enabled": "Habilitar bloque de comandos periférico",
|
||||
"gui.computercraft.config.peripheral.command_block_enabled.tooltip": "Habilitar soporte del periférico Bloque de Comandos",
|
||||
"gui.computercraft.config.peripheral.max_notes_per_tick": "Notas máximas que un ordenador puede tocar a la vez",
|
||||
"gui.computercraft.config.peripheral.max_notes_per_tick.tooltip": "Cantidad máxima de notas que un parlante puede reproducir a la vez.\nRango: > 1",
|
||||
"gui.computercraft.config.peripheral.modem_high_altitude_range": "Rango del módem (en altitud)",
|
||||
"gui.computercraft.config.peripheral.modem_high_altitude_range.tooltip": "El rango de los Modems inalámbricos a máxima altitud en clima despejado, en metros.\nRango: 0 ~ 100000",
|
||||
"gui.computercraft.config.peripheral.modem_high_altitude_range_during_storm": "Rango del módem (en altitud con mal tiempo)",
|
||||
"gui.computercraft.config.peripheral.modem_high_altitude_range_during_storm.tooltip": "El rango de los Modems inalámbricos a máxima altitud durante las tormentas, en metros.\nRango: 0 ~ 100000",
|
||||
"gui.computercraft.config.peripheral.modem_range": "Rango del módem (Por defecto)",
|
||||
"gui.computercraft.config.peripheral.modem_range.tooltip": "El rango de los Modems inalámbricos a baja altitud en clima despejado, en metros.\nRango: 0 ~ 100000",
|
||||
"gui.computercraft.config.peripheral.modem_range_during_storm": "Rango del módem (mal tiempo)",
|
||||
"gui.computercraft.config.peripheral.modem_range_during_storm.tooltip": "El rango de los Modems inalámbricos a baja altitud durante las tormentas, en metros.\nRango: 0 ~ 100000",
|
||||
"gui.computercraft.config.peripheral.monitor_bandwidth": "Ancho de banda del monitor",
|
||||
"gui.computercraft.config.peripheral.monitor_bandwidth.tooltip": "El límite de datos que un monitor puede enviar *por tick* Nota:\n - El ancho de banda es medido antes de la compresión, así que los datos enviados\n al cliente son más pequeños.\n - Esto ignora el número de jugadores a los que se les envían los paquetes.\n Actualizar un monitor para un jugador consume lo mismo que actualizarlo para\n 20.\n - Un monitor del tamaño más grande envía ~25kb de datos. Así que el límite\n predeterminado (1MB) permite actualizar ~40 monitores en un solo tick.\nEstablezca en 0 para desactivar.\nRango: > 0",
|
||||
"gui.computercraft.config.peripheral.tooltip": "Varias opciones relacionadas con los periféricos.",
|
||||
"gui.computercraft.config.term_sizes": "Tamaños de la terminal",
|
||||
"gui.computercraft.config.term_sizes.computer": "Computadora",
|
||||
"gui.computercraft.config.term_sizes.computer.height": "Altura de la terminal",
|
||||
"gui.computercraft.config.term_sizes.computer.height.tooltip": "Rango: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.computer.tooltip": "Tamaño de la terminal de las computadoras.",
|
||||
"gui.computercraft.config.term_sizes.computer.width": "Ancho de la terminal",
|
||||
"gui.computercraft.config.term_sizes.computer.width.tooltip": "Rango: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.monitor": "Monitor",
|
||||
"gui.computercraft.config.term_sizes.monitor.height": "Altura máxima del monitor",
|
||||
"gui.computercraft.config.term_sizes.monitor.height.tooltip": "Rango: 1 ~ 32",
|
||||
"gui.computercraft.config.term_sizes.monitor.tooltip": "Tamaño máximo de los monitores (en bloques).",
|
||||
"gui.computercraft.config.term_sizes.monitor.width": "Anchura máxima del monitor",
|
||||
"gui.computercraft.config.term_sizes.monitor.width.tooltip": "Rango: 1 ~ 32",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer": "Computadora de bolsillo",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.height": "Altura de la terminal",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.height.tooltip": "Rango: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.tooltip": "Tamaño de la terminal de las computadoras de bolsillo.",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.width": "Ancho de la terminal",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.width.tooltip": "Rango: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.tooltip": "Configura el tamaño de las terminales de varias computadoras.\nTerminales más grandes requieren mayor ancho de banda, así que úselo con cuidado.",
|
||||
"gui.computercraft.config.turtle": "Tortugas",
|
||||
"gui.computercraft.config.turtle.advanced_fuel_limit": "Límite de combustible de las tortugas avanzadas",
|
||||
"gui.computercraft.config.turtle.advanced_fuel_limit.tooltip": "El límite de combustible para Tortugas Avanzadas.\nRango: > 0",
|
||||
"gui.computercraft.config.turtle.can_push": "Las tortugas pueden empujar entidades",
|
||||
"gui.computercraft.config.turtle.can_push.tooltip": "Si es verdadero, las tortugas empujarán a las entidades de su camino en\nlugar de detenerse si hay espacio para hacerlo.",
|
||||
"gui.computercraft.config.turtle.need_fuel": "Habilitar combustible",
|
||||
"gui.computercraft.config.turtle.need_fuel.tooltip": "Establece si las tortugas requieren combustible para moverse.",
|
||||
"gui.computercraft.config.turtle.normal_fuel_limit": "Límite de combustible de las tortugas",
|
||||
"gui.computercraft.config.turtle.normal_fuel_limit.tooltip": "Límite de combustible para las Tortugas.\nRango: > 0",
|
||||
"gui.computercraft.config.turtle.tooltip": "Varias opciones relacionadas con las tortugas.",
|
||||
"gui.computercraft.config.upload_max_size": "Límite de tamaño del archivo subido (bytes)",
|
||||
"gui.computercraft.config.upload_max_size.tooltip": "El límite de subida por archivo, en bytes. Debe estar en un rango de entre 1 KiB y 16 MiB.\nTen en cuenta que las subidas son procesadas en un un solo tick - archivos grandes o\nun rendimiento de internet malo puede paralizar el hilo de red. Y tamién ten en cuenta el espacio en disco!\nRango: 1024 ~ 16777216",
|
||||
"gui.computercraft.config.upload_nag_delay": "Retraso de subida nag",
|
||||
"gui.computercraft.config.upload_nag_delay.tooltip": "El retraso en segundos después de los cuales notificaremos las importaciones no manejadas. Establecer en 0 para deshabilitar.\nRango: 0 ~ 60",
|
||||
"gui.computercraft.pocket_computer_overlay": "Computadora de bolsillo abierta. Pulsa ESC para cerrar.",
|
||||
"gui.computercraft.terminal": "Terminal de la Computadora",
|
||||
"gui.computercraft.tooltip.computer_id": "ID de la Computadora: %s",
|
||||
"gui.computercraft.tooltip.copy": "Copiar al portapapeles",
|
||||
"gui.computercraft.tooltip.disk_id": "ID del disquete: %s",
|
||||
"gui.computercraft.tooltip.terminate": "Detener el código en ejecución",
|
||||
"gui.computercraft.tooltip.terminate.key": "Mantenga Ctrl+T",
|
||||
"gui.computercraft.tooltip.turn_off": "Apagar esta computadora",
|
||||
"gui.computercraft.tooltip.turn_off.key": "Mantenga Ctrl+S",
|
||||
"gui.computercraft.tooltip.turn_on": "Encender esta computadora",
|
||||
"gui.computercraft.upload.failed": "Subida fallida",
|
||||
"gui.computercraft.upload.failed.computer_off": "Debes encender la computadora antes de subir archivos.",
|
||||
"gui.computercraft.upload.failed.corrupted": "Archivos corruptos al subir. Por favor, inténtelo de nuevo.",
|
||||
"gui.computercraft.upload.failed.generic": "Error al subir archivos (%s)",
|
||||
"gui.computercraft.upload.failed.name_too_long": "Los nombres de los archivos son demasiado largos para ser cargados.",
|
||||
"gui.computercraft.upload.failed.too_many_files": "No se pueden subir tantos archivos.",
|
||||
"gui.computercraft.upload.failed.too_much": "Tus archivos son demasiado grandes para ser subidos.",
|
||||
"gui.computercraft.upload.no_response": "Transfiriendo archivos",
|
||||
"gui.computercraft.upload.no_response.msg": "Tu computadora no ha usado tus archivos transferidos. Es posible que debas ejecutar el programa %s e intentar de nuevo.",
|
||||
"item.computercraft.disk": "Disquete",
|
||||
"item.computercraft.pocket_computer_advanced": "Ordenador de bolsillo avanzado",
|
||||
"item.computercraft.pocket_computer_advanced.upgraded": "Ordenador de bolsillo %s avanzado",
|
||||
@ -56,6 +200,25 @@
|
||||
"item.computercraft.printed_page": "Página impresa",
|
||||
"item.computercraft.printed_pages": "Páginas impresas",
|
||||
"item.computercraft.treasure_disk": "Disquete (Tesoro)",
|
||||
"itemGroup.computercraft": "ComputerCraft",
|
||||
"tag.item.computercraft.computer": "Computadoras",
|
||||
"tag.item.computercraft.monitor": "Monitores",
|
||||
"tag.item.computercraft.turtle": "Tortugas",
|
||||
"tag.item.computercraft.wired_modem": "Módems cableados",
|
||||
"tracking_field.computercraft.avg": "%s (promedio)",
|
||||
"tracking_field.computercraft.computer_tasks.name": "Tareas",
|
||||
"tracking_field.computercraft.count": "%s (cuenta)",
|
||||
"tracking_field.computercraft.fs.name": "Operaciones del sistema de archivos",
|
||||
"tracking_field.computercraft.http_download.name": "Descarga HTTP",
|
||||
"tracking_field.computercraft.http_requests.name": "Peticiones HTTP",
|
||||
"tracking_field.computercraft.http_upload.name": "Subida HTTP",
|
||||
"tracking_field.computercraft.java_allocation.name": "Asignaciones de Java",
|
||||
"tracking_field.computercraft.max": "%s (max)",
|
||||
"tracking_field.computercraft.peripheral.name": "Llamadas del periférico",
|
||||
"tracking_field.computercraft.server_tasks.name": "Tareas del servidor",
|
||||
"tracking_field.computercraft.turtle_ops.name": "Operaciones de la Tortuga",
|
||||
"tracking_field.computercraft.websocket_incoming.name": "Websocket entrante",
|
||||
"tracking_field.computercraft.websocket_outgoing.name": "Websocket saliente",
|
||||
"upgrade.computercraft.speaker.adjective": "ruidosa",
|
||||
"upgrade.computercraft.wireless_modem_advanced.adjective": "ender",
|
||||
"upgrade.computercraft.wireless_modem_normal.adjective": "sin cables",
|
||||
|
@ -32,8 +32,6 @@
|
||||
"commands.computercraft.generic.additional_rows": "%d lignes supplémentaires…",
|
||||
"commands.computercraft.generic.exception": "Exception non gérée (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<pas de position>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "O",
|
||||
"commands.computercraft.help.desc": "Affiche ce message d'aide",
|
||||
"commands.computercraft.help.no_children": "%s n'a pas de sous-commandes",
|
||||
|
@ -1,15 +1,19 @@
|
||||
{
|
||||
"argument.computercraft.argument_expected": "È previsto un argomento",
|
||||
"argument.computercraft.computer.distance": "Distanza dall'entità",
|
||||
"argument.computercraft.computer.family": "Famiglia computer",
|
||||
"argument.computercraft.computer.id": "ID computer",
|
||||
"argument.computercraft.computer.instance": "ID istanza unica",
|
||||
"argument.computercraft.computer.label": "Etichetta computer",
|
||||
"argument.computercraft.computer.many_matching": "Molteplici computer che combaciano con '%s' (istanze %s)",
|
||||
"argument.computercraft.computer.no_matching": "Nessun computer che combacia con '%s'",
|
||||
"argument.computercraft.tracking_field.no_field": "Campo sconosciuto '%s'",
|
||||
"argument.computercraft.unknown_computer_family": "Famiglia computer '%s' sconosciuta",
|
||||
"block.computercraft.cable": "Cavo Di Rete",
|
||||
"block.computercraft.computer_advanced": "Computer Avanzato",
|
||||
"block.computercraft.computer_command": "Computer Comando",
|
||||
"block.computercraft.computer_normal": "Computer",
|
||||
"block.computercraft.disk_drive": "Lettore Di Dischi",
|
||||
"block.computercraft.monitor_advanced": "Monitor Avanzato",
|
||||
"block.computercraft.monitor_normal": "Monitor",
|
||||
"block.computercraft.printer": "Stampante",
|
||||
"block.computercraft.speaker": "Altoparlante",
|
||||
"block.computercraft.turtle_advanced": "Tartaruga Avanzata",
|
||||
@ -31,9 +35,6 @@
|
||||
"commands.computercraft.dump.synopsis": "Mostra lo stato dei computer.",
|
||||
"commands.computercraft.generic.additional_rows": "%d colonne aggiuntive…",
|
||||
"commands.computercraft.generic.exception": "Eccezione non gestita (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<no posizione>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "S",
|
||||
"commands.computercraft.help.desc": "Mostra questo messaggio d'aiuto",
|
||||
"commands.computercraft.help.no_children": "%s non ha sottocomandi",
|
||||
@ -49,7 +50,6 @@
|
||||
"commands.computercraft.tp.desc": "Teletrasporta alla posizione di un computer. Puoi specificare il computer con l'instance id (e.g. 123) o con l'id (e.g. #123).",
|
||||
"commands.computercraft.tp.synopsis": "Teletrasporta al computer specificato.",
|
||||
"commands.computercraft.track.desc": "Monitora per quanto tempo i computer vengono eseguiti e quanti eventi ricevono. Questo comando fornisce le informazioni in modo simile a /forge track e può essere utile per diagnosticare il lag.",
|
||||
"commands.computercraft.track.dump.computer": "Computer",
|
||||
"commands.computercraft.track.dump.desc": "Cancella gli ultimi risultati del monitoraggio dei computer.",
|
||||
"commands.computercraft.track.dump.no_timings": "No ci sono tempi disponibili",
|
||||
"commands.computercraft.track.dump.synopsis": "Cancella gli ultimi risultati monitorati",
|
||||
@ -74,6 +74,8 @@
|
||||
"gui.computercraft.config.computer_space_limit.tooltip": "Limite di spazio di archiviazione per i computer e le tartarughe, in byte.",
|
||||
"gui.computercraft.config.default_computer_settings": "Impostazioni Computer predefinite",
|
||||
"gui.computercraft.config.default_computer_settings.tooltip": "Una lista di impostazioni predefinite per i nuovi computer, separate da virgola.\nEsempio: \"shell.autocomplete=false,lua.autocomplete=false,edit.autocomplete=false\"\ndisattiverà tutti gli autocompletamenti.",
|
||||
"gui.computercraft.config.disabled_generic_methods": "Metodi generici disattivati",
|
||||
"gui.computercraft.config.disabled_generic_methods.tooltip": "Una lista di metodi generici o sorgenti di metodi da disattivare. I metodi generici sono\nmetodi aggiunti a blocchi/entità blocchi quando non c'è un provider della periferica esplicito.\nQuesto include metodi dell'inventario (ad es. inventory.getItemDetail, inventory.pushItems) e,\nse su Forge, i metodi fluid_storage e energy_storage.\nI metodi in questa lista possono essere sia un gruppo intero di metodi (computer:inventory)\no un singolo metodo (computer:inventory#pushItems).\n",
|
||||
"gui.computercraft.config.execution": "Esecuzione",
|
||||
"gui.computercraft.config.execution.computer_threads": "Threads computer",
|
||||
"gui.computercraft.config.execution.computer_threads.tooltip": "Imposta la quantità di thread che possono eseguire i computer. Un numero più alto significa\nche più computer possono essere eseguiti alla volta, ma può indurre a lag. Alcune mod potrebbero\nnon funzionare con numeri di thread maggiore a 1. Usare con cautela.\nRange: > 1",
|
||||
@ -84,7 +86,6 @@
|
||||
"gui.computercraft.config.execution.tooltip": "Controlla comportamento esecuzione dei computer. Questo è largamente utilizzato\nper ritoccare la performance dei server, e generale non dovrebbe essere toccato.",
|
||||
"gui.computercraft.config.floppy_space_limit": "Limite spazio Disco Floppy (bytes)",
|
||||
"gui.computercraft.config.floppy_space_limit.tooltip": "Limite di spazio di archiviazione per i dischi floppy, in byte.",
|
||||
"gui.computercraft.config.http": "HTTP",
|
||||
"gui.computercraft.config.http.bandwidth": "Banda larga",
|
||||
"gui.computercraft.config.http.bandwidth.global_download": "Limite download globale",
|
||||
"gui.computercraft.config.http.bandwidth.global_download.tooltip": "Numero di byte che possono essere scaricati in un secondo. Questo è condiviso tra tutti i computer. (bytes/s).\nRange: > 1",
|
||||
@ -97,7 +98,6 @@
|
||||
"gui.computercraft.config.http.max_requests.tooltip": "Il numero di richieste http che un computer può fare alla volta. Ulteriori richieste\nverranno messe in coda, ed inviate quando le richieste correnti sono terminate.\nImposta a 0 per illimitato.\nRange: > 0",
|
||||
"gui.computercraft.config.http.max_websockets": "Connessioni websocket massime",
|
||||
"gui.computercraft.config.http.max_websockets.tooltip": "Il numero di websocket che un computer può avere aperte allo stesso momento.\nImposta a 0 per illimitato.\nRange: > 1",
|
||||
"gui.computercraft.config.http.proxy": "Proxy",
|
||||
"gui.computercraft.config.http.proxy.host": "Nome host",
|
||||
"gui.computercraft.config.http.proxy.host.tooltip": "Il nome dell'host o l'indirizzo IP del server proxy.",
|
||||
"gui.computercraft.config.http.proxy.port": "Porta",
|
||||
@ -135,24 +135,17 @@
|
||||
"gui.computercraft.config.peripheral.monitor_bandwidth.tooltip": "Il limite di quanti dati dei monitor possono essere inviati *al tick*. Nota:\n - La banda larga è misurata prima della compressione, così che il dato inviato al client è\n più piccolo.\n - Questo ignora il numero di giocatori a cui viene inviato il pacchetto. Aggiornare un monitor\n per un giocatore consuma lo stesso limite di banda larga dell'invio a 20 giocatori.\n - Un monitor alla massima grandezza invia ~25kb di dati. Quindi il valore predefinito (1MB) concede\n ~40 monitor di essere aggiornati in un singolo tick.\nImposta a 0 per disattivare.\nRange: > 0",
|
||||
"gui.computercraft.config.peripheral.tooltip": "Opzioni varie riguardo le periferiche.",
|
||||
"gui.computercraft.config.term_sizes": "Dimensioni terminale",
|
||||
"gui.computercraft.config.term_sizes.computer": "Computer",
|
||||
"gui.computercraft.config.term_sizes.computer.height": "Altezza terminale",
|
||||
"gui.computercraft.config.term_sizes.computer.height.tooltip": "Range: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.computer.tooltip": "Dimensioni del terminale dei computer.",
|
||||
"gui.computercraft.config.term_sizes.computer.width": "Larghezza terminale",
|
||||
"gui.computercraft.config.term_sizes.computer.width.tooltip": "Intervallo: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.monitor": "Monitor",
|
||||
"gui.computercraft.config.term_sizes.monitor.height": "Massima altezza del monitor",
|
||||
"gui.computercraft.config.term_sizes.monitor.height.tooltip": "Range: 1 ~ 32",
|
||||
"gui.computercraft.config.term_sizes.monitor.tooltip": "Massima grandezza dei monitor (in blocchi).",
|
||||
"gui.computercraft.config.term_sizes.monitor.width": "Larghezza massima del monitor",
|
||||
"gui.computercraft.config.term_sizes.monitor.width.tooltip": "Range: 1 ~ 32",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer": "Computer Tascabile",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.height": "Altezza terminale",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.height.tooltip": "Range: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.tooltip": "Dimensioni del terminale dei computer tascabili.",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.width": "Larghezza terminale",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.width.tooltip": "Range: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.tooltip": "Configura le dimensioni dei terminali di vari computer.\nTerminali più grandi richiedono più banda larga, usa con cautela.",
|
||||
"gui.computercraft.config.turtle": "Tartarughe",
|
||||
"gui.computercraft.config.turtle.advanced_fuel_limit": "Limite carburante tartarughe avanzate",
|
||||
@ -196,7 +189,10 @@
|
||||
"item.computercraft.printed_page": "Pagina Stampata",
|
||||
"item.computercraft.printed_pages": "Pagine Stampate",
|
||||
"item.computercraft.treasure_disk": "Disco Floppy",
|
||||
"itemGroup.computercraft": "ComputerCraft",
|
||||
"tag.item.computercraft.computer": "Computer",
|
||||
"tag.item.computercraft.monitor": "Monitor",
|
||||
"tag.item.computercraft.turtle": "Tartarughe",
|
||||
"tag.item.computercraft.wired_modem": "Modem cablati",
|
||||
"tracking_field.computercraft.avg": "%s (media)",
|
||||
"tracking_field.computercraft.computer_tasks.name": "Attività",
|
||||
"tracking_field.computercraft.count": "%s (conta)",
|
||||
@ -204,6 +200,7 @@
|
||||
"tracking_field.computercraft.http_download.name": "Download HTTP",
|
||||
"tracking_field.computercraft.http_requests.name": "Richieste HTTP",
|
||||
"tracking_field.computercraft.http_upload.name": "Upload HTTP",
|
||||
"tracking_field.computercraft.java_allocation.name": "Allocazioni Java",
|
||||
"tracking_field.computercraft.max": "%s (massimo)",
|
||||
"tracking_field.computercraft.peripheral.name": "Chiamate alle periferiche",
|
||||
"tracking_field.computercraft.server_tasks.name": "Attività server",
|
||||
@ -211,25 +208,10 @@
|
||||
"tracking_field.computercraft.websocket_incoming.name": "Websocket in arrivo",
|
||||
"tracking_field.computercraft.websocket_outgoing.name": "Websocket in uscita",
|
||||
"upgrade.computercraft.speaker.adjective": "Rumoroso",
|
||||
"upgrade.computercraft.wireless_modem_advanced.adjective": "Ender",
|
||||
"upgrade.computercraft.wireless_modem_normal.adjective": "Wireless",
|
||||
"upgrade.minecraft.crafting_table.adjective": "Artigiana",
|
||||
"upgrade.minecraft.diamond_axe.adjective": "Taglialegna",
|
||||
"upgrade.minecraft.diamond_hoe.adjective": "Contadina",
|
||||
"upgrade.minecraft.diamond_pickaxe.adjective": "Minatrice",
|
||||
"upgrade.minecraft.diamond_shovel.adjective": "Scavatrice",
|
||||
"upgrade.minecraft.diamond_sword.adjective": "Da Combattimento",
|
||||
"tag.item.computercraft.computer": "Computer",
|
||||
"tag.item.computercraft.wired_modem": "Modem cablati",
|
||||
"argument.computercraft.computer.distance": "Distanza dall'entità",
|
||||
"argument.computercraft.computer.family": "Famiglia computer",
|
||||
"argument.computercraft.computer.id": "ID computer",
|
||||
"argument.computercraft.computer.instance": "ID istanza unica",
|
||||
"argument.computercraft.computer.label": "Etichetta computer",
|
||||
"argument.computercraft.unknown_computer_family": "Famiglia computer '%s' sconosciuta",
|
||||
"gui.computercraft.config.disabled_generic_methods": "Metodi generici disattivati",
|
||||
"gui.computercraft.config.disabled_generic_methods.tooltip": "Una lista di metodi generici o sorgenti di metodi da disattivare. I metodi generici sono\nmetodi aggiunti a blocchi/entità blocchi quando non c'è un provider della periferica esplicito.\nQuesto include metodi dell'inventario (ad es. inventory.getItemDetail, inventory.pushItems) e,\nse su Forge, i metodi fluid_storage e energy_storage.\nI metodi in questa lista possono essere sia un gruppo intero di metodi (computer:inventory)\no un singolo metodo (computer:inventory#pushItems).\n",
|
||||
"tag.item.computercraft.monitor": "Monitor",
|
||||
"tag.item.computercraft.turtle": "Tartarughe",
|
||||
"tracking_field.computercraft.java_allocation.name": "Allocazioni Java"
|
||||
"upgrade.minecraft.diamond_sword.adjective": "Da Combattimento"
|
||||
}
|
||||
|
@ -38,8 +38,6 @@
|
||||
"commands.computercraft.generic.additional_rows": "%d行を追加…",
|
||||
"commands.computercraft.generic.exception": "未処理の例外 (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<no pos>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "Y",
|
||||
"commands.computercraft.help.desc": "このヘルプメッセージを表示します",
|
||||
"commands.computercraft.help.no_children": "%s にサブコマンドはありません",
|
||||
|
@ -32,8 +32,6 @@
|
||||
"commands.computercraft.generic.additional_rows": "%d개의 추가 행…",
|
||||
"commands.computercraft.generic.exception": "처리되지 않은 예외 (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<no pos>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "Y",
|
||||
"commands.computercraft.help.desc": "이 도움말 메시지를 표시합니다.",
|
||||
"commands.computercraft.help.no_children": "%s에는 하위 명령어가 없습니다.",
|
||||
|
@ -10,7 +10,6 @@
|
||||
"block.computercraft.disk_drive": "Diskstasjon",
|
||||
"block.computercraft.monitor_advanced": "Avansert Skjerm",
|
||||
"block.computercraft.monitor_normal": "Skjerm",
|
||||
"block.computercraft.printer": "Printer",
|
||||
"block.computercraft.speaker": "Høytaler",
|
||||
"block.computercraft.turtle_advanced": "Avansert Skilpadde",
|
||||
"block.computercraft.turtle_advanced.upgraded": "Avansert %s Skilpadde",
|
||||
@ -20,7 +19,6 @@
|
||||
"block.computercraft.turtle_normal.upgraded_twice": "%s %s Skilpadde",
|
||||
"block.computercraft.wired_modem": "Kablet Modem",
|
||||
"block.computercraft.wired_modem_full": "Kablet Modem",
|
||||
"block.computercraft.wireless_modem_advanced": "Ender Modem",
|
||||
"block.computercraft.wireless_modem_normal": "Trådløst Modem",
|
||||
"chat.computercraft.wired_modem.peripheral_connected": "Perifer \"%s\" koblet til nettverk",
|
||||
"chat.computercraft.wired_modem.peripheral_disconnected": "Perifer \"%s\" koblet fra nettverk",
|
||||
@ -31,9 +29,6 @@
|
||||
"commands.computercraft.dump.synopsis": "Viser statusen av datamaskiner.",
|
||||
"commands.computercraft.generic.additional_rows": "%d flere rader…",
|
||||
"commands.computercraft.generic.exception": "Uhåndtert unntak (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<ingen posisjon>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "J",
|
||||
"commands.computercraft.help.desc": "Viser denne hjelpemeldingen",
|
||||
"commands.computercraft.help.no_children": "%s har ingen underkommandoer",
|
||||
@ -69,7 +64,6 @@
|
||||
"commands.computercraft.view.not_player": "Kan kun åpne terminal for spillere",
|
||||
"commands.computercraft.view.synopsis": "Vis terminal til en datamaskin.",
|
||||
"gui.computercraft.config.command_require_creative": "Kommando datamaskiner trenger kreativ",
|
||||
"gui.computercraft.config.http": "HTTP",
|
||||
"gui.computercraft.config.http.enabled": "Slå på HTTP APIen",
|
||||
"gui.computercraft.config.http.rules": "Godta/Avslå regler",
|
||||
"gui.computercraft.config.monitor_distance": "Skjerm distanse",
|
||||
@ -88,7 +82,6 @@
|
||||
"gui.computercraft.terminal": "Datamaskin terminal",
|
||||
"gui.computercraft.tooltip.computer_id": "Datamaskin ID: %s",
|
||||
"gui.computercraft.tooltip.copy": "Kopier til utklippstavle",
|
||||
"gui.computercraft.tooltip.disk_id": "Disk ID: %s",
|
||||
"gui.computercraft.tooltip.terminate": "Stopp den kjørende koden",
|
||||
"gui.computercraft.tooltip.terminate.key": "Hold Ctrl + T",
|
||||
"gui.computercraft.tooltip.turn_off": "Skru denne datamaskinen av",
|
||||
@ -102,7 +95,6 @@
|
||||
"gui.computercraft.upload.failed.too_many_files": "Kan ikke laste opp så mange filer.",
|
||||
"gui.computercraft.upload.failed.too_much": "Filene dine er for store for å kunne bli lastet opp.",
|
||||
"gui.computercraft.upload.no_response": "Overfører Filer",
|
||||
"item.computercraft.disk": "Floppy Disk",
|
||||
"item.computercraft.pocket_computer_advanced": "Avansert Lomme Datamaskin",
|
||||
"item.computercraft.pocket_computer_advanced.upgraded": "Avansert %s Lomme Datamaskin",
|
||||
"item.computercraft.pocket_computer_normal": "Lomme datamaskin",
|
||||
@ -110,8 +102,6 @@
|
||||
"item.computercraft.printed_book": "Printet Bok",
|
||||
"item.computercraft.printed_page": "Printet Side",
|
||||
"item.computercraft.printed_pages": "Printet Sider",
|
||||
"item.computercraft.treasure_disk": "Floppy Disk",
|
||||
"itemGroup.computercraft": "ComputerCraft",
|
||||
"tracking_field.computercraft.computer_tasks.name": "Oppgaver",
|
||||
"tracking_field.computercraft.count": "%s (antall)",
|
||||
"tracking_field.computercraft.fs.name": "Filsystem operasjoner",
|
||||
@ -123,7 +113,6 @@
|
||||
"tracking_field.computercraft.websocket_incoming.name": "Innkommende Websocket",
|
||||
"tracking_field.computercraft.websocket_outgoing.name": "Utgående Websocket",
|
||||
"upgrade.computercraft.speaker.adjective": "Høylydt",
|
||||
"upgrade.computercraft.wireless_modem_advanced.adjective": "Ender",
|
||||
"upgrade.computercraft.wireless_modem_normal.adjective": "Trådløs",
|
||||
"upgrade.minecraft.crafting_table.adjective": "Håndverks",
|
||||
"upgrade.minecraft.diamond_axe.adjective": "Hoggende",
|
||||
|
@ -32,8 +32,6 @@
|
||||
"commands.computercraft.generic.additional_rows": "%d additionele rijen…",
|
||||
"commands.computercraft.generic.exception": "Niet-afgehandelde exception (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<geen positie>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "J",
|
||||
"commands.computercraft.help.desc": "Geeft dit hulpbericht weer",
|
||||
"commands.computercraft.help.no_children": "%s heeft geen sub-commando's",
|
||||
|
@ -19,8 +19,6 @@
|
||||
"commands.computercraft.dump.desc": "Wyświetla status wszystkich komputerów lub informacje o jednym komputerze. Możesz wybrać numer sesji komputera (np. 123), ID komputera (np. #123) lub jego etykietę (np. \"@Mój Komputer\").",
|
||||
"commands.computercraft.dump.open_path": "Przeglądaj pliki tego komputera",
|
||||
"commands.computercraft.dump.synopsis": "Wyświetl stan komputerów.",
|
||||
"commands.computercraft.generic.no_position": "<brak pozycji>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "T",
|
||||
"commands.computercraft.help.no_children": "%s nie ma pod-komend",
|
||||
"commands.computercraft.help.no_command": "Nie odnaleziono komendy '%s'",
|
||||
|
@ -1,4 +1,14 @@
|
||||
{
|
||||
"argument.computercraft.argument_expected": "Argumento esperado",
|
||||
"argument.computercraft.computer.distance": "Distância para a entidade",
|
||||
"argument.computercraft.computer.family": "Família de Computadores",
|
||||
"argument.computercraft.computer.id": "ID do Computador",
|
||||
"argument.computercraft.computer.instance": "ID de Instância Única",
|
||||
"argument.computercraft.computer.label": "Rótulo do Computador",
|
||||
"argument.computercraft.computer.many_matching": "Vários computadores correspondendo a '%s' (instâncias %s)",
|
||||
"argument.computercraft.computer.no_matching": "Sem computadores correspondentes a '%s'",
|
||||
"argument.computercraft.tracking_field.no_field": "Campo desconhecido '%s'",
|
||||
"argument.computercraft.unknown_computer_family": "Família de computador desconhecida '%s'",
|
||||
"block.computercraft.cable": "Cabo de Rede",
|
||||
"block.computercraft.computer_advanced": "Computador Avançado",
|
||||
"block.computercraft.computer_command": "Computador de Comandos",
|
||||
@ -23,43 +33,166 @@
|
||||
"commands.computercraft.desc": "O comando /computercraft providencia várias ferramentas de depuração e administração para controle e interação com computadores.",
|
||||
"commands.computercraft.dump.action": "Ver mais informação sobre este computador",
|
||||
"commands.computercraft.dump.desc": "Mostra o status de todos os computadores ou uma informação específica sobre um computador. Você pode especificar o id de instância do computador (ex.: 123), id do computador (ex.: #123) ou o rótulo (ex.: \"@MeuComputador\").",
|
||||
"commands.computercraft.dump.open_path": "Ver arquivos deste computador",
|
||||
"commands.computercraft.dump.synopsis": "Mostra status de computadores.",
|
||||
"commands.computercraft.generic.additional_rows": "%d linhas adicionais…",
|
||||
"commands.computercraft.generic.exception": "Exceção não tratada (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.yes": "S",
|
||||
"commands.computercraft.help.desc": "Mostra essa mensagem de ajuda",
|
||||
"commands.computercraft.help.no_children": "%s não tem sub-comandos",
|
||||
"commands.computercraft.help.no_command": "Comando '%s' não existe",
|
||||
"commands.computercraft.help.synopsis": "Providencia ajuda para um comando específico",
|
||||
"commands.computercraft.queue.desc": "Envie um evento computer_command para um computador de comando, passando os argumentos adicionais. Isso é projetado principalmente para criadores de mapas, funcionando como uma versão mais amigável do computador do comando /trigger. Qualquer jogador pode executar o comando, que provavelmente será feito por meio do evento de clique de um componente de texto.",
|
||||
"commands.computercraft.queue.synopsis": "Envie um evento computer_command para um computador de comando",
|
||||
"commands.computercraft.shutdown.desc": "Desliga os computadores em escuta ou todos caso não tenha sido especificado. Você pode especificar o id de instância do computador (ex.: 123), id do computador (ex.: #123) ou o rótulo (ex.: \"@MeuComputador\").",
|
||||
"commands.computercraft.shutdown.done": "Desliga %s/%s computadores",
|
||||
"commands.computercraft.shutdown.synopsis": "Desliga computadores remotamente.",
|
||||
"commands.computercraft.synopsis": "Vários comandos para controlar computadores.",
|
||||
"commands.computercraft.tp.action": "Teletransportar para este computador",
|
||||
"commands.computercraft.tp.desc": "Teletransporte para a localização de um computador. Você pode especificar o Id da instância do computador (por exemplo, 123) ou o Id do computador (por exemplo, #123).",
|
||||
"commands.computercraft.tp.synopsis": "Teleprota para um computador específico.",
|
||||
"commands.computercraft.track.desc": "Rastreie quanto tempo os computadores executam, bem como quantos eventos eles manipulam. Isso apresenta informações de maneira semelhante ao /forge track e pode ser útil para diagnosticar lag.",
|
||||
"commands.computercraft.track.dump.computer": "Computador",
|
||||
"commands.computercraft.track.dump.desc": "Despeje os últimos resultados do rastreamento de computadores.",
|
||||
"commands.computercraft.track.dump.no_timings": "Nenhum tempo disponível",
|
||||
"commands.computercraft.track.dump.synopsis": "Despeje os últimos resultados de rastreamento",
|
||||
"commands.computercraft.track.start.desc": "Comece a rastrear os tempos de execução e contagens de eventos de todos os computadores. Isso descartará os resultados de execuções anteriores.",
|
||||
"commands.computercraft.track.start.stop": "Execute %s para parar o rastreamento e visualizar os resultados",
|
||||
"commands.computercraft.track.start.synopsis": "Comece a rastrear todos os computadores",
|
||||
"commands.computercraft.track.stop.action": "Clique para parar o rastreamento",
|
||||
"commands.computercraft.track.stop.desc": "Parar de rastrear eventos de todos os computadores e tempos de execução",
|
||||
"commands.computercraft.track.stop.not_enabled": "Não está rastreando computadores",
|
||||
"commands.computercraft.track.stop.synopsis": "Parar de rastrear todos os computadores",
|
||||
"commands.computercraft.track.synopsis": "Acompanhe os tempos de execução para computadores.",
|
||||
"commands.computercraft.turn_on.desc": "Liga os computadores em escuta. Você pode especificar o id de instância do computador (ex.: 123), id do computador (ex.: #123) ou o rótulo (ex.: \"@MeuComputador\").",
|
||||
"commands.computercraft.turn_on.done": "Ligou %s/%s computadores",
|
||||
"commands.computercraft.turn_on.synopsis": "Liga computadores remotamente.",
|
||||
"commands.computercraft.view.action": "Visualizar este computador",
|
||||
"commands.computercraft.view.desc": "Abra o terminal de um computador, permitindo o controle remoto de um computador. Isso não fornece acesso aos inventários das tartarugas. Você pode especificar o Id da instância do computador (por exemplo, 123) ou o Id do computador (por exemplo, #123).",
|
||||
"commands.computercraft.view.not_player": "Não é possível abrir terminal para um não-jogador",
|
||||
"commands.computercraft.view.synopsis": "Ver o terminal de um computador.",
|
||||
"gui.computercraft.config.command_require_creative": "Computadores de comando requerem criativo",
|
||||
"gui.computercraft.config.command_require_creative.tooltip": "Exigir que os jogadores estejam no modo criativo e tenham permissões de operador (opped) para interagir com computadores de comando. Este é o comportamento padrão dos blocos de comando no modo vanilla.",
|
||||
"gui.computercraft.config.computer_space_limit": "Limite de espaço dos Computadores (bytes)",
|
||||
"gui.computercraft.config.computer_space_limit.tooltip": "O limite de espaço em disco para computadores e tartarugas, em bytes.",
|
||||
"gui.computercraft.config.default_computer_settings": "Configurações padrão para Computadores",
|
||||
"gui.computercraft.config.default_computer_settings.tooltip": "Uma lista separada por vírgulas das configurações padrão do sistema a serem definidas em novos computadores. \nExemplo: \"shell.autocomplete=false,lua.autocomplete=false,edit.autocomplete=false\" desativará todas as funcionalidades de autocompletar.",
|
||||
"gui.computercraft.config.disabled_generic_methods": "Métodos genéricos desativados",
|
||||
"gui.computercraft.config.disabled_generic_methods.tooltip": "Uma lista de métodos genéricos ou fontes de métodos a serem desativados. Métodos genéricos são aqueles adicionados a um bloco ou entidade de bloco quando não há um provedor de periféricos explícito. Isso inclui métodos de inventário (ou seja, inventory.getItemDetail, inventory.pushItems) e, se estiver usando Forge, os métodos fluid_storage e energy_storage. \nOs métodos nesta lista podem ser um grupo inteiro de métodos (computercraft:inventory) ou um único método (computercraft:inventory#pushItems).\n",
|
||||
"gui.computercraft.config.execution": "Execução",
|
||||
"gui.computercraft.config.execution.computer_threads": "Threads por computador",
|
||||
"gui.computercraft.config.execution.computer_threads.tooltip": "Defina o número de threads que os computadores podem utilizar. Um número maior significa que mais computadores podem ser executados ao mesmo tempo, mas pode causar lag. Observe que alguns mods podem não funcionar com uma contagem de threads superior a 1. Use com cautela. \nIntervalo: > 1",
|
||||
"gui.computercraft.config.execution.max_main_computer_time": "Limite de tempo do computador por tick do servidor",
|
||||
"gui.computercraft.config.execution.max_main_computer_time.tooltip": "O tempo máximo ideal que um computador pode executar em um tick, em milissegundos. \nObserve que é bastante provável que ultrapassemos esse limite, pois não há como saber exatamente quanto tempo uma operação levará - isso visa ser o limite superior do tempo médio. \nIntervalo: > 1",
|
||||
"gui.computercraft.config.execution.max_main_global_time": "Limite de tempo global por tick do servidor",
|
||||
"gui.computercraft.config.execution.max_main_global_time.tooltip": "O tempo máximo que pode ser gasto executando tarefas em um único tick, em milissegundos. \nObserve que é bastante provável que ultrapassemos esse limite, pois não há como saber exatamente quanto tempo uma operação levará - isso visa ser o limite superior do tempo médio. \nIntervalo: > 1",
|
||||
"gui.computercraft.config.execution.tooltip": "Controla o comportamento de execução dos computadores. Isso é principalmente destinado ao ajuste fino dos servidores e, geralmente, não deve ser alterado.",
|
||||
"gui.computercraft.config.floppy_space_limit": "Limite de espaço dos Disquetes (bytes)",
|
||||
"gui.computercraft.config.floppy_space_limit.tooltip": "O limite de espaço em disco para disquete em bytes.",
|
||||
"gui.computercraft.config.http": "HTTP",
|
||||
"gui.computercraft.config.http.bandwidth": "Largura de banda",
|
||||
"gui.computercraft.config.http.bandwidth.global_download": "Limite de download global",
|
||||
"gui.computercraft.config.http.bandwidth.global_download.tooltip": "O número de bytes que podem ser baixados em um segundo. Isso é compartilhado entre todos os computadores. (bytes/s). \nIntervalo: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload": "Limite de upload global",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload.tooltip": "O número de bytes que podem ser enviados em um segundo. Isso é compartilhado entre todos os computadores. (bytes/s). \nIntervalo: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.tooltip": "Limita a banda usada pelos computadores.",
|
||||
"gui.computercraft.config.http.enabled": "Habilitar a biblioteca de HTTP",
|
||||
"gui.computercraft.config.http.enabled.tooltip": "Ative a API \"http\" nos Computadores. Desativar isso também desativa os programas \"pastebin\" e \"wget\", dos quais muitos usuários dependem. É recomendado deixar isso ativado e usar a opção de configuração \"rules\" para impor um controle mais detalhado.",
|
||||
"gui.computercraft.config.http.max_requests": "Limite de conexões paralelas",
|
||||
"gui.computercraft.config.http.max_requests.tooltip": "O número de solicitações Http que um computador pode fazer ao mesmo tempo. Solicitações adicionais serão enfileiradas e enviadas quando as solicitações em execução forem concluídas. Defina como 0 para ilimitado.\nIntervalo: > 0",
|
||||
"gui.computercraft.config.http.max_websockets": "Limite de conexões websocket",
|
||||
"gui.computercraft.config.http.max_websockets.tooltip": "O número de websockets que um computador pode ter abertos ao mesmo tempo.\nIntervalo: > 1",
|
||||
"gui.computercraft.config.http.proxy": "Proxy",
|
||||
"gui.computercraft.config.http.proxy.host": "Nome de host",
|
||||
"gui.computercraft.config.http.proxy.host.tooltip": "O nome do host ou endereço IP do servidor proxy.",
|
||||
"gui.computercraft.config.http.proxy.port": "Porta",
|
||||
"gui.computercraft.config.http.proxy.port.tooltip": "A porta do servidor proxy.\nIntervalo: 1 ~ 65536",
|
||||
"gui.computercraft.config.http.proxy.tooltip": "Tunéis de solicitações HTTP e websocket através de um servidor proxy. Afeta apenas as regras HTTP com \"use_proxy\" definido como verdadeiro (desligado por padrão). Se a autenticação for necessária para o proxy, crie um arquivo \"computercraft-proxy.pw\" no mesmo diretório que \"computercraft-server.toml\", contendo o nome de usuário e a senha separados por dois pontos, por exemplo, \"meuusuario:minhasenha\". Para proxies SOCKS4, apenas o nome de usuário é necessário.",
|
||||
"gui.computercraft.config.http.proxy.type": "Tipo de proxy",
|
||||
"gui.computercraft.config.http.proxy.type.tooltip": "O tipo de proxy para usar.\nValores permitidos: HTTP, HTTPS, SOCKS4, SOCKS5",
|
||||
"gui.computercraft.config.http.rules": "Regras Permitir/Negar",
|
||||
"gui.computercraft.config.http.rules.tooltip": "Uma lista de regras que controlam o comportamento da API \"http\" para domínios ou IPs específicos. Cada regra corresponde a um nome de host e uma porta opcional, e então define várias propriedades para a solicitação. As regras são avaliadas em ordem, o que significa que regras anteriores sobrescrevem as posteriores.\n\nPropriedades válidas:\n- \"host\" (obrigatório): O domínio ou endereço IP que esta regra corresponde. Isso pode ser um nome de domínio (\"pastebin.com\"), um curinga (\"*.pastebin.com\") ou notação CIDR (\"127.0.0.0/8\").\n- \"port\" (opcional): Corresponder apenas a solicitações para uma porta específica, como 80 ou 443.\n\n- \"action\" (opcional): Se permitir ou negar esta solicitação.\n- \"max_download\" (opcional): O tamanho máximo (em bytes) que um computador pode baixar nesta solicitação.\n- \"max_upload\" (opcional): O tamanho máximo (em bytes) que um computador pode enviar em uma solicitação.\n- \"max_websocket_message\" (opcional): O tamanho máximo (em bytes) que um computador pode enviar ou receber em um pacote websocket.\n- \"use_proxy\" (opcional): Habilitar o uso do proxy HTTP/SOCKS se estiver configurado.",
|
||||
"gui.computercraft.config.http.tooltip": "Controla a API HTTP",
|
||||
"gui.computercraft.config.http.websocket_enabled": "Habilitar websockets",
|
||||
"gui.computercraft.config.http.websocket_enabled.tooltip": "Habilitar o uso de websockets Http. Isso requer que a opção \"http_enable\" também esteja definida como verdadeira.",
|
||||
"gui.computercraft.config.log_computer_errors": "Registrar erros de computadores",
|
||||
"gui.computercraft.config.log_computer_errors.tooltip": "Registrar exceções lançadas por periféricos e outros objetos Lua. Isso facilita a depuração de problemas para os autores de mods, mas pode resultar em excesso de registros caso as pessoas utilizem métodos com falhas.",
|
||||
"gui.computercraft.config.maximum_open_files": "Número máximo de arquivos em um computador",
|
||||
"gui.computercraft.config.maximum_open_files.tooltip": "Defina quantos arquivos um computador pode ter aberto ao mesmo tempo. Defina como 0 para ilimitado.\nIntervalo: > 0",
|
||||
"gui.computercraft.config.monitor_distance": "Distância do monitor",
|
||||
"gui.computercraft.config.monitor_distance.tooltip": "A distância máxima que os monitores renderizarão. Isso padrão é o limite padrão de entidades de tile, mas pode ser estendido se você desejar construir monitores maiores. \nIntervalo: 16 ~ 1024",
|
||||
"gui.computercraft.config.monitor_renderer": "Renderizador do monitor",
|
||||
"gui.computercraft.config.monitor_renderer.tooltip": "O renderizador a ser utilizado para os monitores. Geralmente, isso deve ser mantido em \"best\" - se os monitores apresentarem problemas de desempenho, você pode querer experimentar renderizadores alternativos. \nValores Permitidos: BEST, TBO, VBO",
|
||||
"gui.computercraft.config.peripheral": "Periféricos",
|
||||
"gui.computercraft.config.peripheral.command_block_enabled": "Habilitar periférico do bloco de comando",
|
||||
"gui.computercraft.config.peripheral.command_block_enabled.tooltip": "Habilitar periférico do bloco de comando",
|
||||
"gui.computercraft.config.peripheral.max_notes_per_tick": "Número de notas que um computador pode tocar simultâneamente",
|
||||
"gui.computercraft.config.peripheral.max_notes_per_tick.tooltip": "Quantidade máxima de notas que um alto-falante pode jogar de uma vez.\nIntervalo: > 1",
|
||||
"gui.computercraft.config.peripheral.modem_high_altitude_range": "Alcance do modem (altitude elevada)",
|
||||
"gui.computercraft.config.peripheral.modem_high_altitude_range.tooltip": "O intervalo de Modems Sem Fio a altitude máxima em tempo limpo, em metros.\nIntervalo: 0 ~ 100000",
|
||||
"gui.computercraft.config.peripheral.modem_high_altitude_range_during_storm": "Alcance do modem (altitude elevada, clima ruim)",
|
||||
"gui.computercraft.config.peripheral.modem_high_altitude_range_during_storm.tooltip": "O intervalo de Modems Sem Fio à altitude máxima em clima tempestuoso, em metros.\nIntervalo: 0 ~ 100000",
|
||||
"gui.computercraft.config.peripheral.modem_range": "Alcance do modem (padrão)",
|
||||
"gui.computercraft.config.peripheral.modem_range.tooltip": "O alcance de Modems Sem Fio a baixa altitude em clima limpo, em metros.\nIntervalo: 0 ~ 100000",
|
||||
"gui.computercraft.config.peripheral.modem_range_during_storm": "Alcance do modem (clima ruim)",
|
||||
"gui.computercraft.config.peripheral.modem_range_during_storm.tooltip": "A variedade de Modems Sem Fio a baixa altitude em clima tempestuoso, em metros.\nIntervalo: 0 ~ 100000",
|
||||
"gui.computercraft.config.peripheral.monitor_bandwidth": "Monitorar banda",
|
||||
"gui.computercraft.config.peripheral.monitor_bandwidth.tooltip": "O limite de quanta informação de monitor pode ser enviada *por tick*. Nota:\n- A largura de banda é medida antes da compressão, então os dados enviados ao cliente são menores.\n- Isso ignora o número de jogadores para os quais um pacote é enviado. Atualizar um monitor para um jogador consome o mesmo limite de largura de banda que enviar para 20.\n- Um monitor de tamanho completo envia ~25kb de dados. Portanto, o padrão (1MB) permite que ~40 monitores sejam atualizados em um único tick. \nDefina como 0 para desativar. \nIntervalo: > 0",
|
||||
"gui.computercraft.config.peripheral.tooltip": "Várias opções relacionadas com os periféricos.",
|
||||
"gui.computercraft.config.term_sizes": "Tamanhos do terminal",
|
||||
"gui.computercraft.config.term_sizes.computer": "Computador",
|
||||
"gui.computercraft.config.term_sizes.computer.height": "Altura do terminal",
|
||||
"gui.computercraft.config.term_sizes.computer.height.tooltip": "Intervalo: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.computer.tooltip": "Tamanho do terminal dos computadores portátil.",
|
||||
"gui.computercraft.config.term_sizes.computer.width": "Largura do terminal",
|
||||
"gui.computercraft.config.term_sizes.computer.width.tooltip": "Intervalo: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.monitor": "Monitor",
|
||||
"gui.computercraft.config.term_sizes.monitor.height": "Altura máxima da monitor",
|
||||
"gui.computercraft.config.term_sizes.monitor.height.tooltip": "Intervalo: 1 ~ 32",
|
||||
"gui.computercraft.config.term_sizes.monitor.tooltip": "Tamanho máximo de monitores (em blocos).",
|
||||
"gui.computercraft.config.term_sizes.monitor.width": "Largura máxima do monitor",
|
||||
"gui.computercraft.config.term_sizes.monitor.width.tooltip": "Intervalo: 1 ~ 32",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer": "Computador Portátil",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.height": "Altura do terminal",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.height.tooltip": "Intervalo: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.tooltip": "Tamanho do terminal dos computadores portátil.",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.width": "Largura do terminal",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.width.tooltip": "Intervalo: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.tooltip": "Configure o tamanho dos terminais de vários computadores. Terminais maiores exigem mais largura de banda, portanto, use com cuidado.",
|
||||
"gui.computercraft.config.turtle": "Tartarugas",
|
||||
"gui.computercraft.config.turtle.advanced_fuel_limit": "Limite de combustível de Tartarugas Avançadas",
|
||||
"gui.computercraft.config.turtle.advanced_fuel_limit.tooltip": "O limite de combustível para Advanced Turtles. \nIntervalo: > 0",
|
||||
"gui.computercraft.config.turtle.can_push": "Tartarugas podem empurrar entidades",
|
||||
"gui.computercraft.config.turtle.can_push.tooltip": "Se definido como verdadeiro, as Tartarugas empurrarão entidades para o lado em vez de parar, caso haja espaço para isso.",
|
||||
"gui.computercraft.config.turtle.need_fuel": "Habilitar combustível",
|
||||
"gui.computercraft.config.turtle.need_fuel.tooltip": "Defina se as tartarugas requerem combustível para se mover.",
|
||||
"gui.computercraft.config.turtle.normal_fuel_limit": "Limite de combustível de Tartarugas",
|
||||
"gui.computercraft.config.turtle.normal_fuel_limit.tooltip": "O limite de combustível para Advanced Turtles. \nIntervalo: > 0",
|
||||
"gui.computercraft.config.turtle.tooltip": "Várias opções relacionadas às Tartarugas.",
|
||||
"gui.computercraft.config.upload_max_size": "Tamanho máximo para upload de arquivos (bytes)",
|
||||
"gui.computercraft.config.upload_max_size.tooltip": "O limite de tamanho de upload de arquivos, em bytes. Deve estar na faixa de 1 KiB a 16 MiB. \nTenha em mente que os uploads são processados em um único tick - arquivos grandes ou desempenho de rede ruim podem travar a thread de rede. E cuidado com o espaço em disco! \nIntervalo: 1024 ~ 16777216",
|
||||
"gui.computercraft.config.upload_nag_delay": "Atraso de notificação de upload",
|
||||
"gui.computercraft.config.upload_nag_delay.tooltip": "O atraso em segundos após o qual seremos notificados sobre importações não tratadas. Defina como 0 para desabilitar. \nIntervalo: 0 ~ 60",
|
||||
"gui.computercraft.pocket_computer_overlay": "Computador portátil aberto. Pressione ESC para fechar.",
|
||||
"gui.computercraft.terminal": "Terminal do Computador",
|
||||
"gui.computercraft.tooltip.computer_id": "ID do Computador: %s",
|
||||
"gui.computercraft.tooltip.copy": "Copiar para a área de transferência",
|
||||
"gui.computercraft.tooltip.disk_id": "ID do Disco: %s",
|
||||
"gui.computercraft.tooltip.terminate": "Parar o código atualmente em execução",
|
||||
"gui.computercraft.tooltip.terminate.key": "Segure Ctrl+T",
|
||||
"gui.computercraft.tooltip.turn_off": "Desligar este computador",
|
||||
"gui.computercraft.tooltip.turn_off.key": "Segure Ctrl+S",
|
||||
"gui.computercraft.tooltip.turn_on": "Ligar este computador",
|
||||
"gui.computercraft.upload.failed": "Falha no Upload",
|
||||
"gui.computercraft.upload.failed.computer_off": "Você deve ligar o computador antes de fazer o upload de arquivos.",
|
||||
"gui.computercraft.upload.failed.corrupted": "Arquivos corrompidos ao dar upload. Por favor, tente novamente.",
|
||||
"gui.computercraft.upload.failed.generic": "Upload de arquivos falhou (%s)",
|
||||
"gui.computercraft.upload.failed.name_too_long": "Nomes de arquivos são muito longos para dar upload.",
|
||||
"gui.computercraft.upload.failed.too_many_files": "Não é possível dar upload nesta quantidade de arquivos.",
|
||||
"gui.computercraft.upload.failed.too_much": "Seus arquivos são muito grandes para dar upload.",
|
||||
"gui.computercraft.upload.no_response": "Transferindo Arquivos",
|
||||
"gui.computercraft.upload.no_response.msg": "Seu computador não usou os arquivos transferidos. Você pode precisar executar o programa %s e tentar novamente.",
|
||||
"item.computercraft.disk": "Disquete",
|
||||
"item.computercraft.pocket_computer_advanced": "Computador Portátil Avançado",
|
||||
"item.computercraft.pocket_computer_advanced.upgraded": "Computador Portátil Avançado %s",
|
||||
@ -69,6 +202,25 @@
|
||||
"item.computercraft.printed_page": "Página Impressa",
|
||||
"item.computercraft.printed_pages": "Páginas Impressas",
|
||||
"item.computercraft.treasure_disk": "Disquete",
|
||||
"itemGroup.computercraft": "ComputerCraft",
|
||||
"tag.item.computercraft.computer": "Computadores",
|
||||
"tag.item.computercraft.monitor": "Monitores",
|
||||
"tag.item.computercraft.turtle": "Tartarugas",
|
||||
"tag.item.computercraft.wired_modem": "Modems com Fio",
|
||||
"tracking_field.computercraft.avg": "%s (média)",
|
||||
"tracking_field.computercraft.computer_tasks.name": "Tarefas",
|
||||
"tracking_field.computercraft.count": "%s (contagem)",
|
||||
"tracking_field.computercraft.fs.name": "Operações de sistema",
|
||||
"tracking_field.computercraft.http_download.name": "Download HTTP",
|
||||
"tracking_field.computercraft.http_requests.name": "Solicitações HTTP",
|
||||
"tracking_field.computercraft.http_upload.name": "Upload de HTTP",
|
||||
"tracking_field.computercraft.java_allocation.name": "Alocações Java",
|
||||
"tracking_field.computercraft.max": "%s (máximo)",
|
||||
"tracking_field.computercraft.peripheral.name": "Chamadas Periféricas",
|
||||
"tracking_field.computercraft.server_tasks.name": "Tarefas do servidor",
|
||||
"tracking_field.computercraft.turtle_ops.name": "Operações de tartaruga",
|
||||
"tracking_field.computercraft.websocket_incoming.name": "Entrada do Websocket",
|
||||
"tracking_field.computercraft.websocket_outgoing.name": "Saída do Websocket",
|
||||
"upgrade.computercraft.speaker.adjective": "(Alto-Falante)",
|
||||
"upgrade.computercraft.wireless_modem_advanced.adjective": "Ender",
|
||||
"upgrade.computercraft.wireless_modem_normal.adjective": "sem Fio",
|
||||
|
@ -32,8 +32,6 @@
|
||||
"commands.computercraft.generic.additional_rows": "%d дополнительных строк …",
|
||||
"commands.computercraft.generic.exception": "Необработанное исключение (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<нет позиции>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "Y",
|
||||
"commands.computercraft.help.desc": "Отображает это сообщение справки",
|
||||
"commands.computercraft.help.no_children": "%s не имеет подкоманд",
|
||||
|
@ -32,8 +32,6 @@
|
||||
"commands.computercraft.generic.additional_rows": "%d ytterligare rader…",
|
||||
"commands.computercraft.generic.exception": "Ohanterat felfall (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<no pos>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "J",
|
||||
"commands.computercraft.help.desc": "Visa detta hjälpmeddelande",
|
||||
"commands.computercraft.help.no_children": "%s har inget underkommando",
|
||||
|
@ -31,8 +31,6 @@
|
||||
"commands.computercraft.dump.synopsis": "mi pana e sona pi ilo sona.",
|
||||
"commands.computercraft.generic.additional_rows": "mute %d…",
|
||||
"commands.computercraft.generic.exception": "pakala awen ala (%s)",
|
||||
"commands.computercraft.generic.no_position": "<lon ala>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.help.desc": "mi pana e toki ni",
|
||||
"commands.computercraft.help.no_children": "toki wawa '%s' li jo ala e toki wawa insa",
|
||||
"commands.computercraft.help.no_command": "toki wawa '%s' li lon ala",
|
||||
|
@ -0,0 +1,233 @@
|
||||
{
|
||||
"argument.computercraft.argument_expected": "Beklenen Argüman",
|
||||
"argument.computercraft.computer.distance": "Varlığa olan mesafe",
|
||||
"argument.computercraft.computer.family": "Bilgisayar ailesi",
|
||||
"argument.computercraft.computer.id": "Bilgisayar Kimliği",
|
||||
"argument.computercraft.computer.instance": "Eşsiz oluşum kimliği",
|
||||
"argument.computercraft.computer.label": "Bilgisayar etiketi",
|
||||
"argument.computercraft.computer.many_matching": "'%s' ile birden fazla bilgisayar eşleşiyor (%s oluşumları)",
|
||||
"argument.computercraft.computer.no_matching": "'%s' ile eşleşen bilgisayar yok",
|
||||
"argument.computercraft.tracking_field.no_field": "Bilinmeyen alan '%s'",
|
||||
"argument.computercraft.unknown_computer_family": "Bilinmeyen bilgisayar ailesi '%s'",
|
||||
"block.computercraft.cable": "Ağ Kablosu",
|
||||
"block.computercraft.computer_advanced": "Gelişmiş Bilgisayar",
|
||||
"block.computercraft.computer_command": "Komut Bilgisayarı",
|
||||
"block.computercraft.computer_normal": "Bilgisayar",
|
||||
"block.computercraft.disk_drive": "Disk Sürücüsü",
|
||||
"block.computercraft.monitor_advanced": "Gelişmiş Monitör",
|
||||
"block.computercraft.monitor_normal": "Monitör",
|
||||
"block.computercraft.printer": "Yazıcı",
|
||||
"block.computercraft.speaker": "Hoparlör",
|
||||
"block.computercraft.turtle_advanced": "Gelişmiş Turtle",
|
||||
"block.computercraft.turtle_advanced.upgraded": "Gelişmiş %s Turtle",
|
||||
"block.computercraft.turtle_advanced.upgraded_twice": "Gelişmiş %s %s Turtle",
|
||||
"block.computercraft.turtle_normal": "Turtle",
|
||||
"block.computercraft.turtle_normal.upgraded": "%s Turtle",
|
||||
"block.computercraft.turtle_normal.upgraded_twice": "%s %s Turtle",
|
||||
"block.computercraft.wired_modem": "Kablolu Modem",
|
||||
"block.computercraft.wired_modem_full": "Kablolu Modem",
|
||||
"block.computercraft.wireless_modem_advanced": "Ender Modemi",
|
||||
"block.computercraft.wireless_modem_normal": "Kablosuz Modem",
|
||||
"chat.computercraft.wired_modem.peripheral_connected": "Çevre birimi \"%s\" ağa bağlandı",
|
||||
"chat.computercraft.wired_modem.peripheral_disconnected": "Çevre birimi \"%s\" ağdan koptu",
|
||||
"commands.computercraft.desc": "/computercraft komutu, bilgisayar kontrolü ve etkileşimi için çeşitli hata ayıklama ve yönetici araçları sağlar.",
|
||||
"commands.computercraft.dump.action": "Bu bilgisayar hakkında daha fazla bilgi görüntüle",
|
||||
"commands.computercraft.dump.desc": "Tüm bilgisayarların durumunu veya bir bilgisayara özgü bilgileri göster. Bilgisayarın oluşum kimliğini (örn. 123), bilgisayar kimliğini (örn. #123) ya da etiketini (örn. \"@Bilgisayarım\") belirtebilirsiniz.",
|
||||
"commands.computercraft.dump.open_path": "Bu bilgisayarın dosyalarını görüntüle",
|
||||
"commands.computercraft.dump.synopsis": "Bilgisayarların durumunu göster.",
|
||||
"commands.computercraft.generic.additional_rows": "Fazladan %d satır…",
|
||||
"commands.computercraft.generic.exception": "Beklenmeyen durum (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.yes": "Y",
|
||||
"commands.computercraft.help.desc": "Bu yardım mesajını gösterir",
|
||||
"commands.computercraft.help.no_children": "%s, hiçbir alt komuta sahip değil",
|
||||
"commands.computercraft.help.no_command": "'%s' gibi bir komut yok",
|
||||
"commands.computercraft.help.synopsis": "Belirli bir komut hakkında yardım göster",
|
||||
"commands.computercraft.queue.desc": "Bir komut bilgisayarına ek argümanları da girerek bir computer_command olayı gönder. Bu esasen harita yapımcıları için tasarlanmıştır ve /trigger komutunun daha bilgisayar dostu bir versiyonu olarak işlev görür. Bu komut herhangi bir oyuncu tarafından çalıştırılabilir, bu da büyük ihtimalle bir metin bileşeninin tıklama olayı ile olur.",
|
||||
"commands.computercraft.queue.synopsis": "Bir komut bilgisayarına computer_command olayı gönder",
|
||||
"commands.computercraft.shutdown.desc": "Listelenen bilgisayarları veya hiçbiri belirtilmemişse tümünü kapat. Bilgisayarın oluşum kimliğini (örn. 123), bilgisayar kimliğini (örn. #123) ya da etiketini (örn. \"@Bilgisayarım\") belirtebilirsiniz.",
|
||||
"commands.computercraft.shutdown.done": "%s/%s bilgisayar kapatıldı",
|
||||
"commands.computercraft.shutdown.synopsis": "Bilgisayarları uzaktan kapat.",
|
||||
"commands.computercraft.synopsis": "Bilgisayarları kontrol etmek için çeşitli komutlar.",
|
||||
"commands.computercraft.tp.action": "Bu bilgisayara ışınla",
|
||||
"commands.computercraft.tp.desc": "Bir bilgisayarın konumuna ışınla. Bilgisayarın oluşum kimliğini (örn. 123) ya da bilgisayar kimliğini (örn. #123) belirtebilirsiniz.",
|
||||
"commands.computercraft.tp.synopsis": "Belirli bir bilgisayara ışınla.",
|
||||
"commands.computercraft.track.desc": "Bilgisayarların ne kadar süre çalıştığını ve kaç olay işlediğini izlemeye al. Bu, /forge track komutuna benzer şekilde bilgi sunar ve gecikmeyi tanılamaya yardımcı olabilir.",
|
||||
"commands.computercraft.track.dump.computer": "Bilgisayar",
|
||||
"commands.computercraft.track.dump.desc": "Bilgisayar izlemenin en son sonuç dökümünü göster.",
|
||||
"commands.computercraft.track.dump.no_timings": "Hiçbir zamanlama mevcut değil",
|
||||
"commands.computercraft.track.dump.synopsis": "En son izleme sonuç dökümünü göster",
|
||||
"commands.computercraft.track.start.desc": "Tüm bilgisayarların yürütme sürelerini ve olay sayılarını izlemeye başla. Bu, önceki çalıştırmaların sonuçlarını silecektir.",
|
||||
"commands.computercraft.track.start.stop": "%s ile izlemeyi durdur ve sonuçları görüntüle",
|
||||
"commands.computercraft.track.start.synopsis": "Tüm bilgisayarları izlemeye başla",
|
||||
"commands.computercraft.track.stop.action": "İzlemeyi durdurmak için tıkla",
|
||||
"commands.computercraft.track.stop.desc": "Tüm bilgisayarların yürütme sürelerini ve olaylarını izlemeyi durdur",
|
||||
"commands.computercraft.track.stop.not_enabled": "Şu anda hiçbir bilgisayar izlenmiyor",
|
||||
"commands.computercraft.track.stop.synopsis": "Tüm bilgisayarları izlemeyi durdur",
|
||||
"commands.computercraft.track.synopsis": "Bilgisayarların yürütme sürelerini izlemeye al.",
|
||||
"commands.computercraft.turn_on.desc": "Listelenen bilgisayarları aç. Bilgisayarın oluşum kimliğini (örn. 123), bilgisayar kimliğini (örn. #123) ya da etiketini (örn. \"@Bilgisayarım\") belirtebilirsiniz.",
|
||||
"commands.computercraft.turn_on.done": "%s/%s bilgisayar açıldı",
|
||||
"commands.computercraft.turn_on.synopsis": "Bilgisayarları uzaktan aç.",
|
||||
"commands.computercraft.view.action": "Bu bilgisayarı görüntüle",
|
||||
"commands.computercraft.view.desc": "Bir bilgisayarın terminalini aç ve uzaktan kontrole izin ver. Bununla Turtle envanterlerine erişilemez. Bilgisayarın oluşum kimliğini (örn. 123) ya da bilgisayar kimliğini (örn. #123) belirtebilirsiniz.",
|
||||
"commands.computercraft.view.not_player": "Oyuncu olmayanlar için terminal açılamaz",
|
||||
"commands.computercraft.view.synopsis": "Bir bilgisayarın terminalini görüntüle.",
|
||||
"gui.computercraft.config.command_require_creative": "Komut bilgisayarları yaratıcı modu gerektirir",
|
||||
"gui.computercraft.config.command_require_creative.tooltip": "Oyuncuların komut bilgisayarıyla etkileşime girebilmesi için yaratıcı modda\nve yetkili olmalarını gerektir. Bu, vanilla Komut blokları için varsayılan davranıştır.",
|
||||
"gui.computercraft.config.computer_space_limit": "Bilgisayar alan sınırı (bayt)",
|
||||
"gui.computercraft.config.computer_space_limit.tooltip": "Bilgisayar ve Turtle için bayt cinsinden disk alanı sınırı.",
|
||||
"gui.computercraft.config.default_computer_settings": "Varsayılan Bilgisayar ayarları",
|
||||
"gui.computercraft.config.default_computer_settings.tooltip": "Yeni bilgisayarlarda kullanılacak varsayılan sistem ayarlarının virgülle ayrılmış listesi.\nÖrnek: \"shell.autocomplete=false,lua.autocomplete=false,edit.autocomplete=false\"\ntüm otomatik tamamlamayı devre dışı bırakacaktır.",
|
||||
"gui.computercraft.config.disabled_generic_methods": "Devre dışı bırakılmış genelleyici fonksiyonlar",
|
||||
"gui.computercraft.config.disabled_generic_methods.tooltip": "Devre dışı bırakılacak genelleyici fonksiyonların veya fonksiyon kaynaklarının\nbir listesi. Genelleyici fonksiyonlar (generic methods), bir bloğa/blok varlığına\nbariz bir çevre birimi sağlayıcı yok ise eklenen fonksiyonlardır. Bu,\nenvanter fonksiyonlarını (yani inventory.getItemDetail, inventory.pushItems)\nve (Forge'da ise) fluid_storage ve energy_storage fonksiyonlarını içerir.\nBu listedeki fonksiyonlar ya tüm bir fonksiyon grubu (computercraft:inventory)\nya da tek bir fonksiyon (computercraft:inventory#pushItems) olabilir.\n",
|
||||
"gui.computercraft.config.execution": "Yürütme",
|
||||
"gui.computercraft.config.execution.computer_threads": "Bilgisayar iş parçacıkları",
|
||||
"gui.computercraft.config.execution.computer_threads.tooltip": "Bilgisayarların çalışabileceği iş parçacığı sayısını ayarla. Yüksek sayılar, aynı anda\ndaha fazla bilgisayarın çalışabileceği anlamına gelir, ancak gecikmeye neden olabilir. \nLütfen bazı modların 1'den fazla iş parçacığı ile çalışamayacağını unutmayın. \nDikkatli kullanın.\nAralık: > 1",
|
||||
"gui.computercraft.config.execution.max_main_computer_time": "Sunucu tik bilgisayar zaman sınırı",
|
||||
"gui.computercraft.config.execution.max_main_computer_time.tooltip": "Milisaniye cinsinden, bilgisayarın bir tik içinde yürütebileceği ideal maksimum süre.\nUnutmayın, ne kadar süreceğini söylemenin bir yolu olmadığı için büyük olasılıkla\nbu sınırı aşacağız - bu, ortalama sürenin üst sınırı olmayı\namaçlamaktadır.\nAralık: > 1",
|
||||
"gui.computercraft.config.execution.max_main_global_time": "Sunucu tik genel zaman sınırı",
|
||||
"gui.computercraft.config.execution.max_main_global_time.tooltip": "Milisaniye cinsinden, tek bir tikte görevleri yürütmek için harcanabilecek\nmaksimum süre.\nUnutmayın, ne kadar süreceğini söylemenin bir yolu olmadığı için büyük\nolasılıkla bu sınırı aşacağız - bu, ortalama sürenin üst sınırı olmayı\namaçlamaktadır.\nAralık: > 1",
|
||||
"gui.computercraft.config.execution.tooltip": "Bilgisayarların yürütme davranışını kontrol eder. Bu, büyük ölçüde sunuculara\nince ayar yapmak için tasarlanmıştır ve genellikle dokunulması gerekmez.",
|
||||
"gui.computercraft.config.floppy_space_limit": "Disket alan sınırı (bayt)",
|
||||
"gui.computercraft.config.floppy_space_limit.tooltip": "Disketler için bayt cinsinden disk alanı sınırı.",
|
||||
"gui.computercraft.config.http": "HTTP",
|
||||
"gui.computercraft.config.http.bandwidth": "Bant Genişliği",
|
||||
"gui.computercraft.config.http.bandwidth.global_download": "Genel indirme sınırı",
|
||||
"gui.computercraft.config.http.bandwidth.global_download.tooltip": "Bir saniye içinde indirilebilecek bayt sayısı. Bu tüm bilgisayarlar arasında paylaşılır. (bayt/s).\nAralık: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload": "Genel yükleme sınırı",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload.tooltip": "Bir saniye içinde yüklenebilecek bayt sayısı. Bu tüm bilgisayarlar arasında paylaşılır. (bayt/s).\nAralık: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.tooltip": "Bilgisayarlar tarafından kullanılan bant genişliğini sınırlar.",
|
||||
"gui.computercraft.config.http.enabled": "HTTP API'sini etkinleştir",
|
||||
"gui.computercraft.config.http.enabled.tooltip": "Bilgisayarlarda \"http\" API'sini etkinleştir. Bunu devre dışı bırakmak, birçok kullanıcının güvendiği \"pastebin\" ve\n\"wget\" programlarını da devre dışı bırakır. Bunu açık bırakmanız ve daha ayrıntılı denetim uygulamak için\n\"rules\" yapılandırma seçeneğini kullanmanız önerilir.",
|
||||
"gui.computercraft.config.http.max_requests": "Maksimum eşzamanlı istekler",
|
||||
"gui.computercraft.config.http.max_requests.tooltip": "Bir bilgisayarın tek seferde yapabileceği http isteği sayısı. Ek istekler\nkuyruğa alınacak ve çalışan istekler bittiğinde gönderilecektir. Sınırsız için\n0 olarak ayarla.\nAralık: > 0",
|
||||
"gui.computercraft.config.http.max_websockets": "Maksimum eşzamanlı websocketleri",
|
||||
"gui.computercraft.config.http.max_websockets.tooltip": "Bir bilgisayarın tek seferde açık tutabileceği websocket sayısı.\nAralık: > 1",
|
||||
"gui.computercraft.config.http.proxy": "Vekil sunucu",
|
||||
"gui.computercraft.config.http.proxy.host": "Ana bilgisayar adı",
|
||||
"gui.computercraft.config.http.proxy.host.tooltip": "Proxy sunucusunun ana bilgisayar adı veya IP adresi.",
|
||||
"gui.computercraft.config.http.proxy.port": "Port",
|
||||
"gui.computercraft.config.http.proxy.port.tooltip": "Proxy sunucusunun portu.\nAralık: 1 ~ 65536",
|
||||
"gui.computercraft.config.http.proxy.tooltip": "HTTP ve websocket isteklerini bir proxy sunucusu üzerinden aktarır. Yalnızca \n\"use_proxy\" olan HTTP kurallarını etkiler, true olarak ayarla (varsayılan\nolarak kapalıdır).\nProxy için kimlik doğrulaması gerekiyorsa, \"computercraft-server.toml\" ile\naynı dizinde, iki nokta üst üste ile ayrılmış kullanıcı adı ve parolayı içeren\nbir \"computercraft-proxy.pw\" dosyası oluştur. örn. \"myuser:mypassword\".\nSOCKS4 proxy'leri için yalnızca kullanıcı adı gereklidir.",
|
||||
"gui.computercraft.config.http.proxy.type": "Proxy türü",
|
||||
"gui.computercraft.config.http.proxy.type.tooltip": "Kullanılacak proxy türü.\nİzin Verilen Değerler: HTTP, HTTPS, SOCKS4, SOCKS5",
|
||||
"gui.computercraft.config.http.rules": "Kurallara izin ver/reddet",
|
||||
"gui.computercraft.config.http.rules.tooltip": "Belirli alan adları veya IP'ler için \"http\" API davranışını denetleyen\nkurallar listesi. Her kural bir ana bilgisayar adı ve isteğe bağlı bir port ile\neşleşir ve ardından istek için çeşitli özellikler ayarlar. Kurallar sırayla\ndeğerlendirilir, yani önceki kurallar sonrakileri geçersiz kılar.\n\nGeçerli özellikler:\n - \"host\" (gerekli): Bu kuralın eşleştiği alan adı veya IP adresi. Bu bir alan adı olabilir\n (\"pastebin.com\"), wildcard (\"*.pastebin.com\") ya da CIDR gösterimi (\"127.0.0.0/8\").\n - \"port\" (isteğe bağlı): Belirli bir porta yönelik istekleri eşleştir\n80 veya 443 gibi\n\n - \"action\" (isteğe bağlı): Bu isteğe izin verilip verilmeyeceği veya\nreddedilip reddedilmeyeceği.\n - \"max_download\" (isteğe bağlı): Bir bilgisayarın bu istekte indirebileceği\nmaksimum boyut (bayt cinsinden).\n - \"max_upload\" (isteğe bağlı): Bir bilgisayarın bu istekte yükleyebileceği\nmaksimum boyut (bayt cinsinden).\n - \"max_websocket_message\" (isteğe bağlı): Bir bilgisayarın bir websocket\npaketinde gönderebileceği veya alabileceği maksimum boyut (bayt cinsinden).\n - \"use_proxy\" (isteğe bağlı): Yapılandırılmışsa HTTP/SOCKS proxy'sinin kullanımını etkinleştir.",
|
||||
"gui.computercraft.config.http.tooltip": "HTTP API'sini kontrol eder",
|
||||
"gui.computercraft.config.http.websocket_enabled": "Websocket'leri etkinleştir",
|
||||
"gui.computercraft.config.http.websocket_enabled.tooltip": "Http websocket kullanımını etkinleştir. Bunun için \"http_enable\" seçeneğinin de true olması gerekir.",
|
||||
"gui.computercraft.config.log_computer_errors": "Bilgisayar hatalarını günlüğe kaydet",
|
||||
"gui.computercraft.config.log_computer_errors.tooltip": "Çevre birimleri ve diğer Lua nesneleri tarafından atılan istisnaları\ngünlüğe kaydet. Bu, mod yapımcılarının sorunları ayıklamasını kolaylaştırır\nancak insanların hatalı yöntemler kullanması durumunda günlük spam'ına neden\nolabilir.",
|
||||
"gui.computercraft.config.maximum_open_files": "Bilgisayar başına maksimum açık dosya",
|
||||
"gui.computercraft.config.maximum_open_files.tooltip": "Bir bilgisayarda aynı anda kaç dosyanın açık olabileceğini ayarla. Sınırsız için 0 olarak ayarla.\nAralık: > 0",
|
||||
"gui.computercraft.config.monitor_distance": "Monitör mesafesi",
|
||||
"gui.computercraft.config.monitor_distance.tooltip": "Monitörlerin görüntü oluşturacağı maksimum mesafe. Bu, varsayılan olarak\nstandart tile entity sınırıdır, ancak daha büyük monitörler oluşturmak\nisterseniz genişletilebilir.\nAralık: 16 ~ 1024",
|
||||
"gui.computercraft.config.monitor_renderer": "Monitör oluşturucu",
|
||||
"gui.computercraft.config.monitor_renderer.tooltip": "Monitörler için kullanılacak oluşturucu. Genellikle bu \"best\" değerinde\ntutulmalıdır - monitörlerde performans sorunları varsa, alternatif oluşturucuları\ndenemek isteyebilirsiniz.\nİzin Verilen Değerler: BEST, TBO, VBO",
|
||||
"gui.computercraft.config.peripheral": "Çevre birimleri",
|
||||
"gui.computercraft.config.peripheral.command_block_enabled": "Komut bloğu çevresel birimini etkinleştir",
|
||||
"gui.computercraft.config.peripheral.command_block_enabled.tooltip": "Komut Bloğu çevre birimi desteğini etkinleştir",
|
||||
"gui.computercraft.config.peripheral.max_notes_per_tick": "Bir bilgisayarın aynı anda çalabileceği maksimum nota sayısı",
|
||||
"gui.computercraft.config.peripheral.max_notes_per_tick.tooltip": "Bir hoparlörün aynı anda çalabileceği maksimum nota miktarı.\nAralık: > 1",
|
||||
"gui.computercraft.config.peripheral.modem_high_altitude_range": "Modem menzili (yüksek irtifa)",
|
||||
"gui.computercraft.config.peripheral.modem_high_altitude_range.tooltip": "Kablosuz Modemlerin açık havada maksimum irtifadaki menzili, metre cinsinden.\nAralık: 0 ~ 100000",
|
||||
"gui.computercraft.config.peripheral.modem_high_altitude_range_during_storm": "Modem menzili (yüksek irtifa, kötü hava koşulları)",
|
||||
"gui.computercraft.config.peripheral.modem_high_altitude_range_during_storm.tooltip": "Kablosuz Modemlerin fırtınalı havalarda maksimum irtifadaki menzili, metre cinsinden.\nAralık: 0 ~ 100000",
|
||||
"gui.computercraft.config.peripheral.modem_range": "Modem menzili (varsayılan)",
|
||||
"gui.computercraft.config.peripheral.modem_range.tooltip": "Kablosuz Modemlerin açık havada alçak irtifadaki menzili, metre cinsinden.\nAralık: 0 ~ 100000",
|
||||
"gui.computercraft.config.peripheral.modem_range_during_storm": "Modem menzili (kötü hava koşulları)",
|
||||
"gui.computercraft.config.peripheral.modem_range_during_storm.tooltip": "Kablosuz Modemlerin fırtınalı havalarda alçak irtifadaki menzili, metre cinsinden.\nAralık: 0 ~ 100000",
|
||||
"gui.computercraft.config.peripheral.monitor_bandwidth": "Monitör bant genişliği",
|
||||
"gui.computercraft.config.peripheral.monitor_bandwidth.tooltip": "Tik başına* ne kadar monitör verisi gönderilebileceğinin sınırı. Not:\n - Bant genişliği sıkıştırmadan önce ölçülür, bu nedenle istemciye gönderilen veriler\n daha küçüktür.\n - Bu, bir paketin gönderildiği oyuncu sayısını göz ardı eder. Bir oyuncu için bir\nmonitörü güncellemek, 20 oyuncuya göndermekle aynı bant genişliği sınırını tüketir.\n - Tam boyutlu bir monitör ~25kb veri gönderir. Dolayısıyla varsayılan değer (1MB)\ntek bir tikte ~40 monitörün güncellenmesine izin verir.\nDevre dışı bırakmak için 0 olarak ayarla.\nAralık: > 0",
|
||||
"gui.computercraft.config.peripheral.tooltip": "Çevre birimlerine ilişkin çeşitli seçenekler.",
|
||||
"gui.computercraft.config.term_sizes": "Terminal boyutları",
|
||||
"gui.computercraft.config.term_sizes.computer": "Bilgisayar",
|
||||
"gui.computercraft.config.term_sizes.computer.height": "Terminal yüksekliği",
|
||||
"gui.computercraft.config.term_sizes.computer.height.tooltip": "Aralık: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.computer.tooltip": "Bilgisayarların terminal boyutu.",
|
||||
"gui.computercraft.config.term_sizes.computer.width": "Terminal genişliği",
|
||||
"gui.computercraft.config.term_sizes.computer.width.tooltip": "Aralık: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.monitor": "Monitör",
|
||||
"gui.computercraft.config.term_sizes.monitor.height": "Maks monitör yüksekliği",
|
||||
"gui.computercraft.config.term_sizes.monitor.height.tooltip": "Aralık: 1 ~ 32",
|
||||
"gui.computercraft.config.term_sizes.monitor.tooltip": "Maksimum monitör boyutu (blok olarak).",
|
||||
"gui.computercraft.config.term_sizes.monitor.width": "Maks monitör genişliği",
|
||||
"gui.computercraft.config.term_sizes.monitor.width.tooltip": "Aralık: 1 ~ 32",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer": "Cep Bilgisayarı",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.height": "Terminal yüksekliği",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.height.tooltip": "Aralık: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.tooltip": "Cep bilgisayarlarının terminal boyutu.",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.width": "Terminal genişliği",
|
||||
"gui.computercraft.config.term_sizes.pocket_computer.width.tooltip": "Aralık: 1 ~ 255",
|
||||
"gui.computercraft.config.term_sizes.tooltip": "Çeşitli bilgisayar terminallerinin boyutunu yapılandır.\nDaha büyük terminaller daha fazla bant genişliği gerektirir, bu nedenle dikkatli\nkullanın.",
|
||||
"gui.computercraft.config.turtle": "Kaplumbağalar",
|
||||
"gui.computercraft.config.turtle.advanced_fuel_limit": "Gelişmiş Kaplumbağa yakıt limiti",
|
||||
"gui.computercraft.config.turtle.advanced_fuel_limit.tooltip": "Gelişmiş Kaplumbağaların yakıt limiti.\nAralık: > 0",
|
||||
"gui.computercraft.config.turtle.can_push": "Kaplumbağalar varlıkları itebilir",
|
||||
"gui.computercraft.config.turtle.can_push.tooltip": "true olarak ayarlanırsa, Kaplumbağalar yer varsa durmak yerine varlıkları yolun\ndışına iter.",
|
||||
"gui.computercraft.config.turtle.need_fuel": "Yakıtı etkinleştir",
|
||||
"gui.computercraft.config.turtle.need_fuel.tooltip": "Kaplumbağaların hareket etmek için yakıta ihtiyaç duyup duymadığını ayarla.",
|
||||
"gui.computercraft.config.turtle.normal_fuel_limit": "Kaplumbağa yakıt limiti",
|
||||
"gui.computercraft.config.turtle.normal_fuel_limit.tooltip": "Kaplumbağaların yakıt limiti.\nAralık: > 0",
|
||||
"gui.computercraft.config.turtle.tooltip": "Kaplumbağalarla ilgili çeşitli seçenekler.",
|
||||
"gui.computercraft.config.upload_max_size": "Dosya yükleme boyut sınırı (bayt)",
|
||||
"gui.computercraft.config.upload_max_size.tooltip": "Bayt cinsinden dosya yükleme boyut sınırı. 1 KiB ve 16 MiB aralığında olmalıdır.\nYüklemelerin tek bir tikte işlendiğini unutmayın - büyük dosyalar veya düşük ağ\nperformansı ağ iş parçacığını bekletebilir. Ve disk alanına dikkat edin!\nAralık: 1024 ~ 16777216",
|
||||
"gui.computercraft.config.upload_nag_delay": "Yükleme nag gecikmesi",
|
||||
"gui.computercraft.config.upload_nag_delay.tooltip": "Beklenmeyen içe aktarmalar hakkında bildirimde bulunacağımız saniye cinsinden gecikme. Devre dışı bırakmak için 0 olarak ayarla.\nAralık: 0 ~ 60",
|
||||
"gui.computercraft.pocket_computer_overlay": "Cep bilgisayarı açık. Kapatmak için ESC tuşuna basın.",
|
||||
"gui.computercraft.terminal": "Bilgisayar terminali",
|
||||
"gui.computercraft.tooltip.computer_id": "Bilgisayar Kimliği: %s",
|
||||
"gui.computercraft.tooltip.copy": "Panoya kopyala",
|
||||
"gui.computercraft.tooltip.disk_id": "Disk Kimliği: %s",
|
||||
"gui.computercraft.tooltip.terminate": "Çalışmakta olan kodu durdur",
|
||||
"gui.computercraft.tooltip.terminate.key": "Ctrl+T tuşlarını basılı tut",
|
||||
"gui.computercraft.tooltip.turn_off": "Bu bilgisayarı kapat",
|
||||
"gui.computercraft.tooltip.turn_off.key": "Ctrl+S tuşlarını basılı tut",
|
||||
"gui.computercraft.tooltip.turn_on": "Bu bilgisayarı aç",
|
||||
"gui.computercraft.upload.failed": "Karşıya Yükleme Başarısız",
|
||||
"gui.computercraft.upload.failed.computer_off": "Dosyaları yüklemeden önce bilgisayarı açmalısınız.",
|
||||
"gui.computercraft.upload.failed.corrupted": "Dosyalar karşıya yüklenirken bozuldu. Lütfen tekrar deneyin.",
|
||||
"gui.computercraft.upload.failed.generic": "Dosya yükleme başarısız (%s)",
|
||||
"gui.computercraft.upload.failed.name_too_long": "Dosya adları karşıya yükleme için fazla uzun.",
|
||||
"gui.computercraft.upload.failed.too_many_files": "Bu kadar çok dosya karşıya yüklenemez.",
|
||||
"gui.computercraft.upload.failed.too_much": "Dosyalarınızın boyutu karşıya yükleme için fazla büyük.",
|
||||
"gui.computercraft.upload.no_response": "Dosyalar Aktarılıyor",
|
||||
"gui.computercraft.upload.no_response.msg": "Bilgisayarınız aktarılan dosyalarınızı kullanmadı. %s programını çalıştırıp tekrar denemeniz gerekebilir.",
|
||||
"item.computercraft.disk": "Disket",
|
||||
"item.computercraft.pocket_computer_advanced": "Gelişmiş Cep Bilgisayarı",
|
||||
"item.computercraft.pocket_computer_advanced.upgraded": "Gelişmiş %s Cep Bilgisayarı",
|
||||
"item.computercraft.pocket_computer_normal": "Cep Bilgisayarı",
|
||||
"item.computercraft.pocket_computer_normal.upgraded": "%s Cep Bilgisayarı",
|
||||
"item.computercraft.printed_book": "Yazdırılmış Kitap",
|
||||
"item.computercraft.printed_page": "Yazdırılmış Sayfa",
|
||||
"item.computercraft.printed_pages": "Yazdırılmış Sayfalar",
|
||||
"item.computercraft.treasure_disk": "Disket",
|
||||
"itemGroup.computercraft": "ComputerCraft",
|
||||
"tag.item.computercraft.computer": "Bilgisayarlar",
|
||||
"tag.item.computercraft.monitor": "Monitörler",
|
||||
"tag.item.computercraft.turtle": "Turtlelar",
|
||||
"tag.item.computercraft.wired_modem": "Kablolu modemler",
|
||||
"tracking_field.computercraft.avg": "%s (ort.)",
|
||||
"tracking_field.computercraft.computer_tasks.name": "Görevler",
|
||||
"tracking_field.computercraft.count": "%s (sayı)",
|
||||
"tracking_field.computercraft.fs.name": "Dosya sistemi işlemleri",
|
||||
"tracking_field.computercraft.http_download.name": "HTTP indirme",
|
||||
"tracking_field.computercraft.http_requests.name": "HTTP istekleri",
|
||||
"tracking_field.computercraft.http_upload.name": "HTTP yükleme",
|
||||
"tracking_field.computercraft.java_allocation.name": "Java'ya Ayrılan",
|
||||
"tracking_field.computercraft.max": "%s (azami)",
|
||||
"tracking_field.computercraft.peripheral.name": "Çevre birimi çağrıları",
|
||||
"tracking_field.computercraft.server_tasks.name": "Sunucu görevleri",
|
||||
"tracking_field.computercraft.turtle_ops.name": "Turtle işlemleri",
|
||||
"tracking_field.computercraft.websocket_incoming.name": "Websocket gelen",
|
||||
"tracking_field.computercraft.websocket_outgoing.name": "Websocket giden",
|
||||
"upgrade.computercraft.speaker.adjective": "Sesli",
|
||||
"upgrade.computercraft.wireless_modem_advanced.adjective": "Enderli",
|
||||
"upgrade.computercraft.wireless_modem_normal.adjective": "Kablosuz",
|
||||
"upgrade.minecraft.crafting_table.adjective": "Üretken",
|
||||
"upgrade.minecraft.diamond_axe.adjective": "Ağaç Kesen",
|
||||
"upgrade.minecraft.diamond_hoe.adjective": "Çiftçi",
|
||||
"upgrade.minecraft.diamond_pickaxe.adjective": "Madenci",
|
||||
"upgrade.minecraft.diamond_shovel.adjective": "Kazıcı",
|
||||
"upgrade.minecraft.diamond_sword.adjective": "Dövüşçü"
|
||||
}
|
@ -32,8 +32,6 @@
|
||||
"commands.computercraft.generic.additional_rows": "%d додаткових рядків …",
|
||||
"commands.computercraft.generic.exception": "Необроблений виняток (%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<немає позиції>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "Y",
|
||||
"commands.computercraft.help.desc": "Показує це повідомлення довідки",
|
||||
"commands.computercraft.help.no_children": "%s не має підкоманд",
|
||||
@ -74,6 +72,7 @@
|
||||
"gui.computercraft.config.computer_space_limit.tooltip": "Обмеження на займаєме місце на диску комп'ютерами та черепахами, в байтах.",
|
||||
"gui.computercraft.config.default_computer_settings": "Налаштування комп'ютера за замовчуванням",
|
||||
"gui.computercraft.config.default_computer_settings.tooltip": "Список лашатувань за замовчуванням, розділених комою, що будуть нашалтовані на нових комп'ютерах\nНаприклад: \"shell.autocomplete=false,lua.autocomplete=false,edit.autocomplete=false\"\nвідключить усі автодоповнення.",
|
||||
"gui.computercraft.config.disabled_generic_methods.tooltip": "Список загальних методів або джерел методів, які слід вимкнути. Загальні методи - це методи, додані до блоку/сутності блоку, коли немає явного постачальника периферії. До них належать методи інвентаризації (наприклад, inventory.getItemDetail, inventory.pushItems), а також (якщо на Forge), методи fluid_storage та energy_storage.\nМетоди у цьому списку можуть бути як цілою групою методів (computercraft:inventory),\nтак і одним методом (computercraft:inventory#pushItems).\n",
|
||||
"gui.computercraft.config.execution": "Виконання",
|
||||
"gui.computercraft.config.execution.computer_threads": "Потоки для комп'ютерів",
|
||||
"gui.computercraft.config.execution.computer_threads.tooltip": "Встановлює кількість потоків, на яких запускаються комп'ютери. Більше число\nозначає більшу кількість комп'ютерів, які працюють паралельно, але може призвести до проблем із продуктивністю.\nЗауважте, що деякі модифікації можуть не працювати із кількістю потоків більше за 1. Використовуйте з обережністю.\nОбмеження: > 1",
|
||||
@ -88,6 +87,13 @@
|
||||
"gui.computercraft.config.http.bandwidth": "Трафік",
|
||||
"gui.computercraft.config.http.bandwidth.global_download": "Глобальне обмеження на завантаження",
|
||||
"gui.computercraft.config.http.bandwidth.global_download.tooltip": "Число байтів, які можуть бути завантажені в хвилину. Це обмеження на всі комп'ютери відразу (байти в секунду)\nОбмеження: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload.tooltip": "Кількість байт, яку можна завантажити за секунду. Вона є спільною для всіх комп'ютерів. (байт/с)",
|
||||
"gui.computercraft.config.http.max_websockets.tooltip": "Кількість вебсокетів, які комп'ютер може мати відкритими одночасно. Діапазон: > 1",
|
||||
"gui.computercraft.config.http.proxy.tooltip": "Тунелює HTTP-запити і запити веб-сокетів через проксі-сервер. Впливає лише на HTTP-правила з параметром \"use_proxy\", встановленим у true (за замовчуванням вимкнено). Якщо для проксі-сервера потрібна автентифікація, створіть файл \"computercraft-proxy.pw\" у тому ж каталозі, що і \"computercraft-server.toml\", що містить ім'я користувача і пароль, розділені двокрапкою, наприклад, \"myuser:mypassword\". Для проксі SOCKS4 потрібно лише ім'я користувача.",
|
||||
"gui.computercraft.config.log_computer_errors.tooltip": "Журнал винятків, спричинених периферійними пристроями та іншими об'єктами Lua. Це полегшує авторам мод налагодження проблем, але може призвести до спаму у журналі, якщо люди використовуватимуть некоректні методи.",
|
||||
"gui.computercraft.config.monitor_distance.tooltip": "Максимальна відстань, на якій будуть візуалізуватись монітори. За замовчуванням це значення дорівнює стандартній відстані між плитками, але може бути збільшено, якщо ви бажаєте створити більші монітори. Діапазон: 16 ~ 1024",
|
||||
"gui.computercraft.config.monitor_renderer": "Візуалізація монітора",
|
||||
"gui.computercraft.config.monitor_renderer.tooltip": "Візуалізатор, який буде використовуватися для моніторів. Зазвичай цей параметр слід залишати на рівні \"найкращий\" - якщо у моніторів є проблеми з продуктивністю, ви можете поекспериментувати з альтернативними Візуалізаторами.\nДопустимі значення: BEST, TBO, VBO",
|
||||
"gui.computercraft.pocket_computer_overlay": "Кишеньковий комп'ютер відкритий. Натисніть ESC, щоб закрити.",
|
||||
"gui.computercraft.tooltip.computer_id": "Ідентифікатор комп'ютера: %s",
|
||||
"gui.computercraft.tooltip.copy": "Скопійовано в Буфер обміну",
|
||||
|
@ -1,8 +1,14 @@
|
||||
{
|
||||
"argument.computercraft.argument_expected": "预期自变量",
|
||||
"argument.computercraft.computer.distance": "实体距离",
|
||||
"argument.computercraft.computer.family": "电脑类别",
|
||||
"argument.computercraft.computer.id": "电脑ID",
|
||||
"argument.computercraft.computer.instance": "唯一实例ID",
|
||||
"argument.computercraft.computer.label": "电脑标签",
|
||||
"argument.computercraft.computer.many_matching": "多台计算机匹配'%s' (实例%s)",
|
||||
"argument.computercraft.computer.no_matching": "没有计算机匹配'%s'",
|
||||
"argument.computercraft.tracking_field.no_field": "未知字段'%s'",
|
||||
"argument.computercraft.unknown_computer_family": "未知电脑类别 '%s'",
|
||||
"block.computercraft.cable": "网络电缆",
|
||||
"block.computercraft.computer_advanced": "高级计算机",
|
||||
"block.computercraft.computer_command": "命令电脑",
|
||||
@ -27,13 +33,13 @@
|
||||
"commands.computercraft.desc": "/computercraft命令提供各种调试和管理工具,用于控制和与计算机交互.",
|
||||
"commands.computercraft.dump.action": "查看有关此计算机的更多信息",
|
||||
"commands.computercraft.dump.desc": "显示所有计算机的状态或某台计算机的特定信息. 你可以指定计算机的实例id (例如. 123), 计算机id (例如. #123)或标签(例如. \"@My Computer\").",
|
||||
"commands.computercraft.dump.open_path": "查看该电脑的文件",
|
||||
"commands.computercraft.dump.synopsis": "显示计算机的状态.",
|
||||
"commands.computercraft.generic.additional_rows": "%d额外的行…",
|
||||
"commands.computercraft.generic.exception": "未处理的异常(%s)",
|
||||
"commands.computercraft.generic.no": "N",
|
||||
"commands.computercraft.generic.no_position": "<无位置>",
|
||||
"commands.computercraft.generic.position": "%s, %s, %s",
|
||||
"commands.computercraft.generic.yes": "Y",
|
||||
"commands.computercraft.help.desc": "显示该帮助信息",
|
||||
"commands.computercraft.help.no_children": "%s没有子命令",
|
||||
"commands.computercraft.help.no_command": "没有这样的命令'%s'",
|
||||
"commands.computercraft.help.synopsis": "为特定的命令提供帮助",
|
||||
@ -66,17 +72,36 @@
|
||||
"commands.computercraft.view.desc": "打开计算机的终端,允许远程控制计算机. 这不提供对海龟库存的访问. 你可以指定计算机的实例id (例如. 123)或计算机id (例如. #123).",
|
||||
"commands.computercraft.view.not_player": "无法为非玩家打开终端",
|
||||
"commands.computercraft.view.synopsis": "查看计算机的终端.",
|
||||
"gui.computercraft.config.command_require_creative": "命令电脑需要创造模式",
|
||||
"gui.computercraft.config.command_require_creative.tooltip": "玩家需要处于创造模式并为管理员才能与命令计算机交互。\n这是原版命令方块的默认行为。",
|
||||
"gui.computercraft.config.computer_space_limit": "计算机空间限制(字节)",
|
||||
"gui.computercraft.config.computer_space_limit.tooltip": "计算机和海龟的磁盘空间限制,以字节为单位。",
|
||||
"gui.computercraft.config.default_computer_settings": "默认计算机设置",
|
||||
"gui.computercraft.config.disabled_generic_methods": "禁用的通用方法",
|
||||
"gui.computercraft.config.execution": "执行",
|
||||
"gui.computercraft.config.execution.computer_threads": "计算机线程数",
|
||||
"gui.computercraft.config.execution.max_main_computer_time": "服务器计算机tick时间限制",
|
||||
"gui.computercraft.config.execution.max_main_global_time": "服务器全局tick时间限制",
|
||||
"gui.computercraft.config.floppy_space_limit": "软盘空间限制(字节)",
|
||||
"gui.computercraft.config.http": "HTTP",
|
||||
"gui.computercraft.config.http.bandwidth": "带宽",
|
||||
"gui.computercraft.config.http.bandwidth.global_download": "全局下载限速",
|
||||
"gui.computercraft.config.http.bandwidth.global_download.tooltip": "每秒钟可以下载的字节数. 所有电脑共享该设置 (bytes/s).\n范围: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload": "全局上传限速",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload.tooltip": "每秒钟可以上传的字节数. 所有电脑共享该设置 (bytes/s).\n范围: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.tooltip": "限制电脑可以使用的带宽.",
|
||||
"gui.computercraft.config.http.enabled": "启用HTTP API",
|
||||
"gui.computercraft.config.http.max_requests": "最大并发请求数",
|
||||
"gui.computercraft.config.http.max_websockets": "最大并发websockets数",
|
||||
"gui.computercraft.config.http.proxy": "代理",
|
||||
"gui.computercraft.config.http.proxy.host": "主机名",
|
||||
"gui.computercraft.config.http.proxy.host.tooltip": "代理服务器的主机名或IP地址.",
|
||||
"gui.computercraft.config.http.proxy.port": "端口",
|
||||
"gui.computercraft.config.http.proxy.port.tooltip": "代理服务器的端口.\n范围: 1 ~ 65536",
|
||||
"gui.computercraft.config.http.proxy.type": "代理类型",
|
||||
"gui.computercraft.config.http.proxy.type.tooltip": "代理使用的协议.\n允许: HTTP, HTTPS, SOCKS4, SOCKS5",
|
||||
"gui.computercraft.config.http.rules": "允许/阻止规则",
|
||||
"gui.computercraft.config.http.tooltip": "控制HTTP API",
|
||||
"gui.computercraft.config.http.websocket_enabled": "启用websockets",
|
||||
"gui.computercraft.config.log_computer_errors": "记录计算机错误",
|
||||
"gui.computercraft.config.maximum_open_files": "每台计算机打开的最大文件数",
|
||||
@ -105,10 +130,19 @@
|
||||
"item.computercraft.printed_pages": "打印纸簇",
|
||||
"item.computercraft.treasure_disk": "软盘",
|
||||
"itemGroup.computercraft": "ComputerCraft",
|
||||
"tag.item.computercraft.turtle": "海龟",
|
||||
"tag.item.computercraft.wired_modem": "有线调制解调器",
|
||||
"tracking_field.computercraft.avg": "%s (平均)",
|
||||
"tracking_field.computercraft.computer_tasks.name": "任务",
|
||||
"tracking_field.computercraft.count": "%s (计数)",
|
||||
"tracking_field.computercraft.fs.name": "文件系统操作",
|
||||
"tracking_field.computercraft.http_download.name": "HTTP下载",
|
||||
"tracking_field.computercraft.http_requests.name": "HTTP请求",
|
||||
"tracking_field.computercraft.http_upload.name": "HTTP上传",
|
||||
"tracking_field.computercraft.java_allocation.name": "Java分配",
|
||||
"tracking_field.computercraft.max": "%s (最大)",
|
||||
"tracking_field.computercraft.peripheral.name": "外部设备呼叫",
|
||||
"tracking_field.computercraft.server_tasks.name": "服务器任务",
|
||||
"tracking_field.computercraft.turtle_ops.name": "海龟行动",
|
||||
"tracking_field.computercraft.websocket_incoming.name": "Websocket传入",
|
||||
"tracking_field.computercraft.websocket_outgoing.name": "Websocket传出",
|
||||
@ -120,41 +154,5 @@
|
||||
"upgrade.minecraft.diamond_hoe.adjective": "耕种",
|
||||
"upgrade.minecraft.diamond_pickaxe.adjective": "采掘",
|
||||
"upgrade.minecraft.diamond_shovel.adjective": "挖掘",
|
||||
"upgrade.minecraft.diamond_sword.adjective": "战斗",
|
||||
"argument.computercraft.computer.instance": "唯一实例ID",
|
||||
"commands.computercraft.dump.open_path": "查看该电脑的文件",
|
||||
"gui.computercraft.config.command_require_creative": "命令电脑需要创造模式",
|
||||
"gui.computercraft.config.command_require_creative.tooltip": "玩家需要处于创造模式并为管理员才能与命令计算机交互。\n这是原版命令方块的默认行为。",
|
||||
"gui.computercraft.config.http.bandwidth": "带宽",
|
||||
"gui.computercraft.config.http.bandwidth.global_download.tooltip": "每秒钟可以下载的字节数. 所有电脑共享该设置 (bytes/s).\n范围: > 1",
|
||||
"gui.computercraft.config.http.proxy.type.tooltip": "代理使用的协议.\n允许: HTTP, HTTPS, SOCKS4, SOCKS5",
|
||||
"argument.computercraft.computer.id": "电脑ID",
|
||||
"argument.computercraft.computer.distance": "实体距离",
|
||||
"argument.computercraft.computer.family": "电脑类别",
|
||||
"argument.computercraft.computer.label": "电脑标签",
|
||||
"argument.computercraft.unknown_computer_family": "未知电脑类别 '%s'",
|
||||
"commands.computercraft.help.desc": "显示该帮助信息",
|
||||
"gui.computercraft.config.computer_space_limit.tooltip": "计算机和海龟的磁盘空间限制,以字节为单位。",
|
||||
"gui.computercraft.config.disabled_generic_methods": "禁用的通用方法",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload": "全局上传限速",
|
||||
"gui.computercraft.config.http.bandwidth.global_download": "全局下载限速",
|
||||
"gui.computercraft.config.http.bandwidth.global_upload.tooltip": "每秒钟可以上传的字节数. 所有电脑共享该设置 (bytes/s).\n范围: > 1",
|
||||
"gui.computercraft.config.http.bandwidth.tooltip": "限制电脑可以使用的带宽.",
|
||||
"gui.computercraft.config.http.proxy": "代理",
|
||||
"gui.computercraft.config.http.proxy.host": "主机名",
|
||||
"gui.computercraft.config.http.proxy.host.tooltip": "代理服务器的主机名或IP地址.",
|
||||
"gui.computercraft.config.http.proxy.port": "端口",
|
||||
"gui.computercraft.config.http.proxy.port.tooltip": "代理服务器的端口.\n范围: 1 ~ 65536",
|
||||
"gui.computercraft.config.http.proxy.type": "代理类型",
|
||||
"gui.computercraft.config.http.rules": "允许/阻止规则",
|
||||
"gui.computercraft.config.http.tooltip": "控制HTTP API",
|
||||
"tracking_field.computercraft.java_allocation.name": "Java分配",
|
||||
"tracking_field.computercraft.max": "%s (最大)",
|
||||
"tracking_field.computercraft.server_tasks.name": "服务器任务",
|
||||
"tag.item.computercraft.turtle": "海龟",
|
||||
"tag.item.computercraft.wired_modem": "有线调制解调器",
|
||||
"tracking_field.computercraft.avg": "%s (平均)",
|
||||
"tracking_field.computercraft.computer_tasks.name": "任务",
|
||||
"tracking_field.computercraft.count": "%s (计数)",
|
||||
"tracking_field.computercraft.http_requests.name": "HTTP请求"
|
||||
"upgrade.minecraft.diamond_sword.adjective": "战斗"
|
||||
}
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 289 B |
Binary file not shown.
After Width: | Height: | Size: 334 B |
Binary file not shown.
After Width: | Height: | Size: 316 B |
Binary file not shown.
After Width: | Height: | Size: 289 B |
@ -7,6 +7,7 @@
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"mixins": [
|
||||
"DataFixersMixin",
|
||||
"ItemStackComponentizationFixMixin",
|
||||
"V1460Mixin",
|
||||
"V3818_3Mixin"
|
||||
|
@ -35,8 +35,6 @@ import net.minecraft.world.inventory.MenuType;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.crafting.CraftingInput;
|
||||
import net.minecraft.world.item.crafting.CraftingRecipe;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
@ -161,16 +159,6 @@ public class TestPlatformHelper extends AbstractComputerCraftAPI implements Plat
|
||||
throw new UnsupportedOperationException("Cannot interact with the world inside tests");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getRecipeRemainingItems(ServerPlayer player, CraftingRecipe recipe, CraftingInput container) {
|
||||
throw new UnsupportedOperationException("Cannot query recipes inside tests");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemCrafted(ServerPlayer player, CraftingInput container, ItemStack stack) {
|
||||
throw new UnsupportedOperationException("Cannot interact with the world inside tests");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInstalledVersion() {
|
||||
return "1.0";
|
||||
|
@ -9,7 +9,6 @@ import com.google.common.io.RecursiveDeleteOption;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
@ -20,8 +19,8 @@ import dan200.computercraft.gametest.core.TestHooks;
|
||||
import dan200.computercraft.shared.util.RegistryHelper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
import net.minecraft.world.item.crafting.display.ShapedCraftingRecipeDisplay;
|
||||
@ -34,9 +33,8 @@ import java.io.UncheckedIOException;
|
||||
import java.io.Writer;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Provides a {@literal /ccexport <path>} command which exports icons and recipes for all ComputerCraft items.
|
||||
@ -74,14 +72,10 @@ public class Exporter {
|
||||
private static void export(Path root, ImageRenderer renderer) throws IOException {
|
||||
var dump = new JsonDump();
|
||||
|
||||
Set<Item> items = new HashSet<>();
|
||||
|
||||
// First find all CC items
|
||||
for (var item : BuiltInRegistries.ITEM) {
|
||||
if (RegistryHelper.getKeyOrThrow(BuiltInRegistries.ITEM, item).getNamespace().equals(ComputerCraftAPI.MOD_ID)) {
|
||||
items.add(item);
|
||||
}
|
||||
}
|
||||
var items = BuiltInRegistries.ITEM.stream()
|
||||
.filter(x -> BuiltInRegistries.ITEM.getKey(x).getNamespace().equals(ComputerCraftAPI.MOD_ID))
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// Now find all CC recipes.
|
||||
var server = Objects.requireNonNull(Minecraft.getInstance().getSingleplayerServer());
|
||||
@ -127,10 +121,6 @@ public class Exporter {
|
||||
var itemDir = root.resolve("items");
|
||||
if (Files.exists(itemDir)) MoreFiles.deleteRecursively(itemDir, RecursiveDeleteOption.ALLOW_INSECURE);
|
||||
|
||||
renderer.setupState();
|
||||
var transform = new PoseStack();
|
||||
transform.setIdentity();
|
||||
|
||||
for (var item : items) {
|
||||
var stack = new ItemStack(item);
|
||||
var location = RegistryHelper.getKeyOrThrow(BuiltInRegistries.ITEM, item);
|
||||
@ -138,11 +128,13 @@ public class Exporter {
|
||||
dump.itemNames.put(location.toString(), stack.getHoverName().getString());
|
||||
renderer.captureRender(itemDir.resolve(location.getNamespace()).resolve(location.getPath() + ".png"),
|
||||
() -> {
|
||||
// TODO: Minecraft.getInstance().getItemRenderer().ren(transform, stack, 0, 0)
|
||||
|
||||
var graphics = new GuiGraphics(Minecraft.getInstance(), Minecraft.getInstance().renderBuffers().bufferSource());
|
||||
graphics.renderItem(stack, 0, 0);
|
||||
graphics.flush();
|
||||
}
|
||||
);
|
||||
}
|
||||
renderer.clearState();
|
||||
|
||||
try (Writer writer = Files.newBufferedWriter(root.resolve("index.json")); var jsonWriter = new PrettyJsonWriter(writer)) {
|
||||
GSON.toJson(dump, JsonDump.class, jsonWriter);
|
||||
|
@ -8,10 +8,10 @@ import com.mojang.blaze3d.ProjectionType;
|
||||
import com.mojang.blaze3d.pipeline.TextureTarget;
|
||||
import com.mojang.blaze3d.platform.NativeImage;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import org.joml.Matrix4f;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@ -26,38 +26,37 @@ public class ImageRenderer implements AutoCloseable {
|
||||
private final TextureTarget framebuffer = new TextureTarget(WIDTH, HEIGHT, true);
|
||||
private final NativeImage image = new NativeImage(WIDTH, HEIGHT, true);
|
||||
|
||||
private @Nullable Matrix4f projectionMatrix;
|
||||
|
||||
public ImageRenderer() {
|
||||
framebuffer.setClearColor(0, 0, 0, 0);
|
||||
framebuffer.clear();
|
||||
}
|
||||
|
||||
public void setupState() {
|
||||
public void captureRender(Path output, Runnable render) throws IOException {
|
||||
Files.createDirectories(output.getParent());
|
||||
|
||||
RenderSystem.clear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
|
||||
framebuffer.bindWrite(true);
|
||||
|
||||
// Setup rendering state
|
||||
RenderSystem.backupProjectionMatrix();
|
||||
RenderSystem.setProjectionMatrix(new Matrix4f().identity().ortho(0, 16, 0, 16, 1000, 3000), ProjectionType.ORTHOGRAPHIC);
|
||||
RenderSystem.setProjectionMatrix(new Matrix4f().identity().ortho(0, 16, 16, 0, 1000, 3000), ProjectionType.ORTHOGRAPHIC);
|
||||
|
||||
var transform = RenderSystem.getModelViewStack();
|
||||
transform.pushMatrix();
|
||||
transform.identity();
|
||||
transform.translate(0.0f, 0.0f, -2000.0f);
|
||||
|
||||
// FIXME: FogRenderer.toggleFog()
|
||||
}
|
||||
|
||||
public void clearState() {
|
||||
if (projectionMatrix == null) throw new IllegalStateException("Not currently rendering");
|
||||
RenderSystem.restoreProjectionMatrix();
|
||||
}
|
||||
|
||||
public void captureRender(Path output, Runnable render) throws IOException {
|
||||
Files.createDirectories(output.getParent());
|
||||
|
||||
framebuffer.bindWrite(true);
|
||||
RenderSystem.clear(GL12.GL_COLOR_BUFFER_BIT | GL12.GL_DEPTH_BUFFER_BIT);
|
||||
// Render
|
||||
render.run();
|
||||
framebuffer.unbindWrite();
|
||||
|
||||
// Restore rendering state
|
||||
RenderSystem.restoreProjectionMatrix();
|
||||
transform.popMatrix();
|
||||
|
||||
framebuffer.unbindWrite();
|
||||
Minecraft.getInstance().getMainRenderTarget().bindWrite(true);
|
||||
|
||||
// And save the image
|
||||
framebuffer.bindRead();
|
||||
image.downloadTexture(0, false);
|
||||
image.flipY();
|
||||
|
@ -0,0 +1,99 @@
|
||||
// SPDX-FileCopyrightText: 2024 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.gametest
|
||||
|
||||
import dan200.computercraft.core.computer.ComputerSide
|
||||
import dan200.computercraft.gametest.api.assertBlockHas
|
||||
import dan200.computercraft.gametest.api.getBlockEntity
|
||||
import dan200.computercraft.gametest.api.modifyBlock
|
||||
import dan200.computercraft.gametest.api.sequence
|
||||
import dan200.computercraft.shared.ModRegistry
|
||||
import dan200.computercraft.shared.peripheral.redstone.RedstoneRelayPeripheral
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.gametest.framework.GameTest
|
||||
import net.minecraft.gametest.framework.GameTestHelper
|
||||
import net.minecraft.world.level.block.Blocks
|
||||
import net.minecraft.world.level.block.LeverBlock
|
||||
import net.minecraft.world.level.block.RedstoneLampBlock
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
|
||||
class Relay_Test {
|
||||
/**
|
||||
* Ensures redstone signals do not travel through relay.
|
||||
*
|
||||
* @see [Computer_Test.No_through_signal]
|
||||
*/
|
||||
@GameTest
|
||||
fun No_through_signal(context: GameTestHelper) = context.sequence {
|
||||
val lamp = BlockPos(2, 2, 4)
|
||||
val lever = BlockPos(2, 2, 0)
|
||||
thenExecute {
|
||||
context.assertBlockHas(lamp, RedstoneLampBlock.LIT, false, "Lamp should not be lit")
|
||||
context.modifyBlock(lever) { x -> x.setValue(LeverBlock.POWERED, true) }
|
||||
}
|
||||
thenIdle(3)
|
||||
thenExecute { context.assertBlockHas(lamp, RedstoneLampBlock.LIT, false, "Lamp should still not be lit") }
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the above, but with a repeater before the relay
|
||||
*
|
||||
* @see [Computer_Test.No_through_signal_reverse]
|
||||
*/
|
||||
@GameTest
|
||||
fun No_through_signal_reverse(context: GameTestHelper) = context.sequence {
|
||||
val lamp = BlockPos(2, 2, 4)
|
||||
val lever = BlockPos(2, 2, 0)
|
||||
thenExecute {
|
||||
context.assertBlockHas(lamp, RedstoneLampBlock.LIT, false, "Lamp should not be lit")
|
||||
context.modifyBlock(lever) { x -> x.setValue(LeverBlock.POWERED, true) }
|
||||
}
|
||||
thenIdle(3)
|
||||
thenExecute { context.assertBlockHas(lamp, RedstoneLampBlock.LIT, false, "Lamp should still not be lit") }
|
||||
}
|
||||
|
||||
/**
|
||||
* Check relays propagate redstone to surrounding blocks.
|
||||
*
|
||||
* @see [Computer_Test.Set_and_destroy]
|
||||
*/
|
||||
@GameTest
|
||||
fun Set_and_destroy(context: GameTestHelper) = context.sequence {
|
||||
val lamp = BlockPos(2, 2, 3)
|
||||
|
||||
thenExecute {
|
||||
val peripheral = context.getBlockEntity(BlockPos(2, 2, 2), ModRegistry.BlockEntities.REDSTONE_RELAY.get())
|
||||
.peripheral()
|
||||
as RedstoneRelayPeripheral
|
||||
peripheral.setOutput(ComputerSide.BACK, true)
|
||||
}
|
||||
thenIdle(1)
|
||||
thenExecute { context.assertBlockHas(lamp, RedstoneLampBlock.LIT, true, "Lamp should be lit") }
|
||||
thenExecute { context.setBlock(BlockPos(2, 2, 2), Blocks.AIR) }
|
||||
thenIdle(4)
|
||||
thenExecute { context.assertBlockHas(lamp, RedstoneLampBlock.LIT, false, "Lamp should not be lit") }
|
||||
}
|
||||
|
||||
/**
|
||||
* Check relays pick up propagated redstone to surrounding blocks.
|
||||
*
|
||||
* @see [Computer_Test.Self_output_update]
|
||||
*/
|
||||
@GameTest
|
||||
fun Self_output_update(context: GameTestHelper) = context.sequence {
|
||||
fun relay() = context.getBlockEntity(BlockPos(2, 2, 2), ModRegistry.BlockEntities.REDSTONE_RELAY.get())
|
||||
.peripheral() as RedstoneRelayPeripheral
|
||||
|
||||
thenExecute { relay().setOutput(ComputerSide.BACK, true) }
|
||||
thenIdle(2)
|
||||
thenExecute { assertEquals(true, relay().getInput(ComputerSide.BACK), "Input should be on") }
|
||||
|
||||
thenIdle(2)
|
||||
|
||||
thenExecute { relay().setOutput(ComputerSide.BACK, false) }
|
||||
thenIdle(2)
|
||||
thenExecute { assertEquals(false, relay().getInput(ComputerSide.BACK), "Input should be off") }
|
||||
}
|
||||
}
|
@ -716,6 +716,34 @@ class Turtle_Test {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* `turtle.craft` leaves a remainder
|
||||
*
|
||||
* @see [#2007](https://github.com/cc-tweaked/CC-Tweaked/issues/2007)
|
||||
*/
|
||||
@GameTest
|
||||
fun Craft_remainder(helper: GameTestHelper) = helper.sequence {
|
||||
thenOnComputer {
|
||||
callPeripheral("left", "craft", 1).assertArrayEquals(true)
|
||||
}
|
||||
thenExecute {
|
||||
val turtle = helper.getBlockEntity(BlockPos(2, 2, 2), ModRegistry.BlockEntities.TURTLE_NORMAL.get())
|
||||
|
||||
val turtleStack = ItemStack(ModRegistry.Items.TURTLE_NORMAL.get())
|
||||
|
||||
assertThat(
|
||||
"Inventory is as expected.",
|
||||
turtle.items,
|
||||
contains(
|
||||
isStack(turtleStack), isStack(Items.WET_SPONGE, 1), isStack(ItemStack.EMPTY), isStack(ItemStack.EMPTY),
|
||||
isStack(ItemStack.EMPTY), isStack(ItemStack.EMPTY), isStack(ItemStack.EMPTY), isStack(ItemStack.EMPTY),
|
||||
isStack(ItemStack.EMPTY), isStack(ItemStack.EMPTY), isStack(ItemStack.EMPTY), isStack(ItemStack.EMPTY),
|
||||
isStack(ItemStack.EMPTY), isStack(ItemStack.EMPTY), isStack(ItemStack.EMPTY), isStack(ItemStack.EMPTY),
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* `turtle.equipLeft` equips a tool.
|
||||
*/
|
||||
|
@ -104,6 +104,7 @@ object TestHooks {
|
||||
Printer_Test::class.java,
|
||||
Printout_Test::class.java,
|
||||
Recipe_Test::class.java,
|
||||
Relay_Test::class.java,
|
||||
Speaker_Test::class.java,
|
||||
Turtle_Test::class.java,
|
||||
)
|
||||
|
141
projects/common/src/testMod/resources/data/cctest/structures/relay_test.no_through_signal.snbt
generated
Normal file
141
projects/common/src/testMod/resources/data/cctest/structures/relay_test.no_through_signal.snbt
generated
Normal file
@ -0,0 +1,141 @@
|
||||
{
|
||||
DataVersion: 2730,
|
||||
size: [5, 5, 5],
|
||||
data: [
|
||||
{pos: [0, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 1, 0], state: "minecraft:air"},
|
||||
{pos: [0, 1, 1], state: "minecraft:air"},
|
||||
{pos: [0, 1, 2], state: "minecraft:air"},
|
||||
{pos: [0, 1, 3], state: "minecraft:air"},
|
||||
{pos: [0, 1, 4], state: "minecraft:air"},
|
||||
{pos: [1, 1, 0], state: "minecraft:air"},
|
||||
{pos: [1, 1, 1], state: "minecraft:air"},
|
||||
{pos: [1, 1, 2], state: "minecraft:air"},
|
||||
{pos: [1, 1, 3], state: "minecraft:air"},
|
||||
{pos: [1, 1, 4], state: "minecraft:air"},
|
||||
{pos: [2, 1, 0], state: "minecraft:lever{face:floor,facing:south,powered:false}"},
|
||||
{pos: [2, 1, 1], state: "minecraft:repeater{delay:1,facing:north,locked:false,powered:false}"},
|
||||
{pos: [2, 1, 2], state: "computercraft:redstone_relay{facing:north}"},
|
||||
{pos: [2, 1, 3], state: "minecraft:redstone_wire{east:none,north:side,power:0,south:none,west:none}"},
|
||||
{pos: [2, 1, 4], state: "minecraft:redstone_lamp{lit:false}"},
|
||||
{pos: [3, 1, 0], state: "minecraft:air"},
|
||||
{pos: [3, 1, 1], state: "minecraft:air"},
|
||||
{pos: [3, 1, 2], state: "minecraft:air"},
|
||||
{pos: [3, 1, 3], state: "minecraft:air"},
|
||||
{pos: [3, 1, 4], state: "minecraft:air"},
|
||||
{pos: [4, 1, 0], state: "minecraft:air"},
|
||||
{pos: [4, 1, 1], state: "minecraft:air"},
|
||||
{pos: [4, 1, 2], state: "minecraft:air"},
|
||||
{pos: [4, 1, 3], state: "minecraft:air"},
|
||||
{pos: [4, 1, 4], state: "minecraft:air"},
|
||||
{pos: [0, 2, 0], state: "minecraft:air"},
|
||||
{pos: [0, 2, 1], state: "minecraft:air"},
|
||||
{pos: [0, 2, 2], state: "minecraft:air"},
|
||||
{pos: [0, 2, 3], state: "minecraft:air"},
|
||||
{pos: [0, 2, 4], state: "minecraft:air"},
|
||||
{pos: [1, 2, 0], state: "minecraft:air"},
|
||||
{pos: [1, 2, 1], state: "minecraft:air"},
|
||||
{pos: [1, 2, 2], state: "minecraft:air"},
|
||||
{pos: [1, 2, 3], state: "minecraft:air"},
|
||||
{pos: [1, 2, 4], state: "minecraft:air"},
|
||||
{pos: [2, 2, 0], state: "minecraft:air"},
|
||||
{pos: [2, 2, 1], state: "minecraft:air"},
|
||||
{pos: [2, 2, 2], state: "minecraft:air"},
|
||||
{pos: [2, 2, 3], state: "minecraft:air"},
|
||||
{pos: [2, 2, 4], state: "minecraft:air"},
|
||||
{pos: [3, 2, 0], state: "minecraft:air"},
|
||||
{pos: [3, 2, 1], state: "minecraft:air"},
|
||||
{pos: [3, 2, 2], state: "minecraft:air"},
|
||||
{pos: [3, 2, 3], state: "minecraft:air"},
|
||||
{pos: [3, 2, 4], state: "minecraft:air"},
|
||||
{pos: [4, 2, 0], state: "minecraft:air"},
|
||||
{pos: [4, 2, 1], state: "minecraft:air"},
|
||||
{pos: [4, 2, 2], state: "minecraft:air"},
|
||||
{pos: [4, 2, 3], state: "minecraft:air"},
|
||||
{pos: [4, 2, 4], state: "minecraft:air"},
|
||||
{pos: [0, 3, 0], state: "minecraft:air"},
|
||||
{pos: [0, 3, 1], state: "minecraft:air"},
|
||||
{pos: [0, 3, 2], state: "minecraft:air"},
|
||||
{pos: [0, 3, 3], state: "minecraft:air"},
|
||||
{pos: [0, 3, 4], state: "minecraft:air"},
|
||||
{pos: [1, 3, 0], state: "minecraft:air"},
|
||||
{pos: [1, 3, 1], state: "minecraft:air"},
|
||||
{pos: [1, 3, 2], state: "minecraft:air"},
|
||||
{pos: [1, 3, 3], state: "minecraft:air"},
|
||||
{pos: [1, 3, 4], state: "minecraft:air"},
|
||||
{pos: [2, 3, 0], state: "minecraft:air"},
|
||||
{pos: [2, 3, 1], state: "minecraft:air"},
|
||||
{pos: [2, 3, 2], state: "minecraft:air"},
|
||||
{pos: [2, 3, 3], state: "minecraft:air"},
|
||||
{pos: [2, 3, 4], state: "minecraft:air"},
|
||||
{pos: [3, 3, 0], state: "minecraft:air"},
|
||||
{pos: [3, 3, 1], state: "minecraft:air"},
|
||||
{pos: [3, 3, 2], state: "minecraft:air"},
|
||||
{pos: [3, 3, 3], state: "minecraft:air"},
|
||||
{pos: [3, 3, 4], state: "minecraft:air"},
|
||||
{pos: [4, 3, 0], state: "minecraft:air"},
|
||||
{pos: [4, 3, 1], state: "minecraft:air"},
|
||||
{pos: [4, 3, 2], state: "minecraft:air"},
|
||||
{pos: [4, 3, 3], state: "minecraft:air"},
|
||||
{pos: [4, 3, 4], state: "minecraft:air"},
|
||||
{pos: [0, 4, 0], state: "minecraft:air"},
|
||||
{pos: [0, 4, 1], state: "minecraft:air"},
|
||||
{pos: [0, 4, 2], state: "minecraft:air"},
|
||||
{pos: [0, 4, 3], state: "minecraft:air"},
|
||||
{pos: [0, 4, 4], state: "minecraft:air"},
|
||||
{pos: [1, 4, 0], state: "minecraft:air"},
|
||||
{pos: [1, 4, 1], state: "minecraft:air"},
|
||||
{pos: [1, 4, 2], state: "minecraft:air"},
|
||||
{pos: [1, 4, 3], state: "minecraft:air"},
|
||||
{pos: [1, 4, 4], state: "minecraft:air"},
|
||||
{pos: [2, 4, 0], state: "minecraft:air"},
|
||||
{pos: [2, 4, 1], state: "minecraft:air"},
|
||||
{pos: [2, 4, 2], state: "minecraft:air"},
|
||||
{pos: [2, 4, 3], state: "minecraft:air"},
|
||||
{pos: [2, 4, 4], state: "minecraft:air"},
|
||||
{pos: [3, 4, 0], state: "minecraft:air"},
|
||||
{pos: [3, 4, 1], state: "minecraft:air"},
|
||||
{pos: [3, 4, 2], state: "minecraft:air"},
|
||||
{pos: [3, 4, 3], state: "minecraft:air"},
|
||||
{pos: [3, 4, 4], state: "minecraft:air"},
|
||||
{pos: [4, 4, 0], state: "minecraft:air"},
|
||||
{pos: [4, 4, 1], state: "minecraft:air"},
|
||||
{pos: [4, 4, 2], state: "minecraft:air"},
|
||||
{pos: [4, 4, 3], state: "minecraft:air"},
|
||||
{pos: [4, 4, 4], state: "minecraft:air"}
|
||||
],
|
||||
entities: [],
|
||||
palette: [
|
||||
"minecraft:polished_andesite",
|
||||
"minecraft:redstone_lamp{lit:false}",
|
||||
"computercraft:redstone_relay{facing:north}",
|
||||
"minecraft:air",
|
||||
"minecraft:lever{face:floor,facing:south,powered:false}",
|
||||
"minecraft:repeater{delay:1,facing:north,locked:false,powered:false}",
|
||||
"minecraft:redstone_wire{east:none,north:side,power:0,south:none,west:none}"
|
||||
]
|
||||
}
|
141
projects/common/src/testMod/resources/data/cctest/structures/relay_test.no_through_signal_reverse.snbt
generated
Normal file
141
projects/common/src/testMod/resources/data/cctest/structures/relay_test.no_through_signal_reverse.snbt
generated
Normal file
@ -0,0 +1,141 @@
|
||||
{
|
||||
DataVersion: 3120,
|
||||
size: [5, 5, 5],
|
||||
data: [
|
||||
{pos: [0, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 1, 0], state: "minecraft:air"},
|
||||
{pos: [0, 1, 1], state: "minecraft:air"},
|
||||
{pos: [0, 1, 2], state: "minecraft:air"},
|
||||
{pos: [0, 1, 3], state: "minecraft:air"},
|
||||
{pos: [0, 1, 4], state: "minecraft:air"},
|
||||
{pos: [1, 1, 0], state: "minecraft:air"},
|
||||
{pos: [1, 1, 1], state: "minecraft:air"},
|
||||
{pos: [1, 1, 2], state: "minecraft:air"},
|
||||
{pos: [1, 1, 3], state: "minecraft:air"},
|
||||
{pos: [1, 1, 4], state: "minecraft:air"},
|
||||
{pos: [2, 1, 0], state: "minecraft:lever{face:floor,facing:south,powered:false}"},
|
||||
{pos: [2, 1, 1], state: "minecraft:repeater{delay:1,facing:north,locked:false,powered:false}"},
|
||||
{pos: [2, 1, 2], state: "computercraft:redstone_relay{facing:north}"},
|
||||
{pos: [2, 1, 3], state: "minecraft:redstone_wire{east:none,north:side,power:0,south:side,west:none}"},
|
||||
{pos: [2, 1, 4], state: "minecraft:redstone_lamp{lit:false}"},
|
||||
{pos: [3, 1, 0], state: "minecraft:air"},
|
||||
{pos: [3, 1, 1], state: "minecraft:air"},
|
||||
{pos: [3, 1, 2], state: "minecraft:air"},
|
||||
{pos: [3, 1, 3], state: "minecraft:air"},
|
||||
{pos: [3, 1, 4], state: "minecraft:air"},
|
||||
{pos: [4, 1, 0], state: "minecraft:air"},
|
||||
{pos: [4, 1, 1], state: "minecraft:air"},
|
||||
{pos: [4, 1, 2], state: "minecraft:air"},
|
||||
{pos: [4, 1, 3], state: "minecraft:air"},
|
||||
{pos: [4, 1, 4], state: "minecraft:air"},
|
||||
{pos: [0, 2, 0], state: "minecraft:air"},
|
||||
{pos: [0, 2, 1], state: "minecraft:air"},
|
||||
{pos: [0, 2, 2], state: "minecraft:air"},
|
||||
{pos: [0, 2, 3], state: "minecraft:air"},
|
||||
{pos: [0, 2, 4], state: "minecraft:air"},
|
||||
{pos: [1, 2, 0], state: "minecraft:air"},
|
||||
{pos: [1, 2, 1], state: "minecraft:air"},
|
||||
{pos: [1, 2, 2], state: "minecraft:air"},
|
||||
{pos: [1, 2, 3], state: "minecraft:air"},
|
||||
{pos: [1, 2, 4], state: "minecraft:air"},
|
||||
{pos: [2, 2, 0], state: "minecraft:air"},
|
||||
{pos: [2, 2, 1], state: "minecraft:air"},
|
||||
{pos: [2, 2, 2], state: "minecraft:air"},
|
||||
{pos: [2, 2, 3], state: "minecraft:air"},
|
||||
{pos: [2, 2, 4], state: "minecraft:air"},
|
||||
{pos: [3, 2, 0], state: "minecraft:air"},
|
||||
{pos: [3, 2, 1], state: "minecraft:air"},
|
||||
{pos: [3, 2, 2], state: "minecraft:air"},
|
||||
{pos: [3, 2, 3], state: "minecraft:air"},
|
||||
{pos: [3, 2, 4], state: "minecraft:air"},
|
||||
{pos: [4, 2, 0], state: "minecraft:air"},
|
||||
{pos: [4, 2, 1], state: "minecraft:air"},
|
||||
{pos: [4, 2, 2], state: "minecraft:air"},
|
||||
{pos: [4, 2, 3], state: "minecraft:air"},
|
||||
{pos: [4, 2, 4], state: "minecraft:air"},
|
||||
{pos: [0, 3, 0], state: "minecraft:air"},
|
||||
{pos: [0, 3, 1], state: "minecraft:air"},
|
||||
{pos: [0, 3, 2], state: "minecraft:air"},
|
||||
{pos: [0, 3, 3], state: "minecraft:air"},
|
||||
{pos: [0, 3, 4], state: "minecraft:air"},
|
||||
{pos: [1, 3, 0], state: "minecraft:air"},
|
||||
{pos: [1, 3, 1], state: "minecraft:air"},
|
||||
{pos: [1, 3, 2], state: "minecraft:air"},
|
||||
{pos: [1, 3, 3], state: "minecraft:air"},
|
||||
{pos: [1, 3, 4], state: "minecraft:air"},
|
||||
{pos: [2, 3, 0], state: "minecraft:air"},
|
||||
{pos: [2, 3, 1], state: "minecraft:air"},
|
||||
{pos: [2, 3, 2], state: "minecraft:air"},
|
||||
{pos: [2, 3, 3], state: "minecraft:air"},
|
||||
{pos: [2, 3, 4], state: "minecraft:air"},
|
||||
{pos: [3, 3, 0], state: "minecraft:air"},
|
||||
{pos: [3, 3, 1], state: "minecraft:air"},
|
||||
{pos: [3, 3, 2], state: "minecraft:air"},
|
||||
{pos: [3, 3, 3], state: "minecraft:air"},
|
||||
{pos: [3, 3, 4], state: "minecraft:air"},
|
||||
{pos: [4, 3, 0], state: "minecraft:air"},
|
||||
{pos: [4, 3, 1], state: "minecraft:air"},
|
||||
{pos: [4, 3, 2], state: "minecraft:air"},
|
||||
{pos: [4, 3, 3], state: "minecraft:air"},
|
||||
{pos: [4, 3, 4], state: "minecraft:air"},
|
||||
{pos: [0, 4, 0], state: "minecraft:air"},
|
||||
{pos: [0, 4, 1], state: "minecraft:air"},
|
||||
{pos: [0, 4, 2], state: "minecraft:air"},
|
||||
{pos: [0, 4, 3], state: "minecraft:air"},
|
||||
{pos: [0, 4, 4], state: "minecraft:air"},
|
||||
{pos: [1, 4, 0], state: "minecraft:air"},
|
||||
{pos: [1, 4, 1], state: "minecraft:air"},
|
||||
{pos: [1, 4, 2], state: "minecraft:air"},
|
||||
{pos: [1, 4, 3], state: "minecraft:air"},
|
||||
{pos: [1, 4, 4], state: "minecraft:air"},
|
||||
{pos: [2, 4, 0], state: "minecraft:air"},
|
||||
{pos: [2, 4, 1], state: "minecraft:air"},
|
||||
{pos: [2, 4, 2], state: "minecraft:air"},
|
||||
{pos: [2, 4, 3], state: "minecraft:air"},
|
||||
{pos: [2, 4, 4], state: "minecraft:air"},
|
||||
{pos: [3, 4, 0], state: "minecraft:air"},
|
||||
{pos: [3, 4, 1], state: "minecraft:air"},
|
||||
{pos: [3, 4, 2], state: "minecraft:air"},
|
||||
{pos: [3, 4, 3], state: "minecraft:air"},
|
||||
{pos: [3, 4, 4], state: "minecraft:air"},
|
||||
{pos: [4, 4, 0], state: "minecraft:air"},
|
||||
{pos: [4, 4, 1], state: "minecraft:air"},
|
||||
{pos: [4, 4, 2], state: "minecraft:air"},
|
||||
{pos: [4, 4, 3], state: "minecraft:air"},
|
||||
{pos: [4, 4, 4], state: "minecraft:air"}
|
||||
],
|
||||
entities: [],
|
||||
palette: [
|
||||
"minecraft:polished_andesite",
|
||||
"minecraft:redstone_lamp{lit:false}",
|
||||
"minecraft:air",
|
||||
"minecraft:lever{face:floor,facing:south,powered:false}",
|
||||
"minecraft:repeater{delay:1,facing:north,locked:false,powered:false}",
|
||||
"minecraft:redstone_wire{east:none,north:side,power:0,south:side,west:none}",
|
||||
"computercraft:redstone_relay{facing:north}"
|
||||
]
|
||||
}
|
137
projects/common/src/testMod/resources/data/cctest/structures/relay_test.self_output_update.snbt
generated
Normal file
137
projects/common/src/testMod/resources/data/cctest/structures/relay_test.self_output_update.snbt
generated
Normal file
@ -0,0 +1,137 @@
|
||||
{
|
||||
DataVersion: 3120,
|
||||
size: [5, 5, 5],
|
||||
data: [
|
||||
{pos: [0, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 1, 0], state: "minecraft:air"},
|
||||
{pos: [0, 1, 1], state: "minecraft:air"},
|
||||
{pos: [0, 1, 2], state: "minecraft:air"},
|
||||
{pos: [0, 1, 3], state: "minecraft:air"},
|
||||
{pos: [0, 1, 4], state: "minecraft:air"},
|
||||
{pos: [1, 1, 0], state: "minecraft:air"},
|
||||
{pos: [1, 1, 1], state: "minecraft:air"},
|
||||
{pos: [1, 1, 2], state: "minecraft:air"},
|
||||
{pos: [1, 1, 3], state: "minecraft:air"},
|
||||
{pos: [1, 1, 4], state: "minecraft:air"},
|
||||
{pos: [2, 1, 0], state: "minecraft:air"},
|
||||
{pos: [2, 1, 1], state: "minecraft:air"},
|
||||
{pos: [2, 1, 2], state: "computercraft:redstone_relay{facing:north}"},
|
||||
{pos: [2, 1, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 1, 4], state: "minecraft:air"},
|
||||
{pos: [3, 1, 0], state: "minecraft:air"},
|
||||
{pos: [3, 1, 1], state: "minecraft:air"},
|
||||
{pos: [3, 1, 2], state: "minecraft:air"},
|
||||
{pos: [3, 1, 3], state: "minecraft:air"},
|
||||
{pos: [3, 1, 4], state: "minecraft:air"},
|
||||
{pos: [4, 1, 0], state: "minecraft:air"},
|
||||
{pos: [4, 1, 1], state: "minecraft:air"},
|
||||
{pos: [4, 1, 2], state: "minecraft:air"},
|
||||
{pos: [4, 1, 3], state: "minecraft:air"},
|
||||
{pos: [4, 1, 4], state: "minecraft:air"},
|
||||
{pos: [0, 2, 0], state: "minecraft:air"},
|
||||
{pos: [0, 2, 1], state: "minecraft:air"},
|
||||
{pos: [0, 2, 2], state: "minecraft:air"},
|
||||
{pos: [0, 2, 3], state: "minecraft:air"},
|
||||
{pos: [0, 2, 4], state: "minecraft:air"},
|
||||
{pos: [1, 2, 0], state: "minecraft:air"},
|
||||
{pos: [1, 2, 1], state: "minecraft:air"},
|
||||
{pos: [1, 2, 2], state: "minecraft:air"},
|
||||
{pos: [1, 2, 3], state: "minecraft:air"},
|
||||
{pos: [1, 2, 4], state: "minecraft:air"},
|
||||
{pos: [2, 2, 0], state: "minecraft:air"},
|
||||
{pos: [2, 2, 1], state: "minecraft:air"},
|
||||
{pos: [2, 2, 2], state: "minecraft:air"},
|
||||
{pos: [2, 2, 3], state: "minecraft:air"},
|
||||
{pos: [2, 2, 4], state: "minecraft:air"},
|
||||
{pos: [3, 2, 0], state: "minecraft:air"},
|
||||
{pos: [3, 2, 1], state: "minecraft:air"},
|
||||
{pos: [3, 2, 2], state: "minecraft:air"},
|
||||
{pos: [3, 2, 3], state: "minecraft:air"},
|
||||
{pos: [3, 2, 4], state: "minecraft:air"},
|
||||
{pos: [4, 2, 0], state: "minecraft:air"},
|
||||
{pos: [4, 2, 1], state: "minecraft:air"},
|
||||
{pos: [4, 2, 2], state: "minecraft:air"},
|
||||
{pos: [4, 2, 3], state: "minecraft:air"},
|
||||
{pos: [4, 2, 4], state: "minecraft:air"},
|
||||
{pos: [0, 3, 0], state: "minecraft:air"},
|
||||
{pos: [0, 3, 1], state: "minecraft:air"},
|
||||
{pos: [0, 3, 2], state: "minecraft:air"},
|
||||
{pos: [0, 3, 3], state: "minecraft:air"},
|
||||
{pos: [0, 3, 4], state: "minecraft:air"},
|
||||
{pos: [1, 3, 0], state: "minecraft:air"},
|
||||
{pos: [1, 3, 1], state: "minecraft:air"},
|
||||
{pos: [1, 3, 2], state: "minecraft:air"},
|
||||
{pos: [1, 3, 3], state: "minecraft:air"},
|
||||
{pos: [1, 3, 4], state: "minecraft:air"},
|
||||
{pos: [2, 3, 0], state: "minecraft:air"},
|
||||
{pos: [2, 3, 1], state: "minecraft:air"},
|
||||
{pos: [2, 3, 2], state: "minecraft:air"},
|
||||
{pos: [2, 3, 3], state: "minecraft:air"},
|
||||
{pos: [2, 3, 4], state: "minecraft:air"},
|
||||
{pos: [3, 3, 0], state: "minecraft:air"},
|
||||
{pos: [3, 3, 1], state: "minecraft:air"},
|
||||
{pos: [3, 3, 2], state: "minecraft:air"},
|
||||
{pos: [3, 3, 3], state: "minecraft:air"},
|
||||
{pos: [3, 3, 4], state: "minecraft:air"},
|
||||
{pos: [4, 3, 0], state: "minecraft:air"},
|
||||
{pos: [4, 3, 1], state: "minecraft:air"},
|
||||
{pos: [4, 3, 2], state: "minecraft:air"},
|
||||
{pos: [4, 3, 3], state: "minecraft:air"},
|
||||
{pos: [4, 3, 4], state: "minecraft:air"},
|
||||
{pos: [0, 4, 0], state: "minecraft:air"},
|
||||
{pos: [0, 4, 1], state: "minecraft:air"},
|
||||
{pos: [0, 4, 2], state: "minecraft:air"},
|
||||
{pos: [0, 4, 3], state: "minecraft:air"},
|
||||
{pos: [0, 4, 4], state: "minecraft:air"},
|
||||
{pos: [1, 4, 0], state: "minecraft:air"},
|
||||
{pos: [1, 4, 1], state: "minecraft:air"},
|
||||
{pos: [1, 4, 2], state: "minecraft:air"},
|
||||
{pos: [1, 4, 3], state: "minecraft:air"},
|
||||
{pos: [1, 4, 4], state: "minecraft:air"},
|
||||
{pos: [2, 4, 0], state: "minecraft:air"},
|
||||
{pos: [2, 4, 1], state: "minecraft:air"},
|
||||
{pos: [2, 4, 2], state: "minecraft:air"},
|
||||
{pos: [2, 4, 3], state: "minecraft:air"},
|
||||
{pos: [2, 4, 4], state: "minecraft:air"},
|
||||
{pos: [3, 4, 0], state: "minecraft:air"},
|
||||
{pos: [3, 4, 1], state: "minecraft:air"},
|
||||
{pos: [3, 4, 2], state: "minecraft:air"},
|
||||
{pos: [3, 4, 3], state: "minecraft:air"},
|
||||
{pos: [3, 4, 4], state: "minecraft:air"},
|
||||
{pos: [4, 4, 0], state: "minecraft:air"},
|
||||
{pos: [4, 4, 1], state: "minecraft:air"},
|
||||
{pos: [4, 4, 2], state: "minecraft:air"},
|
||||
{pos: [4, 4, 3], state: "minecraft:air"},
|
||||
{pos: [4, 4, 4], state: "minecraft:air"}
|
||||
],
|
||||
entities: [],
|
||||
palette: [
|
||||
"minecraft:polished_andesite",
|
||||
"minecraft:air",
|
||||
"computercraft:redstone_relay{facing:north}"
|
||||
]
|
||||
}
|
138
projects/common/src/testMod/resources/data/cctest/structures/relay_test.set_and_destroy.snbt
generated
Normal file
138
projects/common/src/testMod/resources/data/cctest/structures/relay_test.set_and_destroy.snbt
generated
Normal file
@ -0,0 +1,138 @@
|
||||
{
|
||||
DataVersion: 3120,
|
||||
size: [5, 5, 5],
|
||||
data: [
|
||||
{pos: [0, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 1, 0], state: "minecraft:air"},
|
||||
{pos: [0, 1, 1], state: "minecraft:air"},
|
||||
{pos: [0, 1, 2], state: "minecraft:air"},
|
||||
{pos: [0, 1, 3], state: "minecraft:air"},
|
||||
{pos: [0, 1, 4], state: "minecraft:air"},
|
||||
{pos: [1, 1, 0], state: "minecraft:air"},
|
||||
{pos: [1, 1, 1], state: "minecraft:air"},
|
||||
{pos: [1, 1, 2], state: "minecraft:air"},
|
||||
{pos: [1, 1, 3], state: "minecraft:air"},
|
||||
{pos: [1, 1, 4], state: "minecraft:air"},
|
||||
{pos: [2, 1, 0], state: "minecraft:air"},
|
||||
{pos: [2, 1, 1], state: "minecraft:air"},
|
||||
{pos: [2, 1, 2], state: "computercraft:redstone_relay{facing:north}"},
|
||||
{pos: [2, 1, 3], state: "minecraft:redstone_lamp{lit:false}"},
|
||||
{pos: [2, 1, 4], state: "minecraft:air"},
|
||||
{pos: [3, 1, 0], state: "minecraft:air"},
|
||||
{pos: [3, 1, 1], state: "minecraft:air"},
|
||||
{pos: [3, 1, 2], state: "minecraft:air"},
|
||||
{pos: [3, 1, 3], state: "minecraft:air"},
|
||||
{pos: [3, 1, 4], state: "minecraft:air"},
|
||||
{pos: [4, 1, 0], state: "minecraft:air"},
|
||||
{pos: [4, 1, 1], state: "minecraft:air"},
|
||||
{pos: [4, 1, 2], state: "minecraft:air"},
|
||||
{pos: [4, 1, 3], state: "minecraft:air"},
|
||||
{pos: [4, 1, 4], state: "minecraft:air"},
|
||||
{pos: [0, 2, 0], state: "minecraft:air"},
|
||||
{pos: [0, 2, 1], state: "minecraft:air"},
|
||||
{pos: [0, 2, 2], state: "minecraft:air"},
|
||||
{pos: [0, 2, 3], state: "minecraft:air"},
|
||||
{pos: [0, 2, 4], state: "minecraft:air"},
|
||||
{pos: [1, 2, 0], state: "minecraft:air"},
|
||||
{pos: [1, 2, 1], state: "minecraft:air"},
|
||||
{pos: [1, 2, 2], state: "minecraft:air"},
|
||||
{pos: [1, 2, 3], state: "minecraft:air"},
|
||||
{pos: [1, 2, 4], state: "minecraft:air"},
|
||||
{pos: [2, 2, 0], state: "minecraft:air"},
|
||||
{pos: [2, 2, 1], state: "minecraft:air"},
|
||||
{pos: [2, 2, 2], state: "minecraft:air"},
|
||||
{pos: [2, 2, 3], state: "minecraft:air"},
|
||||
{pos: [2, 2, 4], state: "minecraft:air"},
|
||||
{pos: [3, 2, 0], state: "minecraft:air"},
|
||||
{pos: [3, 2, 1], state: "minecraft:air"},
|
||||
{pos: [3, 2, 2], state: "minecraft:air"},
|
||||
{pos: [3, 2, 3], state: "minecraft:air"},
|
||||
{pos: [3, 2, 4], state: "minecraft:air"},
|
||||
{pos: [4, 2, 0], state: "minecraft:air"},
|
||||
{pos: [4, 2, 1], state: "minecraft:air"},
|
||||
{pos: [4, 2, 2], state: "minecraft:air"},
|
||||
{pos: [4, 2, 3], state: "minecraft:air"},
|
||||
{pos: [4, 2, 4], state: "minecraft:air"},
|
||||
{pos: [0, 3, 0], state: "minecraft:air"},
|
||||
{pos: [0, 3, 1], state: "minecraft:air"},
|
||||
{pos: [0, 3, 2], state: "minecraft:air"},
|
||||
{pos: [0, 3, 3], state: "minecraft:air"},
|
||||
{pos: [0, 3, 4], state: "minecraft:air"},
|
||||
{pos: [1, 3, 0], state: "minecraft:air"},
|
||||
{pos: [1, 3, 1], state: "minecraft:air"},
|
||||
{pos: [1, 3, 2], state: "minecraft:air"},
|
||||
{pos: [1, 3, 3], state: "minecraft:air"},
|
||||
{pos: [1, 3, 4], state: "minecraft:air"},
|
||||
{pos: [2, 3, 0], state: "minecraft:air"},
|
||||
{pos: [2, 3, 1], state: "minecraft:air"},
|
||||
{pos: [2, 3, 2], state: "minecraft:air"},
|
||||
{pos: [2, 3, 3], state: "minecraft:air"},
|
||||
{pos: [2, 3, 4], state: "minecraft:air"},
|
||||
{pos: [3, 3, 0], state: "minecraft:air"},
|
||||
{pos: [3, 3, 1], state: "minecraft:air"},
|
||||
{pos: [3, 3, 2], state: "minecraft:air"},
|
||||
{pos: [3, 3, 3], state: "minecraft:air"},
|
||||
{pos: [3, 3, 4], state: "minecraft:air"},
|
||||
{pos: [4, 3, 0], state: "minecraft:air"},
|
||||
{pos: [4, 3, 1], state: "minecraft:air"},
|
||||
{pos: [4, 3, 2], state: "minecraft:air"},
|
||||
{pos: [4, 3, 3], state: "minecraft:air"},
|
||||
{pos: [4, 3, 4], state: "minecraft:air"},
|
||||
{pos: [0, 4, 0], state: "minecraft:air"},
|
||||
{pos: [0, 4, 1], state: "minecraft:air"},
|
||||
{pos: [0, 4, 2], state: "minecraft:air"},
|
||||
{pos: [0, 4, 3], state: "minecraft:air"},
|
||||
{pos: [0, 4, 4], state: "minecraft:air"},
|
||||
{pos: [1, 4, 0], state: "minecraft:air"},
|
||||
{pos: [1, 4, 1], state: "minecraft:air"},
|
||||
{pos: [1, 4, 2], state: "minecraft:air"},
|
||||
{pos: [1, 4, 3], state: "minecraft:air"},
|
||||
{pos: [1, 4, 4], state: "minecraft:air"},
|
||||
{pos: [2, 4, 0], state: "minecraft:air"},
|
||||
{pos: [2, 4, 1], state: "minecraft:air"},
|
||||
{pos: [2, 4, 2], state: "minecraft:air"},
|
||||
{pos: [2, 4, 3], state: "minecraft:air"},
|
||||
{pos: [2, 4, 4], state: "minecraft:air"},
|
||||
{pos: [3, 4, 0], state: "minecraft:air"},
|
||||
{pos: [3, 4, 1], state: "minecraft:air"},
|
||||
{pos: [3, 4, 2], state: "minecraft:air"},
|
||||
{pos: [3, 4, 3], state: "minecraft:air"},
|
||||
{pos: [3, 4, 4], state: "minecraft:air"},
|
||||
{pos: [4, 4, 0], state: "minecraft:air"},
|
||||
{pos: [4, 4, 1], state: "minecraft:air"},
|
||||
{pos: [4, 4, 2], state: "minecraft:air"},
|
||||
{pos: [4, 4, 3], state: "minecraft:air"},
|
||||
{pos: [4, 4, 4], state: "minecraft:air"}
|
||||
],
|
||||
entities: [],
|
||||
palette: [
|
||||
"minecraft:polished_andesite",
|
||||
"minecraft:redstone_lamp{lit:false}",
|
||||
"minecraft:air",
|
||||
"computercraft:redstone_relay{facing:north}"
|
||||
]
|
||||
}
|
137
projects/common/src/testMod/resources/data/cctest/structures/turtle_test.craft_remainder.snbt
generated
Normal file
137
projects/common/src/testMod/resources/data/cctest/structures/turtle_test.craft_remainder.snbt
generated
Normal file
@ -0,0 +1,137 @@
|
||||
{
|
||||
DataVersion: 3465,
|
||||
size: [5, 5, 5],
|
||||
data: [
|
||||
{pos: [0, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [1, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [2, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [3, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 0], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 1], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 2], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 3], state: "minecraft:polished_andesite"},
|
||||
{pos: [4, 0, 4], state: "minecraft:polished_andesite"},
|
||||
{pos: [0, 1, 0], state: "minecraft:air"},
|
||||
{pos: [0, 1, 1], state: "minecraft:air"},
|
||||
{pos: [0, 1, 2], state: "minecraft:air"},
|
||||
{pos: [0, 1, 3], state: "minecraft:air"},
|
||||
{pos: [0, 1, 4], state: "minecraft:air"},
|
||||
{pos: [1, 1, 0], state: "minecraft:air"},
|
||||
{pos: [1, 1, 1], state: "minecraft:air"},
|
||||
{pos: [1, 1, 2], state: "minecraft:air"},
|
||||
{pos: [1, 1, 3], state: "minecraft:air"},
|
||||
{pos: [1, 1, 4], state: "minecraft:air"},
|
||||
{pos: [2, 1, 0], state: "minecraft:air"},
|
||||
{pos: [2, 1, 1], state: "minecraft:air"},
|
||||
{pos: [2, 1, 2], state: "computercraft:turtle_normal{facing:north,waterlogged:false}", nbt: {ComputerId: 1, Fuel: 0, Items: [{Count: 1b, Slot: 0b, id: "computercraft:turtle_normal", tag: {Color: 13388876}}, {Count: 1b, Slot: 1b, id: "minecraft:wet_sponge"}], Label: "turtle_test.craft_remainder", LeftUpgrade: "minecraft:crafting_table", LeftUpgradeNbt: {}, On: 1b, Slot: 0, id: "computercraft:turtle_normal"}},
|
||||
{pos: [2, 1, 3], state: "minecraft:air"},
|
||||
{pos: [2, 1, 4], state: "minecraft:air"},
|
||||
{pos: [3, 1, 0], state: "minecraft:air"},
|
||||
{pos: [3, 1, 1], state: "minecraft:air"},
|
||||
{pos: [3, 1, 2], state: "minecraft:air"},
|
||||
{pos: [3, 1, 3], state: "minecraft:air"},
|
||||
{pos: [3, 1, 4], state: "minecraft:air"},
|
||||
{pos: [4, 1, 0], state: "minecraft:air"},
|
||||
{pos: [4, 1, 1], state: "minecraft:air"},
|
||||
{pos: [4, 1, 2], state: "minecraft:air"},
|
||||
{pos: [4, 1, 3], state: "minecraft:air"},
|
||||
{pos: [4, 1, 4], state: "minecraft:air"},
|
||||
{pos: [0, 2, 0], state: "minecraft:air"},
|
||||
{pos: [0, 2, 1], state: "minecraft:air"},
|
||||
{pos: [0, 2, 2], state: "minecraft:air"},
|
||||
{pos: [0, 2, 3], state: "minecraft:air"},
|
||||
{pos: [0, 2, 4], state: "minecraft:air"},
|
||||
{pos: [1, 2, 0], state: "minecraft:air"},
|
||||
{pos: [1, 2, 1], state: "minecraft:air"},
|
||||
{pos: [1, 2, 2], state: "minecraft:air"},
|
||||
{pos: [1, 2, 3], state: "minecraft:air"},
|
||||
{pos: [1, 2, 4], state: "minecraft:air"},
|
||||
{pos: [2, 2, 0], state: "minecraft:air"},
|
||||
{pos: [2, 2, 1], state: "minecraft:air"},
|
||||
{pos: [2, 2, 2], state: "minecraft:air"},
|
||||
{pos: [2, 2, 3], state: "minecraft:air"},
|
||||
{pos: [2, 2, 4], state: "minecraft:air"},
|
||||
{pos: [3, 2, 0], state: "minecraft:air"},
|
||||
{pos: [3, 2, 1], state: "minecraft:air"},
|
||||
{pos: [3, 2, 2], state: "minecraft:air"},
|
||||
{pos: [3, 2, 3], state: "minecraft:air"},
|
||||
{pos: [3, 2, 4], state: "minecraft:air"},
|
||||
{pos: [4, 2, 0], state: "minecraft:air"},
|
||||
{pos: [4, 2, 1], state: "minecraft:air"},
|
||||
{pos: [4, 2, 2], state: "minecraft:air"},
|
||||
{pos: [4, 2, 3], state: "minecraft:air"},
|
||||
{pos: [4, 2, 4], state: "minecraft:air"},
|
||||
{pos: [0, 3, 0], state: "minecraft:air"},
|
||||
{pos: [0, 3, 1], state: "minecraft:air"},
|
||||
{pos: [0, 3, 2], state: "minecraft:air"},
|
||||
{pos: [0, 3, 3], state: "minecraft:air"},
|
||||
{pos: [0, 3, 4], state: "minecraft:air"},
|
||||
{pos: [1, 3, 0], state: "minecraft:air"},
|
||||
{pos: [1, 3, 1], state: "minecraft:air"},
|
||||
{pos: [1, 3, 2], state: "minecraft:air"},
|
||||
{pos: [1, 3, 3], state: "minecraft:air"},
|
||||
{pos: [1, 3, 4], state: "minecraft:air"},
|
||||
{pos: [2, 3, 0], state: "minecraft:air"},
|
||||
{pos: [2, 3, 1], state: "minecraft:air"},
|
||||
{pos: [2, 3, 2], state: "minecraft:air"},
|
||||
{pos: [2, 3, 3], state: "minecraft:air"},
|
||||
{pos: [2, 3, 4], state: "minecraft:air"},
|
||||
{pos: [3, 3, 0], state: "minecraft:air"},
|
||||
{pos: [3, 3, 1], state: "minecraft:air"},
|
||||
{pos: [3, 3, 2], state: "minecraft:air"},
|
||||
{pos: [3, 3, 3], state: "minecraft:air"},
|
||||
{pos: [3, 3, 4], state: "minecraft:air"},
|
||||
{pos: [4, 3, 0], state: "minecraft:air"},
|
||||
{pos: [4, 3, 1], state: "minecraft:air"},
|
||||
{pos: [4, 3, 2], state: "minecraft:air"},
|
||||
{pos: [4, 3, 3], state: "minecraft:air"},
|
||||
{pos: [4, 3, 4], state: "minecraft:air"},
|
||||
{pos: [0, 4, 0], state: "minecraft:air"},
|
||||
{pos: [0, 4, 1], state: "minecraft:air"},
|
||||
{pos: [0, 4, 2], state: "minecraft:air"},
|
||||
{pos: [0, 4, 3], state: "minecraft:air"},
|
||||
{pos: [0, 4, 4], state: "minecraft:air"},
|
||||
{pos: [1, 4, 0], state: "minecraft:air"},
|
||||
{pos: [1, 4, 1], state: "minecraft:air"},
|
||||
{pos: [1, 4, 2], state: "minecraft:air"},
|
||||
{pos: [1, 4, 3], state: "minecraft:air"},
|
||||
{pos: [1, 4, 4], state: "minecraft:air"},
|
||||
{pos: [2, 4, 0], state: "minecraft:air"},
|
||||
{pos: [2, 4, 1], state: "minecraft:air"},
|
||||
{pos: [2, 4, 2], state: "minecraft:air"},
|
||||
{pos: [2, 4, 3], state: "minecraft:air"},
|
||||
{pos: [2, 4, 4], state: "minecraft:air"},
|
||||
{pos: [3, 4, 0], state: "minecraft:air"},
|
||||
{pos: [3, 4, 1], state: "minecraft:air"},
|
||||
{pos: [3, 4, 2], state: "minecraft:air"},
|
||||
{pos: [3, 4, 3], state: "minecraft:air"},
|
||||
{pos: [3, 4, 4], state: "minecraft:air"},
|
||||
{pos: [4, 4, 0], state: "minecraft:air"},
|
||||
{pos: [4, 4, 1], state: "minecraft:air"},
|
||||
{pos: [4, 4, 2], state: "minecraft:air"},
|
||||
{pos: [4, 4, 3], state: "minecraft:air"},
|
||||
{pos: [4, 4, 4], state: "minecraft:air"}
|
||||
],
|
||||
entities: [],
|
||||
palette: [
|
||||
"minecraft:polished_andesite",
|
||||
"minecraft:air",
|
||||
"computercraft:turtle_normal{facing:north,waterlogged:false}"
|
||||
]
|
||||
}
|
@ -11,12 +11,12 @@ package dan200.computercraft.api.lua;
|
||||
* the given type, rather than requiring an exact type.
|
||||
*
|
||||
* <h2>Example:</h2>
|
||||
* <pre>{@code
|
||||
* {@snippet lang="java" :
|
||||
* @LuaFunction
|
||||
* public final void doSomething(Coerced<String> myString) {
|
||||
* var value = myString.value();
|
||||
* }
|
||||
* }</pre>
|
||||
* }
|
||||
*
|
||||
* @param value The argument value.
|
||||
* @param <T> The type of the underlying value.
|
||||
|
@ -21,16 +21,16 @@ import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
* <p>
|
||||
* For example, the main CC: Tweaked mod defines a generic source for inventories, which works on {@code IItemHandler}s:
|
||||
*
|
||||
* <pre>{@code
|
||||
* {@snippet lang="java" :
|
||||
* public class InventoryMethods implements GenericSource {
|
||||
* \@LuaFunction( mainThread = true )
|
||||
* @LuaFunction(mainThread = true)
|
||||
* public int size(IItemHandler inventory) {
|
||||
* return inventory.getSlots();
|
||||
* }
|
||||
*
|
||||
* // ...
|
||||
* }
|
||||
* }</pre>
|
||||
* }
|
||||
* <p>
|
||||
* New capabilities or block lookups (those not built into Forge/Fabric) must be explicitly registered using the
|
||||
* loader-specific API.
|
||||
|
@ -7,11 +7,13 @@
|
||||
* <p>
|
||||
* You probably want to start in the following places:
|
||||
* <ul>
|
||||
* <li>{@link dan200.computercraft.api.peripheral.IPeripheral} for registering new peripherals.</li>
|
||||
* <li>{@link dan200.computercraft.api.peripheral} for registering new peripherals.</li>
|
||||
* <li>
|
||||
* {@link dan200.computercraft.api.lua.LuaFunction} and {@link dan200.computercraft.api.lua.IArguments} for
|
||||
* adding methods to your peripheral or Lua objects.
|
||||
* </li>
|
||||
* <li>{@link dan200.computercraft.api.turtle.ITurtleUpgrade} for turtle upgrades.</li>
|
||||
* <li>{@link dan200.computercraft.api.pocket.IPocketUpgrade} for pocket upgrades.</li>
|
||||
* </ul>
|
||||
*/
|
||||
@DefaultQualifier(value = NonNull.class, locations = {
|
||||
|
@ -0,0 +1,129 @@
|
||||
// SPDX-FileCopyrightText: 2024 The CC: Tweaked Developers
|
||||
//
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package dan200.computercraft.api.peripheral;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* A thread-safe collection of computers.
|
||||
* <p>
|
||||
* This collection is intended to be used by peripherals that need to maintain a set of all attached computers.
|
||||
* <p>
|
||||
* It is recommended to use over Java's built-in concurrent collections (e.g. {@link CopyOnWriteArraySet} or
|
||||
* {@link ConcurrentHashMap}), as {@link AttachedComputerSet} ensures that computers cannot be accessed after they are
|
||||
* detached, guaranteeing that {@link NotAttachedException}s will not be thrown.
|
||||
* <p>
|
||||
* To ensure this, {@link AttachedComputerSet} is not directly iterable, as we cannot ensure that computers are not
|
||||
* detached while the iterator is running (and so trying to use the computer would error). Instead, computers should be
|
||||
* looped over using {@link #forEach(Consumer)}.
|
||||
*
|
||||
* <h2>Example</h2>
|
||||
*
|
||||
* {@snippet lang="java" :
|
||||
* public class MyPeripheral implements IPeripheral {
|
||||
* private final AttachedComputerSet computers = new ComputerCollection();
|
||||
*
|
||||
* @Override
|
||||
* public void attach(IComputerAccess computer) {
|
||||
* computers.add(computer);
|
||||
* }
|
||||
*
|
||||
* @Override
|
||||
* public void detach(IComputerAccess computer) {
|
||||
* computers.remove(computer);
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* @see IComputerAccess
|
||||
* @see IPeripheral#attach(IComputerAccess)
|
||||
* @see IPeripheral#detach(IComputerAccess)
|
||||
*/
|
||||
public final class AttachedComputerSet {
|
||||
private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
|
||||
private final Set<IComputerAccess> computers = new HashSet<>(0);
|
||||
|
||||
/**
|
||||
* Add a computer to this collection of computers. This should be called from
|
||||
* {@link IPeripheral#attach(IComputerAccess)}.
|
||||
*
|
||||
* @param computer The computer to add.
|
||||
*/
|
||||
public void add(IComputerAccess computer) {
|
||||
lock.writeLock().lock();
|
||||
try {
|
||||
computers.add(computer);
|
||||
} finally {
|
||||
lock.writeLock().unlock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a computer from this collection of computers. This should be called from
|
||||
* {@link IPeripheral#detach(IComputerAccess)}.
|
||||
*
|
||||
* @param computer The computer to remove.
|
||||
*/
|
||||
public void remove(IComputerAccess computer) {
|
||||
lock.writeLock().lock();
|
||||
try {
|
||||
computers.remove(computer);
|
||||
} finally {
|
||||
lock.writeLock().unlock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply an action to each computer in this collection.
|
||||
*
|
||||
* @param action The action to apply.
|
||||
*/
|
||||
public void forEach(Consumer<? super IComputerAccess> action) {
|
||||
lock.readLock().lock();
|
||||
try {
|
||||
computers.forEach(action);
|
||||
} finally {
|
||||
lock.readLock().unlock();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@linkplain IComputerAccess#queueEvent(String, Object...) Queue an event} on all computers.
|
||||
*
|
||||
* @param event The name of the event to queue.
|
||||
* @param arguments The arguments for this event.
|
||||
* @see IComputerAccess#queueEvent(String, Object...)
|
||||
*/
|
||||
public void queueEvent(String event, @Nullable Object... arguments) {
|
||||
forEach(c -> c.queueEvent(event, arguments));
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if this collection contains any computers.
|
||||
* <p>
|
||||
* This method is primarily intended for presentation purposes (such as rendering an icon in the UI if a computer
|
||||
* is attached to your peripheral). Due to the multi-threaded nature of peripherals, it is not recommended to guard
|
||||
* any logic behind this check.
|
||||
* <p>
|
||||
* For instance, {@code if(computers.hasComputers()) computers.queueEvent("foo");} contains a race condition, as
|
||||
* there's no guarantee that any computers are still attached within the body of the if statement.
|
||||
*
|
||||
* @return Whether this collection is non-empty.
|
||||
*/
|
||||
public boolean hasComputers() {
|
||||
lock.readLock().lock();
|
||||
try {
|
||||
return !computers.isEmpty();
|
||||
} finally {
|
||||
lock.readLock().unlock();
|
||||
}
|
||||
}
|
||||
}
|
@ -19,17 +19,17 @@ public interface GenericPeripheral extends GenericSource {
|
||||
* Unlike normal {@link IPeripheral}s, {@link GenericPeripheral} do not have to have a type. By default, the
|
||||
* resulting peripheral uses the resource name of the wrapped block entity (for instance {@code minecraft:chest}).
|
||||
* <p>
|
||||
* However, in some cases it may be more appropriate to specify a more readable name. Overriding this method allows
|
||||
* you to do so.
|
||||
* However, in some cases it may be more appropriate to specify a more readable name, or provide
|
||||
* {@linkplain PeripheralType#getAdditionalTypes() additional types}. Overriding this method allows you to do so.
|
||||
* <p>
|
||||
* When multiple {@link GenericPeripheral}s return a non-empty peripheral type for a single tile entity, the
|
||||
* lexicographically smallest will be chosen. In order to avoid this conflict, this method should only be
|
||||
* implemented when your peripheral targets a single tile entity <strong>AND</strong> it's likely that you're the
|
||||
* only mod to do so. Similarly this should <strong>NOT</strong> be implemented when your methods target a
|
||||
* capability or other interface (such as Forge's {@code IItemHandler}).
|
||||
* When multiple {@link GenericPeripheral}s provide a {@linkplain PeripheralType#getPrimaryType() primary peripheral
|
||||
* type} for a single block entity, the lexicographically smallest will be chosen. In order to avoid this conflict,
|
||||
* primary types should only be used when your peripheral targets a single block entity <strong>AND</strong> it's
|
||||
* likely that you're the only mod to do so.
|
||||
*
|
||||
* @return The type of this peripheral or {@link PeripheralType#untyped()}.
|
||||
* @see IPeripheral#getType()
|
||||
* @see IPeripheral#getAdditionalTypes()
|
||||
*/
|
||||
default PeripheralType getType() {
|
||||
return PeripheralType.untyped();
|
||||
|
@ -10,7 +10,6 @@ import dan200.computercraft.api.lua.*;
|
||||
* A peripheral whose methods are not known at runtime.
|
||||
* <p>
|
||||
* This behaves similarly to {@link IDynamicLuaObject}, though also accepting the current {@link IComputerAccess}.
|
||||
* Generally one may use {@link LuaFunction} instead of implementing this interface.
|
||||
*/
|
||||
public interface IDynamicPeripheral extends IPeripheral {
|
||||
/**
|
||||
|
@ -4,19 +4,28 @@
|
||||
|
||||
package dan200.computercraft.api.peripheral;
|
||||
|
||||
import dan200.computercraft.api.lua.ILuaContext;
|
||||
import dan200.computercraft.api.lua.LuaFunction;
|
||||
import dan200.computercraft.api.lua.LuaTask;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* The interface that defines a peripheral.
|
||||
* A peripheral is an external device that a computer can interact with.
|
||||
* <p>
|
||||
* In order to expose a peripheral for your block or block entity, you should either attach a capability (Forge) or
|
||||
* use the block lookup API (Fabric). This interface <em>cannot</em> be implemented directly on the block entity.
|
||||
* Peripherals can be supplied by both a block (or block entity), or from
|
||||
* {@linkplain dan200.computercraft.api.turtle.ITurtleUpgrade#createPeripheral(dan200.computercraft.api.turtle.ITurtleAccess, dan200.computercraft.api.turtle.TurtleSide) turtle}
|
||||
* or {@linkplain dan200.computercraft.api.pocket.IPocketUpgrade#createPeripheral(dan200.computercraft.api.pocket.IPocketAccess) pocket}
|
||||
* upgrades.
|
||||
* <p>
|
||||
* Peripherals should provide a series of methods to the user, either using {@link LuaFunction} or by implementing
|
||||
* {@link IDynamicPeripheral}.
|
||||
* See the {@linkplain dan200.computercraft.api.peripheral package documentation} for more information on registering peripherals.
|
||||
* <p>
|
||||
* Peripherals should provide a series of methods to the user, typically by annotating Java methods with
|
||||
* {@link LuaFunction}. Alternatively, {@link IDynamicPeripheral} may be used to provide a dynamic set of methods.
|
||||
* Remember that peripheral methods are called on the <em>computer</em> thread, and so it is not safe to interact with
|
||||
* the Minecraft world by default. One should use {@link LuaFunction#mainThread()} or
|
||||
* {@link ILuaContext#executeMainThreadTask(LuaTask)} to run code on the main server thread.
|
||||
*/
|
||||
public interface IPeripheral {
|
||||
/**
|
||||
@ -24,6 +33,7 @@ public interface IPeripheral {
|
||||
* This can be queried from lua by calling {@code peripheral.getType()}
|
||||
*
|
||||
* @return A string identifying the type of peripheral.
|
||||
* @see PeripheralType#getPrimaryType()
|
||||
*/
|
||||
String getType();
|
||||
|
||||
@ -48,8 +58,9 @@ public interface IPeripheral {
|
||||
* {@code peripheral.call()}. This method can be used to keep track of which computers are attached to the
|
||||
* peripheral, or to take action when attachment occurs.
|
||||
* <p>
|
||||
* Be aware that will be called from both the server thread and ComputerCraft Lua thread, and so must be thread-safe
|
||||
* and reentrant.
|
||||
* Be aware that may be called from both the server thread and ComputerCraft Lua thread, and so must be thread-safe
|
||||
* and reentrant. If you need to store a list of attached computers, it is recommended you use a
|
||||
* {@link AttachedComputerSet}.
|
||||
*
|
||||
* @param computer The interface to the computer that is being attached. Remember that multiple computers can be
|
||||
* attached to a peripheral at once.
|
||||
@ -68,8 +79,9 @@ public interface IPeripheral {
|
||||
* This method can be used to keep track of which computers are attached to the peripheral, or to take action when
|
||||
* detachment occurs.
|
||||
* <p>
|
||||
* Be aware that this will be called from both the server and ComputerCraft Lua thread, and must be thread-safe
|
||||
* and reentrant.
|
||||
* Be aware that this may be called from both the server and ComputerCraft Lua thread, and must be thread-safe
|
||||
* and reentrant. If you need to store a list of attached computers, it is recommended you use a
|
||||
* {@link AttachedComputerSet}.
|
||||
*
|
||||
* @param computer The interface to the computer that is being detached. Remember that multiple computers can be
|
||||
* attached to a peripheral at once.
|
||||
@ -79,7 +91,7 @@ public interface IPeripheral {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the object that this peripheral provides methods for. This will generally be the tile entity
|
||||
* Get the object that this peripheral provides methods for. This will generally be the block entity
|
||||
* or block, but may be an inventory, entity, etc...
|
||||
*
|
||||
* @return The object this peripheral targets
|
||||
@ -93,7 +105,7 @@ public interface IPeripheral {
|
||||
* Determine whether this peripheral is equivalent to another one.
|
||||
* <p>
|
||||
* The minimal example should at least check whether they are the same object. However, you may wish to check if
|
||||
* they point to the same block or tile entity.
|
||||
* they point to the same block or block entity.
|
||||
*
|
||||
* @param other The peripheral to compare against. This may be {@code null}.
|
||||
* @return Whether these peripherals are equivalent.
|
||||
|
@ -96,6 +96,7 @@ public final class PeripheralType {
|
||||
* Get the name of this peripheral type. This may be {@code null}.
|
||||
*
|
||||
* @return The type of this peripheral.
|
||||
* @see IPeripheral#getType()
|
||||
*/
|
||||
@Nullable
|
||||
public String getPrimaryType() {
|
||||
@ -107,6 +108,7 @@ public final class PeripheralType {
|
||||
* a peripheral might have.
|
||||
*
|
||||
* @return All additional types.
|
||||
* @see IPeripheral#getAdditionalTypes()
|
||||
*/
|
||||
public Set<String> getAdditionalTypes() {
|
||||
return additionalTypes;
|
||||
|
@ -11,7 +11,7 @@ import java.util.concurrent.TimeUnit;
|
||||
* Monitors "work" associated with a computer, keeping track of how much a computer has done, and ensuring every
|
||||
* computer receives a fair share of any processing time.
|
||||
* <p>
|
||||
* This is primarily intended for work done by peripherals on the main thread (such as on a tile entity's tick), but
|
||||
* This is primarily intended for work done by peripherals on the main thread (such as on a block entity's tick), but
|
||||
* could be used for other purposes (such as complex computations done on another thread).
|
||||
* <p>
|
||||
* Before running a task, one should call {@link #canWork()} to determine if the computer is currently allowed to
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user