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)
|
public static float applyArmor(EntityLivingBase entity, NonNullList<ItemStack> inventory, DamageSource source, double damage)
|
||||||
{
|
{
|
||||||
|
if (source.isUnblockable())
|
||||||
|
{
|
||||||
|
return (float)damage;
|
||||||
|
}
|
||||||
|
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
{
|
{
|
||||||
System.out.println("Start: " + damage);
|
System.out.println("Start: " + damage);
|
||||||
|
@ -144,7 +149,7 @@ public interface ISpecialArmor
|
||||||
totalArmor += prop.Armor;
|
totalArmor += prop.Armor;
|
||||||
totalToughness += prop.Toughness;
|
totalToughness += prop.Toughness;
|
||||||
}
|
}
|
||||||
else if (stack.getItem() instanceof ItemArmor && !source.isUnblockable())
|
else if (stack.getItem() instanceof ItemArmor)
|
||||||
{
|
{
|
||||||
ItemArmor armor = (ItemArmor)stack.getItem();
|
ItemArmor armor = (ItemArmor)stack.getItem();
|
||||||
prop = new ArmorProperties(0, 0, Integer.MAX_VALUE);
|
prop = new ArmorProperties(0, 0, Integer.MAX_VALUE);
|
||||||
|
|
Loading…
Reference in a new issue