diff --git a/src/main/java/com/github/creeper123123321/viafabric/mixin/client/MixinMultiplayerScreen.java b/src/main/java/com/github/creeper123123321/viafabric/mixin/client/MixinMultiplayerScreen.java index 26c1619..265a7a7 100644 --- a/src/main/java/com/github/creeper123123321/viafabric/mixin/client/MixinMultiplayerScreen.java +++ b/src/main/java/com/github/creeper123123321/viafabric/mixin/client/MixinMultiplayerScreen.java @@ -63,9 +63,9 @@ public abstract class MixinMultiplayerScreen extends Screen { throw e; } - @Inject(method = "init", at = @At("TAIL")) + @Inject(method = "init", at = @At("TAIL"), remap = false) private void onInit(CallbackInfo ci) { - protocolVersion = new TextFieldWidget(font, this.width / 2 + 88, 13, 65, 15); + protocolVersion = new TextFieldWidget(font, this.width / 2 + 88, 13, 65, 15, I18n.translate("gui.protocol_version_field.name")); protocolVersion.method_1890(new VersionFormatFilter()); protocolVersion.setChangedListener((text) -> { protocolVersion.setSuggestion(null); @@ -128,12 +128,15 @@ public abstract class MixinMultiplayerScreen extends Screen { addButton(enableClientSideViaVersion); } - @Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/Screen;render(IIF)V")) + @Inject(method = "render", at = { + @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/Screen;render(IIF)V"), + @At(value = "INVOKE", target = "Lnet/minecraft/class_437;render(IIF)V") // todo check if refmap was fixed + }, remap = false) private void onRender(int int_1, int int_2, float float_1, CallbackInfo ci) { protocolVersion.render(int_1, int_2, float_1); } - @Inject(method = "tick", at = @At("TAIL")) + @Inject(method = "tick", at = @At("TAIL"), remap = false) private void onTick(CallbackInfo ci) { protocolVersion.tick(); } diff --git a/src/main/java/com/github/creeper123123321/viafabric/platform/VRPlatform.java b/src/main/java/com/github/creeper123123321/viafabric/platform/VRPlatform.java index be31254..d3508b4 100644 --- a/src/main/java/com/github/creeper123123321/viafabric/platform/VRPlatform.java +++ b/src/main/java/com/github/creeper123123321/viafabric/platform/VRPlatform.java @@ -38,7 +38,7 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.entity.Entity; import net.minecraft.server.MinecraftServer; import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.sortme.ChatMessageType; +import net.minecraft.text.ChatMessageType; import net.minecraft.text.TextComponent; import us.myles.ViaVersion.api.PacketWrapper; import us.myles.ViaVersion.api.Via; diff --git a/src/main/resources/assets/viafabric/lang/en_us.json b/src/main/resources/assets/viafabric/lang/en_us.json index 02b1245..d0fcc86 100644 --- a/src/main/resources/assets/viafabric/lang/en_us.json +++ b/src/main/resources/assets/viafabric/lang/en_us.json @@ -1,4 +1,5 @@ { + "gui.protocol_version.name": "Protocol Version", "gui.enable_client_side_button": "Enable ViaVersion", "gui.enable_client_side.question": "Are you sure you want to enable client-side mode?", "gui.enable_client_side.warning": "I can not guarantee that this mod is allowed on every (or even any) server. This mod may cause problems with anti-cheat plugins. USE AT OWN RISK.", diff --git a/src/main/resources/assets/viafabric/lang/pt_br.json b/src/main/resources/assets/viafabric/lang/pt_br.json index 9af997a..aa24a08 100644 --- a/src/main/resources/assets/viafabric/lang/pt_br.json +++ b/src/main/resources/assets/viafabric/lang/pt_br.json @@ -1,4 +1,5 @@ { + "gui.protocol_version_field.name": "Versão do protocolo", "gui.enable_client_side_button": "Habilitar ViaVersion", "gui.enable_client_side.question": "Você tem certeza de que deseja habilitar o modo client-side?", "gui.enable_client_side.warning": "Não posso garantir que este mod seja permitido em todos os (ou mesmo em quaisquer) servidores. Esse poderá causar problemas com plugins anti-trapaça. USE POR SUA PRÓPRIA CONTA E RISCO.",