diff --git a/gradle.properties b/gradle.properties index ad1cf66..a79e418 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.15.2 -yarn_mappings=1.15.2+build.17 +minecraft_version=1.14.4 +yarn_mappings=1.14.4+build.18 loader_version=0.11.1 # Mod Properties -mod_version=1.1.0+mc1.15-1.16 +mod_version=1.1.0+mc1.14 maven_group=me.sizableshrimp archives_base_name=Mc122477Fix-fabric # Dependencies # check this on https://modmuss50.me/fabric.html -fabric_version=0.28.5+1.15 +fabric_version=0.28.5+1.14 diff --git a/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinKeyboard.java b/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinKeyboard.java index a268e73..153159a 100644 --- a/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinKeyboard.java +++ b/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinKeyboard.java @@ -19,7 +19,7 @@ private void injectOnKey(long window, int key, int scancode, int i, int j, Callb ci.cancel(); } - @Inject(method = "onChar", at = @At(value = "FIELD", target = "Lnet/minecraft/client/Keyboard;client:Lnet/minecraft/client/MinecraftClient;", ordinal = 0), cancellable = true) + @Inject(method = "onChar", at = @At(value = "FIELD", target = "Lnet/minecraft/client/MinecraftClient;currentScreen:Lnet/minecraft/client/gui/screen/Screen;", ordinal = 0), cancellable = true) private void injectOnChar(long window, int i, int j, CallbackInfo ci) { ActionResult result = KeyboardCharTypedCallback.EVENT.invoker().onCharTyped(window, i, j); diff --git a/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinRenderSystem.java b/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinMinecraftClient.java similarity index 54% rename from src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinRenderSystem.java rename to src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinMinecraftClient.java index 9765cee..7fb899a 100644 --- a/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinRenderSystem.java +++ b/src/main/java/me/sizableshrimp/mc122477fix/mixin/MixinMinecraftClient.java @@ -1,16 +1,16 @@ package me.sizableshrimp.mc122477fix.mixin; -import com.mojang.blaze3d.systems.RenderSystem; import me.sizableshrimp.mc122477fix.GLFWPollCallback; +import net.minecraft.client.MinecraftClient; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -@Mixin(RenderSystem.class) -public class MixinRenderSystem { - @Inject(method = "flipFrame", at = @At(value = "INVOKE", target = "Lorg/lwjgl/glfw/GLFW;glfwPollEvents()V", shift = At.Shift.AFTER)) - private static void injectGlfwPoll(CallbackInfo ci) { +@Mixin(MinecraftClient.class) +public class MixinMinecraftClient { + @Inject(method = "tick", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GLX;pollEvents()V", shift = At.Shift.AFTER, ordinal = 0)) + private void injectGlfwPoll(CallbackInfo ci) { GLFWPollCallback.EVENT.invoker().onPoll(); } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 05c4ab8..94a8385 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -26,6 +26,6 @@ "depends": { "fabricloader": ">=0.10.0", "fabric": "*", - "minecraft": ">=1.15" + "minecraft": "1.14.x" } }