[1.19.x] Moved Player.resetAttackStrengthTicker() to the end of Player.attack() (#9000)

This commit is contained in:
bconlon authored and GitHub committed 2022-09-03 20:06:35 +01:00
1 parent cf778b1759
commit 2a4230868f
1 file changed
+13 -1
@@ -215,7 +215,11 @@
if (p_36347_.m_6097_()) {
if (!p_36347_.m_7313_(this)) {
float f = (float)this.m_21133_(Attributes.f_22281_);
@@ -1086,7 +_,7 @@
@@ -1082,11 +_,10 @@
float f2 = this.m_36403_(0.5F);
f *= 0.2F + f2 * f2 * 0.8F;
f1 *= f2;
- this.m_36334_();
if (f > 0.0F || f1 > 0.0F) {
boolean flag = f2 > 0.9F;
boolean flag1 = false;
@@ -276,6 +280,14 @@
this.m_21008_(InteractionHand.MAIN_HAND, ItemStack.f_41583_);
}
}
@@ -1212,6 +_,7 @@
}
}
}
+ this.m_36334_(); // FORGE: Moved from beginning of attack() so that getAttackStrengthScale() returns an accurate value during all attack events
}
}
@@ -1228,7 +_,7 @@
}