Skip to content

Commit 06c3c7f

Browse files
authored
Merge pull request #158 from DJtheRedstoner/master
fix: block destroy progress positions rendered incorrectly with smooth aote
2 parents 9fa4549 + 9c00dd8 commit 06c3c7f

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderGlobal.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,32 @@ public void renderBlockLayer(EnumWorldBlockLayer blockLayerIn, double partialTic
7979
}
8080
}
8181

82+
//drawBlockDamageTexture
83+
@ModifyVariable(method="drawBlockDamageTexture", at=@At(value="STORE"), ordinal = 0)
84+
public double drawBlockDamageTexture_d0(double d0) {
85+
Vector3f currentPosition = CustomItemEffects.INSTANCE.getCurrentPosition();
86+
if(currentPosition != null) {
87+
return currentPosition.x;
88+
}
89+
return d0;
90+
}
91+
92+
@ModifyVariable(method="drawBlockDamageTexture", at=@At(value="STORE"), ordinal = 1)
93+
public double drawBlockDamageTexture_d1(double d1) {
94+
Vector3f currentPosition = CustomItemEffects.INSTANCE.getCurrentPosition();
95+
if(currentPosition != null) {
96+
return currentPosition.y;
97+
}
98+
return d1;
99+
}
100+
101+
@ModifyVariable(method="drawBlockDamageTexture", at=@At(value="STORE"), ordinal = 2)
102+
public double drawBlockDamageTexture_d2(double d2) {
103+
Vector3f currentPosition = CustomItemEffects.INSTANCE.getCurrentPosition();
104+
if(currentPosition != null) {
105+
return currentPosition.z;
106+
}
107+
return d2;
108+
}
109+
82110
}

0 commit comments

Comments
 (0)