Fix Enchantment#doPostHurt and Enchantment#doPostAttack being called twice for players. Fixes MC-248272 (#8948)

This commit is contained in:
Brennan Ward authored and GitHub committed 2022-08-16 13:40:10 -07:00
1 parent 41deadc1e2
commit b8b3201372
1 file changed
+16
@@ -38,6 +38,22 @@
}, p_44834_);
return mutablefloat.floatValue();
}
@@ -168,6 +_,7 @@
m_44853_(enchantmenthelper$enchantmentvisitor, p_44824_.m_20158_());
}
+ if(false) // Forge: Fix MC-248272
if (p_44825_ instanceof Player) {
m_44850_(enchantmenthelper$enchantmentvisitor, p_44824_.m_21205_());
}
@@ -182,6 +_,7 @@
m_44853_(enchantmenthelper$enchantmentvisitor, p_44897_.m_20158_());
}
+ if(false) // Forge: Fix MC-248272
if (p_44897_ instanceof Player) {
m_44850_(enchantmenthelper$enchantmentvisitor, p_44897_.m_21205_());
}
@@ -302,7 +_,7 @@
public static int m_220287_(RandomSource p_220288_, int p_220289_, int p_220290_, ItemStack p_220291_) {