From d41c2ff91e6285ac0c410bc81bdbaf53e372e214 Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Sun, 29 May 2022 15:54:41 +0700 Subject: [PATCH] fix overflow animations compat --- gradle.properties | 2 +- .../wyvest/redaction/mixin/OverflowGlintHandlerMixin.java | 7 ++++--- .../java/net/wyvest/redaction/mixin/RenderItemMixin.java | 3 ++- src/main/kotlin/net/wyvest/redaction/Redaction.kt | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gradle.properties b/gradle.properties index e0730a0..158d39b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,6 @@ org.gradle.jvmargs=-Xmx2G # Define project properties. mod_name=REDACTION -mod_ver=1.3.3 +mod_ver=1.3.4 loom.platform = forge \ No newline at end of file diff --git a/src/main/java/net/wyvest/redaction/mixin/OverflowGlintHandlerMixin.java b/src/main/java/net/wyvest/redaction/mixin/OverflowGlintHandlerMixin.java index d13adea..2a8f557 100644 --- a/src/main/java/net/wyvest/redaction/mixin/OverflowGlintHandlerMixin.java +++ b/src/main/java/net/wyvest/redaction/mixin/OverflowGlintHandlerMixin.java @@ -1,19 +1,20 @@ package net.wyvest.redaction.mixin; import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.resources.model.IBakedModel; import net.wyvest.redaction.config.RedactionConfig; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Pseudo; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Pseudo @Mixin(targets = "cc.woverflow.overflowanimations.GlintHandler", remap = false) public class OverflowGlintHandlerMixin { - @Inject(method = "renderGlint", at = @At("RETURN")) - private static void afterRenderEffect(IBakedModel model, CallbackInfo ci) { + @Inject(method = "renderGlint", at = @At("TAIL")) + private static void afterRenderEffect(RenderItem instance, IBakedModel model, CallbackInfoReturnable ci) { if (RedactionConfig.INSTANCE.getDisableHandLighting()) { RenderHelper.disableStandardItemLighting(); } diff --git a/src/main/java/net/wyvest/redaction/mixin/RenderItemMixin.java b/src/main/java/net/wyvest/redaction/mixin/RenderItemMixin.java index 854f362..53adaae 100644 --- a/src/main/java/net/wyvest/redaction/mixin/RenderItemMixin.java +++ b/src/main/java/net/wyvest/redaction/mixin/RenderItemMixin.java @@ -1,5 +1,6 @@ package net.wyvest.redaction.mixin; +import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.resources.model.IBakedModel; @@ -18,7 +19,7 @@ private void beforeRenderEffect(IBakedModel model, CallbackInfo ci) { } } - @Inject(method = "renderEffect", at = @At("RETURN")) + @Inject(method = "renderEffect", at = @At("TAIL")) private void afterRenderEffect(IBakedModel model, CallbackInfo ci) { if (RedactionConfig.INSTANCE.getDisableHandLighting()) { RenderHelper.disableStandardItemLighting(); diff --git a/src/main/kotlin/net/wyvest/redaction/Redaction.kt b/src/main/kotlin/net/wyvest/redaction/Redaction.kt index 9b91f33..76bd5dd 100644 --- a/src/main/kotlin/net/wyvest/redaction/Redaction.kt +++ b/src/main/kotlin/net/wyvest/redaction/Redaction.kt @@ -27,7 +27,7 @@ object Redaction { const val NAME = "REDACTION" - const val VERSION = "1.3.3" + const val VERSION = "1.3.4" const val ID = "redaction" val modDir = File(File("./W-OVERFLOW"), NAME) val isPatcher by lazy {