mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Fix shouldCauseReequipAnimation not affecting anything (#6256)
This commit is contained in:
1 parent
c8967fa176
commit
ebf489be8c
1 file changed
+7
-3
@@ -97,10 +97,12 @@
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.disableBlend();
|
||||
@@ -600,6 +608,15 @@
|
||||
@@ -600,8 +608,17 @@
|
||||
this.field_187471_h = MathHelper.func_76131_a(this.field_187471_h - 0.4F, 0.0F, 1.0F);
|
||||
} else {
|
||||
float f = clientplayerentity.func_184825_o(1.0F);
|
||||
- this.field_187469_f += MathHelper.func_76131_a((Objects.equals(this.field_187467_d, itemstack) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F);
|
||||
- this.field_187471_h += MathHelper.func_76131_a((float)(Objects.equals(this.field_187468_e, itemstack1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F);
|
||||
+
|
||||
+ boolean requipM = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187467_d, itemstack, clientplayerentity.field_71071_by.field_70461_c);
|
||||
+ boolean requipO = net.minecraftforge.client.ForgeHooksClient.shouldCauseReequipAnimation(this.field_187468_e, itemstack1, -1);
|
||||
@@ -110,6 +112,8 @@
|
||||
+ if (!requipO && !Objects.equals(this.field_187468_e, itemstack1))
|
||||
+ this.field_187468_e = itemstack1;
|
||||
+
|
||||
this.field_187469_f += MathHelper.func_76131_a((Objects.equals(this.field_187467_d, itemstack) ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F);
|
||||
this.field_187471_h += MathHelper.func_76131_a((float)(Objects.equals(this.field_187468_e, itemstack1) ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F);
|
||||
+ this.field_187469_f += MathHelper.func_76131_a((!requipM ? f * f * f : 0.0F) - this.field_187469_f, -0.4F, 0.4F);
|
||||
+ this.field_187471_h += MathHelper.func_76131_a((float)(!requipO ? 1 : 0) - this.field_187471_h, -0.4F, 0.4F);
|
||||
}
|
||||
|
||||
if (this.field_187469_f < 0.1F) {
|
||||
Reference in new issue
Block a user