parent
c1ae2cdbf2
commit
03b7885aa6
1 changed files with 6 additions and 1 deletions
|
@ -118,6 +118,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);
|
||||
|
@ -144,7 +149,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);
|
||||
|
|
Loading…
Reference in a new issue