1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-09 00:40:29 +00:00

Remove command translation keys

- <no pos> is no longer used, as positions cannot be nullable.
 - We don't really need the position one — we can just concatenate in
   Java.
This commit is contained in:
Jonathan Coates 2024-10-11 12:12:02 +02:00
parent a70baf0d74
commit bb04df7086
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
5 changed files with 4 additions and 9 deletions

View File

@ -38,8 +38,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",

View File

@ -160,8 +160,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)");

View File

@ -40,9 +40,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) {

View File

@ -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;

View File

@ -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;