Fixed the LivingArmourHandler for defense so it no longer ate armour.
This commit is contained in:
parent
b70c71f7be
commit
e888907350
6 changed files with 79 additions and 10 deletions
|
@ -255,10 +255,9 @@ public class EventHandler
|
|||
}
|
||||
}
|
||||
|
||||
float amount = Math.min(Utils.getModifiedDamage(attackedPlayer, event.source, event.ammount), attackedPlayer.getHealth());
|
||||
|
||||
if (hasFullSet)
|
||||
{
|
||||
float amount = Math.min(Utils.getModifiedDamage(attackedPlayer, event.source, event.ammount), attackedPlayer.getHealth());
|
||||
ItemStack chestStack = attackedPlayer.getCurrentArmor(2);
|
||||
LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack);
|
||||
if (armour != null)
|
||||
|
@ -295,10 +294,9 @@ public class EventHandler
|
|||
}
|
||||
}
|
||||
|
||||
float amount = Math.min(Utils.getModifiedDamage(attackedEntity, event.source, event.ammount), attackedEntity.getHealth());
|
||||
|
||||
if (hasFullSet)
|
||||
{
|
||||
float amount = Math.min(Utils.getModifiedDamage(attackedEntity, event.source, event.ammount), attackedEntity.getHealth());
|
||||
ItemStack chestStack = player.getCurrentArmor(2);
|
||||
LivingArmour armour = ItemLivingArmour.getLivingArmour(chestStack);
|
||||
if (armour != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue