From 9c00dd875203f00889cd7ec30b5ee62cbe693d21 Mon Sep 17 00:00:00 2001 From: DJtheRedstoner <52044242+DJtheRedstoner@users.noreply.github.com> Date: Wed, 3 Mar 2021 09:42:16 -0500 Subject: fix: block destroy progress positions rendered incorrectly with smooth aote --- .../notenoughupdates/mixins/MixinRenderGlobal.java | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderGlobal.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderGlobal.java index 1b2b99ec..a11bf052 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderGlobal.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderGlobal.java @@ -79,4 +79,32 @@ public class MixinRenderGlobal { } } + //drawBlockDamageTexture + @ModifyVariable(method="drawBlockDamageTexture", at=@At(value="STORE"), ordinal = 0) + public double drawBlockDamageTexture_d0(double d0) { + Vector3f currentPosition = CustomItemEffects.INSTANCE.getCurrentPosition(); + if(currentPosition != null) { + return currentPosition.x; + } + return d0; + } + + @ModifyVariable(method="drawBlockDamageTexture", at=@At(value="STORE"), ordinal = 1) + public double drawBlockDamageTexture_d1(double d1) { + Vector3f currentPosition = CustomItemEffects.INSTANCE.getCurrentPosition(); + if(currentPosition != null) { + return currentPosition.y; + } + return d1; + } + + @ModifyVariable(method="drawBlockDamageTexture", at=@At(value="STORE"), ordinal = 2) + public double drawBlockDamageTexture_d2(double d2) { + Vector3f currentPosition = CustomItemEffects.INSTANCE.getCurrentPosition(); + if(currentPosition != null) { + return currentPosition.z; + } + return d2; + } + } -- cgit