Fix shouldCauseReequipAnimation not affecting anything (#6256)
This commit is contained in:
parent
c8967fa176
commit
ebf489be8c
1 changed files with 7 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue