From c3d6bcbcce792e4b87a26cea0977c57173ab4e89 Mon Sep 17 00:00:00 2001 From: Ivan Kh <47220198+Ivan-Khar@users.noreply.github.com> Date: Sun, 14 May 2023 13:30:23 +0300 Subject: [PATCH] translations --- .../cn/noryea/manhunt/mixin/ServerPlayerEntityMixin.java | 5 +++-- src/main/resources/data/manhunt/lang/en_us.json | 2 +- src/main/resources/data/manhunt/lang/ru_ru.json | 2 +- src/main/resources/data/manhunt/lang/zh_cn.json | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/cn/noryea/manhunt/mixin/ServerPlayerEntityMixin.java b/src/main/java/cn/noryea/manhunt/mixin/ServerPlayerEntityMixin.java index 8469938..ccdbb16 100644 --- a/src/main/java/cn/noryea/manhunt/mixin/ServerPlayerEntityMixin.java +++ b/src/main/java/cn/noryea/manhunt/mixin/ServerPlayerEntityMixin.java @@ -16,6 +16,7 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.server.network.ServerPlayNetworkHandler; import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.server.network.ServerPlayerInteractionManager; import net.minecraft.text.*; import net.minecraft.util.math.BlockPos; import net.minecraft.world.GameMode; @@ -41,6 +42,7 @@ public abstract class ServerPlayerEntityMixin extends PlayerEntity { @Shadow public abstract boolean changeGameMode(GameMode gameMode); + @Shadow @Final public ServerPlayerInteractionManager interactionManager; boolean holding; ManhuntConfig config = ManhuntConfig.INSTANCE; private long lastDelay = System.currentTimeMillis(); @@ -72,11 +74,10 @@ public void tick(CallbackInfo ci) { ServerPlayerEntity trackedPlayer = world.getServer().getPlayerManager().getPlayer(item.getNbt().getCompound("Info").getString("Name")); if (trackedPlayer != null) { updateCompass((ServerPlayerEntity) (Object) this, item.getNbt(), trackedPlayer); - this.getItemCooldownManager().set(item.getItem(), config.getDelay() * 20); + this.getItemCooldownManager().set(item.getItem(), config.getAutomaticCompassDelay() * 20); } } } - lastDelay = System.currentTimeMillis(); } diff --git a/src/main/resources/data/manhunt/lang/en_us.json b/src/main/resources/data/manhunt/lang/en_us.json index c84581c..9a09411 100644 --- a/src/main/resources/data/manhunt/lang/en_us.json +++ b/src/main/resources/data/manhunt/lang/en_us.json @@ -3,7 +3,7 @@ "manhunt.item.tracker.switchrunner": "§7Compass is now pointing at §f%s", "manhunt.item.tracker.norunners": "§cThere is no runners", "manhunt.commands.delay": "§7Set delay to: §f%d §7seconds", - "manhunt.commands.setautomaticcompassupdate": "§7Set automaticcompassupdate to: §f%s", + "manhunt.commands.setautomaticcompassupdate": "§7Set automaticCompassUpdate to: §f%s", "manhunt.commands.setautomaticcompassdelay": "§7Set delay to: §f%d §7seconds", "manhunt.commands.runnerswinset": "§7Set runnersWinOnDragonDeath to: §f%s", "manhunt.commands.cured": "§7Cured §f%d §7targets", diff --git a/src/main/resources/data/manhunt/lang/ru_ru.json b/src/main/resources/data/manhunt/lang/ru_ru.json index 0aa3341..7121eae 100644 --- a/src/main/resources/data/manhunt/lang/ru_ru.json +++ b/src/main/resources/data/manhunt/lang/ru_ru.json @@ -3,7 +3,7 @@ "manhunt.item.tracker.switchrunner": "§7Компас теперь указывает на §f%s", "manhunt.item.tracker.norunners": "§cКоманда бегунов пуста", "manhunt.commands.delay": "§7Задержка установлена на: %d секунд", - "manhunt.commands.setautomaticcompassupdate": "§7Set automaticcompassupdate to: §f%s", + "manhunt.commands.setautomaticcompassupdate": "§7automaticCompassUpdate теперь: §f%s", "manhunt.commands.setautomaticcompassdelay": "§7Задержка установлена на: %d секунд", "manhunt.commands.runnerswinset": "§7runnersWinOnDragonDeath теперь §f%s", "manhunt.commands.cured": "§f%d §7игроков вылечено", diff --git a/src/main/resources/data/manhunt/lang/zh_cn.json b/src/main/resources/data/manhunt/lang/zh_cn.json index 31d46c0..0aa4070 100644 --- a/src/main/resources/data/manhunt/lang/zh_cn.json +++ b/src/main/resources/data/manhunt/lang/zh_cn.json @@ -3,7 +3,7 @@ "manhunt.item.tracker.switchrunner": "§7目标切换至§f%s", "manhunt.item.tracker.norunners": "§c目标队伍成员为空", "manhunt.commands.delay": "§7Set delay to: §f%d §7seconds", - "manhunt.commands.setautomaticcompassupdate": "§7Set automaticcompassupdate to: §f%s", + "manhunt.commands.setautomaticcompassupdate": "§7Set automaticCompassUpdate to: §f%s", "manhunt.commands.setautomaticcompassdelay": "§7Set delay to: §f%d §7seconds", "manhunt.commands.runnerswinset": "§7Set runnersWinOnDragonDeath to: §f%s", "manhunt.commands.cured": "§7已治愈 §f%d §7名玩家",