mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-11-22 11:45:47 +01:00
compiles, untested
This commit is contained in:
parent
8df5f0bbb3
commit
23cdbaeff5
@ -63,9 +63,9 @@ public abstract class MixinMultiplayerScreen extends Screen {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "init", at = @At("TAIL"))
|
@Inject(method = "init", at = @At("TAIL"), remap = false)
|
||||||
private void onInit(CallbackInfo ci) {
|
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.method_1890(new VersionFormatFilter());
|
||||||
protocolVersion.setChangedListener((text) -> {
|
protocolVersion.setChangedListener((text) -> {
|
||||||
protocolVersion.setSuggestion(null);
|
protocolVersion.setSuggestion(null);
|
||||||
@ -128,12 +128,15 @@ public abstract class MixinMultiplayerScreen extends Screen {
|
|||||||
addButton(enableClientSideViaVersion);
|
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) {
|
private void onRender(int int_1, int int_2, float float_1, CallbackInfo ci) {
|
||||||
protocolVersion.render(int_1, int_2, float_1);
|
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) {
|
private void onTick(CallbackInfo ci) {
|
||||||
protocolVersion.tick();
|
protocolVersion.tick();
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ import net.minecraft.client.MinecraftClient;
|
|||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.sortme.ChatMessageType;
|
import net.minecraft.text.ChatMessageType;
|
||||||
import net.minecraft.text.TextComponent;
|
import net.minecraft.text.TextComponent;
|
||||||
import us.myles.ViaVersion.api.PacketWrapper;
|
import us.myles.ViaVersion.api.PacketWrapper;
|
||||||
import us.myles.ViaVersion.api.Via;
|
import us.myles.ViaVersion.api.Via;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"gui.protocol_version.name": "Protocol Version",
|
||||||
"gui.enable_client_side_button": "Enable ViaVersion",
|
"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.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.",
|
"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.",
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"gui.protocol_version_field.name": "Versão do protocolo",
|
||||||
"gui.enable_client_side_button": "Habilitar ViaVersion",
|
"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.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.",
|
"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.",
|
||||||
|
Loading…
Reference in New Issue
Block a user