diff --git a/build.gradle b/build.gradle index 9195278..10bff0b 100644 --- a/build.gradle +++ b/build.gradle @@ -45,8 +45,7 @@ dependencies { changing = true } shade 'org.yaml:snakeyaml:1.18' - implementation 'org.dimdev:mixin:0.7.11-SNAPSHOT' - compile 'org.dimdev.rift:Rift:1.0.1:dev' + compile 'org.dimdev:rift:1.0.4-74' } jar { @@ -72,7 +71,7 @@ mixin { minecraft { version = '1.13' - mappings = 'snapshot_5' + mappings = 'snapshot_20180904' runDir = 'run' - tweakClass = 'org.dimdev.riftloader.launch.RiftLoaderTweaker' + tweakClass = 'org.dimdev.riftloader.launch.RiftLoaderClientTweaker' } diff --git a/src/main/java/com/github/creeper123123321/viarift/gui/multiplayer/SaveProtocolButton.java b/src/main/java/com/github/creeper123123321/viarift/gui/multiplayer/SaveProtocolButton.java index 364d202..9d1614e 100644 --- a/src/main/java/com/github/creeper123123321/viarift/gui/multiplayer/SaveProtocolButton.java +++ b/src/main/java/com/github/creeper123123321/viarift/gui/multiplayer/SaveProtocolButton.java @@ -37,7 +37,8 @@ public class SaveProtocolButton extends GuiButton { } @Override - public void mouseClicked(double p_mouseClicked_1_, double p_mouseClicked_3_) { + public void mousePressed(double p_mouseClicked_1_, double p_mouseClicked_3_) { + super.mousePressed(p_mouseClicked_1_, p_mouseClicked_3_); try { ViaRift.fakeServerVersion = Integer.parseInt(textField.getText()); } catch (NumberFormatException e) { diff --git a/src/main/java/com/github/creeper123123321/viarift/mixin/client/MixinGuiMultiplayer.java b/src/main/java/com/github/creeper123123321/viarift/mixin/client/MixinGuiMultiplayer.java index eaaa2df..79ef056 100644 --- a/src/main/java/com/github/creeper123123321/viarift/mixin/client/MixinGuiMultiplayer.java +++ b/src/main/java/com/github/creeper123123321/viarift/mixin/client/MixinGuiMultiplayer.java @@ -45,22 +45,21 @@ public abstract class MixinGuiMultiplayer extends GuiScreen { protocolVersion = new GuiTextField(1235, fontRenderer, this.width / 2 + 70, 8, 30, 20); protocolVersion.setText(Integer.toString(ViaRift.fakeServerVersion)); protocolVersion.func_200675_a(new IntegerFormatFilter()); - this.field_195124_j.add(protocolVersion); + this.eventListeners.add(protocolVersion); saveProtocol = new SaveProtocolButton(6356, width / 2 + 100, 8, 50, 20, I18n.format("gui.save_protocol_version"), protocolVersion); - this.field_195124_j.add(saveProtocol); addButton(saveProtocol); } @Inject(method = "drawScreen", at = @At("TAIL")) private void onDrawScreen(int p_1, int p_2, float p_3, CallbackInfo ci) { drawCenteredString(fontRenderer, I18n.format("gui.protocol_version"),this.width / 2, 12, 0xFFFFFF); - protocolVersion.func_195608_a(p_1, p_2, p_3); + protocolVersion.drawTextField(p_1, p_2, p_3); } - @Inject(method = "updateScreen", at = @At("TAIL")) + @Inject(method = "tick", at = @At("TAIL")) private void onUpdateScreen(CallbackInfo ci) { - protocolVersion.updateCursorCounter(); + protocolVersion.tick(); } @Inject(method = "getFocused", at = @At("RETURN"), cancellable = true)