From ff351bcd6c37602e569f37657f793f7e99c09a9a Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Sat, 23 Mar 2019 09:55:58 -0300 Subject: [PATCH] Fix startup crash, use jitpack for viabackwards 1.14 --- build.gradle.kts | 3 ++- .../viafabric/mixin/client/MixinMultiplayerScreen.java | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7f37e7d..82daedc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -28,6 +28,7 @@ repositories { maven { url = URI.create("https://repo.viaversion.com/") } maven { url = URI.create("https://oss.sonatype.org/content/repositories/snapshots") } maven { url = URI.create("https://maven.fabricmc.net/") } + maven { url = URI.create("https://jitpack.io/")} } @@ -45,7 +46,7 @@ dependencies { // transitive = false, viabackwards-core because Guava is conflicting on runClient shade("us.myles:viaversion:2.0.0-19w12b") { isTransitive = false } shade("de.gerrygames:viarewind-core:1.4.0") { isTransitive = false } - shade("nl.matsv:viabackwards-core:3.0.0-19w11b") { isTransitive = false } + shade("com.github.ViaVersion.ViaBackwards:viabackwards-core:1.14-SNAPSHOT") { isTransitive = false } compileOnly("com.google.code.findbugs:jsr305:3.0.2") 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 a865121..0b84ca6 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 @@ -96,7 +96,12 @@ public abstract class MixinMultiplayerScreen extends Screen { this.listeners.add(protocolVersion); } - @Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/Screen;render(IIF)V"), remap = false) + @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") // Generated refmap doesn't have it + }, + remap = false) private void onRender(int int_1, int int_2, float float_1, CallbackInfo ci) { protocolVersion.render(int_1, int_2, float_1); }