mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-28 07:55:53 +00:00
Fix unblockable damage being blocked by armor. (#3933)
This commit is contained in:
1 parent
8e453de369
commit
1c7077d4a1
1 file changed
+6
-1
@@ -123,6 +123,11 @@ public interface ISpecialArmor
|
||||
*/
|
||||
public static float applyArmor(EntityLivingBase entity, NonNullList<ItemStack> inventory, DamageSource source, double damage)
|
||||
{
|
||||
if (source.isUnblockable())
|
||||
{
|
||||
return (float) damage;
|
||||
}
|
||||
|
||||
if (DEBUG)
|
||||
{
|
||||
System.out.println("Start: " + damage);
|
||||
@@ -149,7 +154,7 @@ public interface ISpecialArmor
|
||||
totalArmor += prop.Armor;
|
||||
totalToughness += prop.Toughness;
|
||||
}
|
||||
else if (stack.getItem() instanceof ItemArmor && !source.isUnblockable())
|
||||
else if (stack.getItem() instanceof ItemArmor)
|
||||
{
|
||||
ItemArmor armor = (ItemArmor)stack.getItem();
|
||||
prop = new ArmorProperties(0, 0, Integer.MAX_VALUE);
|
||||
|
||||
Reference in new issue
Block a user