diff --git a/projects/common/src/main/java/dan200/computercraft/data/LanguageProvider.java b/projects/common/src/main/java/dan200/computercraft/data/LanguageProvider.java index 97e86dac1..28d01e0d3 100644 --- a/projects/common/src/main/java/dan200/computercraft/data/LanguageProvider.java +++ b/projects/common/src/main/java/dan200/computercraft/data/LanguageProvider.java @@ -139,8 +139,6 @@ public final class LanguageProvider implements DataProvider { add("commands.computercraft.tp.synopsis", "Teleport to a specific computer."); add("commands.computercraft.tp.desc", "Teleport to the location of a computer. You can either specify the computer's instance id (e.g. 123) or computer id (e.g #123)."); add("commands.computercraft.tp.action", "Teleport to this computer"); - add("commands.computercraft.tp.not_player", "Cannot open terminal for non-player"); - add("commands.computercraft.tp.not_there", "Cannot locate computer in the world"); add("commands.computercraft.view.synopsis", "View the terminal of a computer."); add("commands.computercraft.view.desc", "Open the terminal of a computer, allowing remote control of a computer. This does not provide access to turtle's inventories. You can either specify the computer's instance id (e.g. 123) or computer id (e.g #123)."); add("commands.computercraft.view.action", "View this computer"); diff --git a/projects/common/src/main/java/dan200/computercraft/shared/command/CommandComputerCraft.java b/projects/common/src/main/java/dan200/computercraft/shared/command/CommandComputerCraft.java index a073dc26a..fd9e83454 100644 --- a/projects/common/src/main/java/dan200/computercraft/shared/command/CommandComputerCraft.java +++ b/projects/common/src/main/java/dan200/computercraft/shared/command/CommandComputerCraft.java @@ -26,7 +26,6 @@ import dan200.computercraft.shared.network.container.ComputerContainerData; import net.minecraft.commands.CommandSourceStack; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.RelativeMovement; import net.minecraft.world.entity.player.Inventory; @@ -34,13 +33,15 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; +import net.minecraft.world.phys.Vec3; import javax.annotation.Nullable; import java.io.File; import java.util.*; import static dan200.computercraft.shared.command.CommandUtils.isPlayer; -import static dan200.computercraft.shared.command.Exceptions.*; +import static dan200.computercraft.shared.command.Exceptions.NOT_TRACKING_EXCEPTION; +import static dan200.computercraft.shared.command.Exceptions.NO_TIMINGS_EXCEPTION; import static dan200.computercraft.shared.command.arguments.ComputerArgumentType.getComputerArgument; import static dan200.computercraft.shared.command.arguments.ComputerArgumentType.oneComputer; import static dan200.computercraft.shared.command.arguments.ComputersArgumentType.*; @@ -62,118 +63,25 @@ public final class CommandComputerCraft { dispatcher.register(choice("computercraft") .then(literal("dump") .requires(ModRegistry.Permissions.PERMISSION_DUMP) - .executes(context -> { - var table = new TableBuilder("DumpAll", "Computer", "On", "Position"); - - var source = context.getSource(); - List computers = new ArrayList<>(ServerContext.get(source.getServer()).registry().getComputers()); - - Level world = source.getLevel(); - var pos = BlockPos.containing(source.getPosition()); - - computers.sort((a, b) -> { - if (a.getLevel() == b.getLevel() && a.getLevel() == world) { - return Double.compare(a.getPosition().distSqr(pos), b.getPosition().distSqr(pos)); - } else if (a.getLevel() == world) { - return -1; - } else if (b.getLevel() == world) { - return 1; - } else { - return Integer.compare(a.getInstanceID(), b.getInstanceID()); - } - }); - - for (var computer : computers) { - table.row( - linkComputer(source, computer, computer.getID()), - bool(computer.isOn()), - linkPosition(source, computer) - ); - } - - table.display(context.getSource()); - return computers.size(); - }) + .executes(c -> dump(c.getSource())) .then(args() .arg("computer", oneComputer()) - .executes(context -> { - var computer = getComputerArgument(context, "computer"); - - var table = new TableBuilder("Dump"); - table.row(header("Instance"), text(Integer.toString(computer.getInstanceID()))); - table.row(header("Id"), text(Integer.toString(computer.getID()))); - table.row(header("Label"), text(computer.getLabel())); - table.row(header("On"), bool(computer.isOn())); - table.row(header("Position"), linkPosition(context.getSource(), computer)); - table.row(header("Family"), text(computer.getFamily().toString())); - - for (var side : ComputerSide.values()) { - var peripheral = computer.getPeripheral(side); - if (peripheral != null) { - table.row(header("Peripheral " + side.getName()), text(peripheral.getType())); - } - } - - table.display(context.getSource()); - return 1; - }))) + .executes(c -> dumpComputer(c.getSource(), getComputerArgument(c, "computer"))))) .then(command("shutdown") .requires(ModRegistry.Permissions.PERMISSION_SHUTDOWN) .argManyValue("computers", manyComputers(), s -> ServerContext.get(s.getServer()).registry().getComputers()) - .executes((context, computerSelectors) -> { - var shutdown = 0; - var computers = unwrap(context.getSource(), computerSelectors); - for (var computer : computers) { - if (computer.isOn()) shutdown++; - computer.shutdown(); - } - - var didShutdown = shutdown; - context.getSource().sendSuccess(() -> Component.translatable("commands.computercraft.shutdown.done", didShutdown, computers.size()), false); - return shutdown; - })) + .executes((c, a) -> shutdown(c.getSource(), unwrap(c.getSource(), a)))) .then(command("turn-on") .requires(ModRegistry.Permissions.PERMISSION_TURN_ON) .argManyValue("computers", manyComputers(), s -> ServerContext.get(s.getServer()).registry().getComputers()) - .executes((context, computerSelectors) -> { - var on = 0; - var computers = unwrap(context.getSource(), computerSelectors); - for (var computer : computers) { - if (!computer.isOn()) on++; - computer.turnOn(); - } - - var didOn = on; - context.getSource().sendSuccess(() -> Component.translatable("commands.computercraft.turn_on.done", didOn, computers.size()), false); - return on; - })) + .executes((c, a) -> turnOn(c.getSource(), unwrap(c.getSource(), a)))) .then(command("tp") .requires(ModRegistry.Permissions.PERMISSION_TP) .arg("computer", oneComputer()) - .executes(context -> { - var computer = getComputerArgument(context, "computer"); - var world = computer.getLevel(); - var pos = computer.getPosition(); - - var entity = context.getSource().getEntityOrException(); - if (!(entity instanceof ServerPlayer player)) throw TP_NOT_PLAYER.create(); - - if (player.getCommandSenderWorld() == world) { - player.connection.teleport( - pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5, 0, 0, - EnumSet.noneOf(RelativeMovement.class) - ); - } else { - player.teleportTo(world, - pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5, 0, 0 - ); - } - - return 1; - })) + .executes(c -> teleport(c.getSource(), getComputerArgument(c, "computer")))) .then(command("queue") .requires(ModRegistry.Permissions.PERMISSION_QUEUE) @@ -182,79 +90,243 @@ public final class CommandComputerCraft { .suggests((context, builder) -> Suggestions.empty()) ) .argManyValue("args", StringArgumentType.string(), Collections.emptyList()) - .executes((ctx, args) -> { - var computers = getComputersArgument(ctx, "computer"); - var rest = args.toArray(); - - var queued = 0; - for (var computer : computers) { - if (computer.getFamily() == ComputerFamily.COMMAND && computer.isOn()) { - computer.queueEvent("computer_command", rest); - queued++; - } - } - - return queued; - })) + .executes((c, a) -> queue(getComputersArgument(c, "computer"), a))) .then(command("view") .requires(ModRegistry.Permissions.PERMISSION_VIEW) .arg("computer", oneComputer()) - .executes(context -> { - var player = context.getSource().getPlayerOrException(); - var computer = getComputerArgument(context, "computer"); - new ComputerContainerData(computer, ItemStack.EMPTY).open(player, new MenuProvider() { - @Override - public Component getDisplayName() { - return Component.translatable("gui.computercraft.view_computer"); - } - - @Override - public AbstractContainerMenu createMenu(int id, Inventory player, Player entity) { - return new ViewComputerMenu(id, player, computer); - } - }); - return 1; - })) + .executes(c -> view(c.getSource(), getComputerArgument(c, "computer")))) .then(choice("track") .requires(ModRegistry.Permissions.PERMISSION_TRACK) - .then(command("start") - .executes(context -> { - getMetricsInstance(context.getSource()).start(); - - var stopCommand = "/computercraft track stop"; - context.getSource().sendSuccess(() -> Component.translatable( - "commands.computercraft.track.start.stop", - link(text(stopCommand), stopCommand, Component.translatable("commands.computercraft.track.stop.action")) - ), false); - return 1; - })) - - .then(command("stop") - .executes(context -> { - var timings = getMetricsInstance(context.getSource()); - if (!timings.stop()) throw NOT_TRACKING_EXCEPTION.create(); - displayTimings(context.getSource(), timings.getSnapshot(), new AggregatedMetric(Metrics.COMPUTER_TASKS, Aggregate.AVG), DEFAULT_FIELDS); - return 1; - })) - + .then(command("start").executes(c -> trackStart(c.getSource()))) + .then(command("stop").executes(c -> trackStop(c.getSource()))) .then(command("dump") .argManyValue("fields", metric(), DEFAULT_FIELDS) - .executes((context, fields) -> { - AggregatedMetric sort; - if (fields.size() == 1 && DEFAULT_FIELDS.contains(fields.get(0))) { - sort = fields.get(0); - fields = DEFAULT_FIELDS; - } else { - sort = fields.get(0); - } - - return displayTimings(context.getSource(), sort, fields); - }))) + .executes((c, f) -> trackDump(c.getSource(), f)))) ); } + /** + * Display loaded computers to a table. + * + * @param source The thing that executed this command. + * @return The number of loaded computers. + */ + private static int dump(CommandSourceStack source) { + var table = new TableBuilder("DumpAll", "Computer", "On", "Position"); + + List computers = new ArrayList<>(ServerContext.get(source.getServer()).registry().getComputers()); + + Level world = source.getLevel(); + var pos = BlockPos.containing(source.getPosition()); + + // Sort by nearby computers. + computers.sort((a, b) -> { + if (a.getLevel() == b.getLevel() && a.getLevel() == world) { + return Double.compare(a.getPosition().distSqr(pos), b.getPosition().distSqr(pos)); + } else if (a.getLevel() == world) { + return -1; + } else if (b.getLevel() == world) { + return 1; + } else { + return Integer.compare(a.getInstanceID(), b.getInstanceID()); + } + }); + + for (var computer : computers) { + table.row( + linkComputer(source, computer, computer.getID()), + bool(computer.isOn()), + linkPosition(source, computer) + ); + } + + table.display(source); + return computers.size(); + } + + /** + * Display additional information about a single computer. + * + * @param source The thing that executed this command. + * @param computer The computer we're dumping. + * @return The constant {@code 1}. + */ + private static int dumpComputer(CommandSourceStack source, ServerComputer computer) { + var table = new TableBuilder("Dump"); + table.row(header("Instance"), text(Integer.toString(computer.getInstanceID()))); + table.row(header("Id"), text(Integer.toString(computer.getID()))); + table.row(header("Label"), text(computer.getLabel())); + table.row(header("On"), bool(computer.isOn())); + table.row(header("Position"), linkPosition(source, computer)); + table.row(header("Family"), text(computer.getFamily().toString())); + + for (var side : ComputerSide.values()) { + var peripheral = computer.getPeripheral(side); + if (peripheral != null) { + table.row(header("Peripheral " + side.getName()), text(peripheral.getType())); + } + } + + table.display(source); + return 1; + } + + /** + * Shutdown a list of computers. + * + * @param source The thing that executed this command. + * @param computers The computers to shutdown. + * @return The constant {@code 1}. + */ + private static int shutdown(CommandSourceStack source, Collection computers) { + var shutdown = 0; + for (var computer : computers) { + if (computer.isOn()) shutdown++; + computer.shutdown(); + } + + var didShutdown = shutdown; + source.sendSuccess(() -> Component.translatable("commands.computercraft.shutdown.done", didShutdown, computers.size()), false); + return shutdown; + } + + /** + * Turn on a list of computers. + * + * @param source The thing that executed this command. + * @param computers The computers to turn on. + * @return The constant {@code 1}. + */ + private static int turnOn(CommandSourceStack source, Collection computers) { + var on = 0; + for (var computer : computers) { + if (!computer.isOn()) on++; + computer.turnOn(); + } + + var didOn = on; + source.sendSuccess(() -> Component.translatable("commands.computercraft.turn_on.done", didOn, computers.size()), false); + return on; + } + + /** + * Teleport to a computer. + * + * @param source The thing that executed this command. This must be an entity, other types will throw an exception. + * @param computer The computer to teleport to. + * @return The constant {@code 1}. + */ + private static int teleport(CommandSourceStack source, ServerComputer computer) throws CommandSyntaxException { + var world = computer.getLevel(); + var pos = Vec3.atBottomCenterOf(computer.getPosition()); + source.getEntityOrException().teleportTo(world, pos.x(), pos.y(), pos.z(), EnumSet.noneOf(RelativeMovement.class), 0, 0); + + return 1; + } + + /** + * Queue a {@code computer_command} event on a command computer. + * + * @param computers The list of computers to queue on. + * @param args The arguments for this event. + * @return The number of computers this event was queued on. + */ + private static int queue(Collection computers, List args) { + var rest = args.toArray(); + + var queued = 0; + for (var computer : computers) { + if (computer.getFamily() == ComputerFamily.COMMAND && computer.isOn()) { + computer.queueEvent("computer_command", rest); + queued++; + } + } + + return queued; + } + + /** + * Open a terminal for a computer. + * + * @param source The thing that executed this command. + * @param computer The computer to view. + * @return The constant {@code 1}. + */ + private static int view(CommandSourceStack source, ServerComputer computer) throws CommandSyntaxException { + var player = source.getPlayerOrException(); + new ComputerContainerData(computer, ItemStack.EMPTY).open(player, new MenuProvider() { + @Override + public Component getDisplayName() { + return Component.translatable("gui.computercraft.view_computer"); + } + + @Override + public AbstractContainerMenu createMenu(int id, Inventory player, Player entity) { + return new ViewComputerMenu(id, player, computer); + } + }); + return 1; + } + + /** + * Start tracking metrics for the current player. + * + * @param source The thing that executed this command. + * @return The constant {@code 1}. + */ + private static int trackStart(CommandSourceStack source) { + getMetricsInstance(source).start(); + + var stopCommand = "/computercraft track stop"; + source.sendSuccess(() -> Component.translatable( + "commands.computercraft.track.start.stop", + link(text(stopCommand), stopCommand, Component.translatable("commands.computercraft.track.stop.action")) + ), false); + return 1; + } + + /** + * Stop tracking metrics for the current player, displaying a table with the results. + * + * @param source The thing that executed this command. + * @return The constant {@code 1}. + */ + private static int trackStop(CommandSourceStack source) throws CommandSyntaxException { + var metrics = getMetricsInstance(source); + if (!metrics.stop()) throw NOT_TRACKING_EXCEPTION.create(); + displayTimings(source, metrics.getSnapshot(), new AggregatedMetric(Metrics.COMPUTER_TASKS, Aggregate.AVG), DEFAULT_FIELDS); + return 1; + } + + private static final List DEFAULT_FIELDS = Arrays.asList( + new AggregatedMetric(Metrics.COMPUTER_TASKS, Aggregate.COUNT), + new AggregatedMetric(Metrics.COMPUTER_TASKS, Aggregate.NONE), + new AggregatedMetric(Metrics.COMPUTER_TASKS, Aggregate.AVG) + ); + + /** + * Display the latest metrics for the current player. + * + * @param source The thing that executed this command. + * @param fields The fields to display in this table, defaulting to {@link #DEFAULT_FIELDS}. + * @return The constant {@code 1}. + */ + private static int trackDump(CommandSourceStack source, List fields) throws CommandSyntaxException { + AggregatedMetric sort; + if (fields.size() == 1 && DEFAULT_FIELDS.contains(fields.get(0))) { + sort = fields.get(0); + fields = DEFAULT_FIELDS; + } else { + sort = fields.get(0); + } + + return displayTimings(source, getMetricsInstance(source).getTimings(), sort, fields); + } + + // Additional helper functions. + private static Component linkComputer(CommandSourceStack source, @Nullable ServerComputer serverComputer, int computerId) { var out = Component.literal(""); @@ -327,16 +399,6 @@ public final class CommandComputerCraft { return ServerContext.get(source.getServer()).metrics().getMetricsInstance(entity instanceof Player ? entity.getUUID() : SYSTEM_UUID); } - private static final List DEFAULT_FIELDS = Arrays.asList( - new AggregatedMetric(Metrics.COMPUTER_TASKS, Aggregate.COUNT), - new AggregatedMetric(Metrics.COMPUTER_TASKS, Aggregate.NONE), - new AggregatedMetric(Metrics.COMPUTER_TASKS, Aggregate.AVG) - ); - - private static int displayTimings(CommandSourceStack source, AggregatedMetric sortField, List fields) throws CommandSyntaxException { - return displayTimings(source, getMetricsInstance(source).getTimings(), sortField, fields); - } - private static int displayTimings(CommandSourceStack source, List timings, AggregatedMetric sortField, List fields) throws CommandSyntaxException { if (timings.isEmpty()) throw NO_TIMINGS_EXCEPTION.create(); diff --git a/projects/common/src/main/java/dan200/computercraft/shared/command/Exceptions.java b/projects/common/src/main/java/dan200/computercraft/shared/command/Exceptions.java index bf1ccdd1f..73ea11a1b 100644 --- a/projects/common/src/main/java/dan200/computercraft/shared/command/Exceptions.java +++ b/projects/common/src/main/java/dan200/computercraft/shared/command/Exceptions.java @@ -18,9 +18,6 @@ public final class Exceptions { static final SimpleCommandExceptionType NOT_TRACKING_EXCEPTION = translated("commands.computercraft.track.stop.not_enabled"); static final SimpleCommandExceptionType NO_TIMINGS_EXCEPTION = translated("commands.computercraft.track.dump.no_timings"); - static final SimpleCommandExceptionType TP_NOT_THERE = translated("commands.computercraft.tp.not_there"); - static final SimpleCommandExceptionType TP_NOT_PLAYER = translated("commands.computercraft.tp.not_player"); - public static final SimpleCommandExceptionType ARGUMENT_EXPECTED = translated("argument.computercraft.argument_expected"); private static SimpleCommandExceptionType translated(String key) { diff --git a/projects/common/src/main/resources/assets/computercraft/lang/cs_cz.json b/projects/common/src/main/resources/assets/computercraft/lang/cs_cz.json index b0ba8d28f..87c3a1dc5 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/cs_cz.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/cs_cz.json @@ -47,8 +47,6 @@ "commands.computercraft.synopsis": "Různé příkazy pro ovládání počítačů.", "commands.computercraft.tp.action": "Teleportovat se k počítači", "commands.computercraft.tp.desc": "Teleportovat se na místo počítače. Můžeš specifikovat ID počítačové instance (tř. 123) nebo ID počítače (tř. #123).", - "commands.computercraft.tp.not_player": "Nelze otevřít terminál pro nehráče", - "commands.computercraft.tp.not_there": "Nelze najít počítač ve světě", "commands.computercraft.tp.synopsis": "Teleportovat se ke specifickému počítači.", "commands.computercraft.track.desc": "Sledovat jak dlouho se počítače spustí, a také kolik událostí zpracují. Toto uvádí informace v podobné cestě jako /forge track a může být dobré pro diagnostiku lagu.", "commands.computercraft.track.dump.computer": "Počítač", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/de_de.json b/projects/common/src/main/resources/assets/computercraft/lang/de_de.json index 1f2da51be..800348082 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/de_de.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/de_de.json @@ -46,8 +46,6 @@ "commands.computercraft.synopsis": "Verschiedene Befehle um Computer zu kontrollieren.", "commands.computercraft.tp.action": "Teleportiert dich zum Computer", "commands.computercraft.tp.desc": "Teleportiert dich zum Standort eines Computers. Der Computer kann entweder über seine Instanz ID (z.B. 123), seine Computer ID (z.B. #123) oder seinen Namen (z.B. \"@Mein Computer\") angegeben werden.", - "commands.computercraft.tp.not_player": "Konnte Terminal für Nicht-Spieler nicht öffnen", - "commands.computercraft.tp.not_there": "Konnte Computer in der Welt nicht finden", "commands.computercraft.tp.synopsis": "Teleportiert dich zum angegebenen Computer.", "commands.computercraft.track.desc": "Zeichnet die Laufzeiten von Computern und wie viele Events ausgelöst werden auf. Die Ausgabe der Informationen ist ähnlich zu /forge track, was beim aufspüren von Lags sehr hilfreich sein kann.", "commands.computercraft.track.dump.computer": "Computer", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/fr_fr.json b/projects/common/src/main/resources/assets/computercraft/lang/fr_fr.json index 328e92a0b..12de4763f 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/fr_fr.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/fr_fr.json @@ -47,8 +47,6 @@ "commands.computercraft.synopsis": "Commandes diverses pour contrôler les ordinateurs.", "commands.computercraft.tp.action": "Se téléporter vers cet ordinateur", "commands.computercraft.tp.desc": "Se téléporter à la position de l'ordinateur. Vous pouvez spécifier l'identifiant d'instance (ex. 123) ou l'identifiant d'ordinateur (ex. #123).", - "commands.computercraft.tp.not_player": "Impossible d'ouvrir un terminal pour un non-joueur", - "commands.computercraft.tp.not_there": "Impossible de localiser cet ordinateur dans le monde", "commands.computercraft.tp.synopsis": "Se téléporter à la position de l'ordinateur spécifié.", "commands.computercraft.track.desc": "Surveillez combien de temps prend une exécutions sur les ordinateurs, ainsi que le nombre d’événements capturés. Les informations sont affichées d'une manière similaire à la commande /forge track, utile pour diagnostiquer les sources de latence.", "commands.computercraft.track.dump.computer": "Ordinateur", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/it_it.json b/projects/common/src/main/resources/assets/computercraft/lang/it_it.json index 6f1617700..3ad229f41 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/it_it.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/it_it.json @@ -47,8 +47,6 @@ "commands.computercraft.synopsis": "Vari comandi per controllare i computer.", "commands.computercraft.tp.action": "Teletrasporta a questo computer", "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.not_player": "Non è possibile aprire un terminale per un non giocatore", - "commands.computercraft.tp.not_there": "Impossibile trovare il computer nel mondo", "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", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/ja_jp.json b/projects/common/src/main/resources/assets/computercraft/lang/ja_jp.json index 1219c9ee4..e85c7816e 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/ja_jp.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/ja_jp.json @@ -47,8 +47,6 @@ "commands.computercraft.synopsis": "コンピュータを制御するためのさまざまなコマンド。", "commands.computercraft.tp.action": "このコンピューターへテレポートします", "commands.computercraft.tp.desc": "コンピュータの場所にテレポート.コンピュータのインスタンスID(例えば 123)またはコンピュータID(例えば #123)を指定することができます。", - "commands.computercraft.tp.not_player": "非プレイヤー用のターミナルを開くことができません", - "commands.computercraft.tp.not_there": "世界でコンピュータを見つけることができませんでした", "commands.computercraft.tp.synopsis": "特定のコンピュータにテレポート。", "commands.computercraft.track.desc": "コンピュータの実行時間を追跡するだけでなく、イベントを確認することができます。 これは /forge と同様の方法で情報を提示し、遅れを診断するのに役立ちます。", "commands.computercraft.track.dump.computer": "コンピューター", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/ko_kr.json b/projects/common/src/main/resources/assets/computercraft/lang/ko_kr.json index 0a1ecdfb0..0078abd9b 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/ko_kr.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/ko_kr.json @@ -47,8 +47,6 @@ "commands.computercraft.synopsis": "컴퓨터를 제어하기 위한 다양한 명령어", "commands.computercraft.tp.action": "이 컴퓨터로 순간이동하기", "commands.computercraft.tp.desc": "컴퓨터의 위치로 순간이동합니다. 컴퓨터의 인스턴스 ID(예: 123) 또는 컴퓨터 ID(예: #123)를 지정할 수 있습니다.", - "commands.computercraft.tp.not_player": "비플레이어용 터미널을 열 수 없습니다.", - "commands.computercraft.tp.not_there": "월드에서 컴퓨터를 위치시킬 수 없습니다.", "commands.computercraft.tp.synopsis": "특정 컴퓨터로 순간이동하기", "commands.computercraft.track.desc": "컴퓨터가 실행되는 기간과 처리되는 이벤트 수를 추적합니다. 이는 /forge 트랙과 유사한 방법으로 정보를 제공하며 지연 로그에 유용할 수 있습니다.", "commands.computercraft.track.dump.computer": "컴퓨터", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/nb_no.json b/projects/common/src/main/resources/assets/computercraft/lang/nb_no.json index d2e053f4e..294a6129e 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/nb_no.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/nb_no.json @@ -47,8 +47,6 @@ "commands.computercraft.synopsis": "Forskjellige kommandoer for å kontrollere datamaskiner.", "commands.computercraft.tp.action": "Teleporter til denne datamaskinen", "commands.computercraft.tp.desc": "Teleporter til en datamaskin sin posisjon. Du kan enten spesifisere datamaskinens forekomst id (f. eks 123) eller datamaskinens id (f. eks #123).", - "commands.computercraft.tp.not_player": "Kan kun åpne terminalen for spillere", - "commands.computercraft.tp.not_there": "Greide ikke å finne datamaskinen i denne verdenen", "commands.computercraft.tp.synopsis": "Teleporter til en spesifikk datamaskin.", "commands.computercraft.track.desc": "Spor hvor lenge datamaskiner kjører, samt hvor mange hendelser de handler. Dette presenterer informasjon i en lignende vei til /forge track og kan være nyttig for å diagnostisere lagg.", "commands.computercraft.track.dump.computer": "Datamaskin", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/nl_nl.json b/projects/common/src/main/resources/assets/computercraft/lang/nl_nl.json index eca1c712b..c1127468c 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/nl_nl.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/nl_nl.json @@ -47,8 +47,6 @@ "commands.computercraft.synopsis": "Verschillende commando's voor het beheren van computers.", "commands.computercraft.tp.action": "Teleporteer naar deze computer", "commands.computercraft.tp.desc": "Teleporteer naar de locatie van een specefieke computer. Je kunt een instance-id (bijv. 123) of computer-id (bijv. #123) opgeven.", - "commands.computercraft.tp.not_player": "Kan geen terminal openen voor non-speler", - "commands.computercraft.tp.not_there": "Kan de computer niet lokaliseren", "commands.computercraft.tp.synopsis": "Teleporteer naar een specifieke computer.", "commands.computercraft.track.desc": "Houd uitvoertijd en het aantal behandelde events van computers bij. Dit biedt informatie op een gelijke manier als /forge track en kan nuttig zijn in het opsloren van lag.", "commands.computercraft.track.dump.computer": "Computer", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/pl_pl.json b/projects/common/src/main/resources/assets/computercraft/lang/pl_pl.json index 99bcb695b..f1f645104 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/pl_pl.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/pl_pl.json @@ -31,7 +31,6 @@ "commands.computercraft.synopsis": "Różne komendy do kontrolowania komputerami.", "commands.computercraft.tp.action": "Przeteleportuj się do podanego komputera", "commands.computercraft.tp.desc": "Przeteleportuj się do lokalizacji komputera. Możesz wybrać numer sesji komputera (np. 123) lub ID komputera (np. #123).", - "commands.computercraft.tp.not_there": "Nie można zlokalizować komputera w świecie", "commands.computercraft.tp.synopsis": "Przeteleportuj się do podanego komputera.", "commands.computercraft.track.dump.computer": "Komputer", "commands.computercraft.turn_on.desc": "Włącz podane komputery. Możesz wybrać numer sesji komputera (np. 123), ID komputera (np. #123) lub jego etykietę (np. \"@Mój Komputer\").", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/ru_ru.json b/projects/common/src/main/resources/assets/computercraft/lang/ru_ru.json index bd3767f84..737b42134 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/ru_ru.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/ru_ru.json @@ -47,8 +47,6 @@ "commands.computercraft.synopsis": "Различные команды для управления компьютерами.", "commands.computercraft.tp.action": "Телепортироваться к этому компьютеру", "commands.computercraft.tp.desc": "Телепортироваться к местоположению компьютера. Ты можешь указать либо идентификатор экземпляра компьютера (например 123) либо идентификатор компьютера (например #123).", - "commands.computercraft.tp.not_player": "Нельзя открыть терминал для не-игрока", - "commands.computercraft.tp.not_there": "Нельзя определить в мире местоположение компьютер", "commands.computercraft.tp.synopsis": "Телепортироваться к конкретному компьютеру.", "commands.computercraft.track.desc": "Отслеживает, как долго компьютеры исполняют, а также то, как много они обрабатывают события. Эта информация представляется аналогично к /forge track и может быть полезной для диагностики лага.", "commands.computercraft.track.dump.computer": "Компьютер", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/sv_se.json b/projects/common/src/main/resources/assets/computercraft/lang/sv_se.json index eef349faa..d25702e78 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/sv_se.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/sv_se.json @@ -47,8 +47,6 @@ "commands.computercraft.synopsis": "Olika kommandon för att kontrollera datorer.", "commands.computercraft.tp.action": "Teleportera till den här datorn", "commands.computercraft.tp.desc": "Teleportera till datorns position. Du kan ange en dators instans-id (t.ex. 123), dator-id (t.ex. #123) eller etikett (t.ex. \"@Min dator\").", - "commands.computercraft.tp.not_player": "Kan inte öppna terminalen för en ickespelare", - "commands.computercraft.tp.not_there": "Kan inte hitta datorn i världen", "commands.computercraft.tp.synopsis": "Teleportera till en specifik dator.", "commands.computercraft.track.desc": "Spåra hur länge datorer exekverar, och även hur många event de hanterar. Detta presenterar information på liknande sätt som /forge track och kan vara användbart för att undersöka lagg.", "commands.computercraft.track.dump.computer": "Dator", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/tok.json b/projects/common/src/main/resources/assets/computercraft/lang/tok.json index 975d9a832..e171d126a 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/tok.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/tok.json @@ -44,8 +44,6 @@ "commands.computercraft.synopsis": "mi jo e toki wawa ante tawa ni: sina lawa e ilo sona.", "commands.computercraft.tp.action": "o tawa pi ilo sona", "commands.computercraft.tp.desc": "o tawa ilo sona. ilo sona la, sina ken pana e nanpa pi ijo (sama 123) anu nanpa (sama #123).", - "commands.computercraft.tp.not_player": "jan ala la, mi ken ala open e sitelen pi ilo sona", - "commands.computercraft.tp.not_there": "mi ken ala alasa e ilo sona pi lon ma", "commands.computercraft.tp.synopsis": "mi tawa pi ilo sona e sina.", "commands.computercraft.track.desc": "ilo sona la, mi sitelen e tenpo pali e mute toki. toki wawa /forge track la, mi pana pi nasin sama e sona. mi pona tawa alasa pi tenpo ike.", "commands.computercraft.track.dump.computer": "ilo sona", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/uk_ua.json b/projects/common/src/main/resources/assets/computercraft/lang/uk_ua.json index fc4b94d8e..cb3abd7d1 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/uk_ua.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/uk_ua.json @@ -47,8 +47,6 @@ "commands.computercraft.synopsis": "Різні команди для керування комп'ютерами.", "commands.computercraft.tp.action": "Телепортувати до цього комп'ютера", "commands.computercraft.tp.desc": "Телепортувати до розташування комп'ютера. Ви можете вказати або ідентифікатор екземпляра комп'ютера (наприклад, 123) або ідентифікатор комп'ютера (наприклад, #123).", - "commands.computercraft.tp.not_player": "Не можна відкрити термінал для не-гравця", - "commands.computercraft.tp.not_there": "Не можна визначити у світі розташування комп'ютер", "commands.computercraft.tp.synopsis": "Телепортувати до конкретного комп'ютера.", "commands.computercraft.track.desc": "Відстежує, як довго комп'ютери виконують, а також те, як багато вони обробляють події. Ця інформація представляється аналогічно /forge track і може бути корисною для діагностики лага.", "commands.computercraft.track.dump.computer": "Комп'ютер", diff --git a/projects/common/src/main/resources/assets/computercraft/lang/zh_cn.json b/projects/common/src/main/resources/assets/computercraft/lang/zh_cn.json index 89ec5422d..923c8756b 100644 --- a/projects/common/src/main/resources/assets/computercraft/lang/zh_cn.json +++ b/projects/common/src/main/resources/assets/computercraft/lang/zh_cn.json @@ -45,8 +45,6 @@ "commands.computercraft.synopsis": "各种控制计算机的命令.", "commands.computercraft.tp.action": "传送到这台电脑", "commands.computercraft.tp.desc": "传送到计算机的位置. 你可以指定计算机的实例id (例如. 123)或计算机id (例如. #123).", - "commands.computercraft.tp.not_player": "无法为非玩家打开终端", - "commands.computercraft.tp.not_there": "无法在世界上定位电脑", "commands.computercraft.tp.synopsis": "传送到特定的计算机.", "commands.computercraft.track.desc": "跟踪计算机执行的时间以及它们处理的事件数. 这以/forge track类似的方式呈现信息,可用于诊断滞后.", "commands.computercraft.track.dump.computer": "计算机", diff --git a/projects/fabric/src/generated/resources/assets/computercraft/lang/en_us.json b/projects/fabric/src/generated/resources/assets/computercraft/lang/en_us.json index c096bdb55..b5fc22875 100644 --- a/projects/fabric/src/generated/resources/assets/computercraft/lang/en_us.json +++ b/projects/fabric/src/generated/resources/assets/computercraft/lang/en_us.json @@ -47,8 +47,6 @@ "commands.computercraft.synopsis": "Various commands for controlling computers.", "commands.computercraft.tp.action": "Teleport to this computer", "commands.computercraft.tp.desc": "Teleport to the location of a computer. You can either specify the computer's instance id (e.g. 123) or computer id (e.g #123).", - "commands.computercraft.tp.not_player": "Cannot open terminal for non-player", - "commands.computercraft.tp.not_there": "Cannot locate computer in the world", "commands.computercraft.tp.synopsis": "Teleport to a specific computer.", "commands.computercraft.track.desc": "Track how long computers execute for, as well as how many events they handle. This presents information in a similar way to /forge track and can be useful for diagnosing lag.", "commands.computercraft.track.dump.computer": "Computer", diff --git a/projects/forge/src/generated/resources/assets/computercraft/lang/en_us.json b/projects/forge/src/generated/resources/assets/computercraft/lang/en_us.json index c096bdb55..b5fc22875 100644 --- a/projects/forge/src/generated/resources/assets/computercraft/lang/en_us.json +++ b/projects/forge/src/generated/resources/assets/computercraft/lang/en_us.json @@ -47,8 +47,6 @@ "commands.computercraft.synopsis": "Various commands for controlling computers.", "commands.computercraft.tp.action": "Teleport to this computer", "commands.computercraft.tp.desc": "Teleport to the location of a computer. You can either specify the computer's instance id (e.g. 123) or computer id (e.g #123).", - "commands.computercraft.tp.not_player": "Cannot open terminal for non-player", - "commands.computercraft.tp.not_there": "Cannot locate computer in the world", "commands.computercraft.tp.synopsis": "Teleport to a specific computer.", "commands.computercraft.track.desc": "Track how long computers execute for, as well as how many events they handle. This presents information in a similar way to /forge track and can be useful for diagnosing lag.", "commands.computercraft.track.dump.computer": "Computer",