From 896e45556a16ac30320acc245a57afcfa232a20e Mon Sep 17 00:00:00 2001 From: Prototik Date: Tue, 30 Jun 2015 01:00:00 +0700 Subject: [PATCH] Fix armor double damage, fix #79 --- patches/net/minecraft/entity/EntityLivingBase.java.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/net/minecraft/entity/EntityLivingBase.java.patch b/patches/net/minecraft/entity/EntityLivingBase.java.patch index 19d222a..4c8d45c 100644 --- a/patches/net/minecraft/entity/EntityLivingBase.java.patch +++ b/patches/net/minecraft/entity/EntityLivingBase.java.patch @@ -467,7 +467,7 @@ + if (human) + { + return -(f - ArmorProperties.ApplyArmor(EntityLivingBase.this, ((EntityPlayer) EntityLivingBase.this).inventory.armorInventory, -+ damagesource, f.floatValue())); ++ damagesource, f.floatValue(), false)); + } + // Cauldron end + return -(f - EntityLivingBase.this.applyArmorCalculations(damagesource, f.floatValue())); @@ -531,7 +531,7 @@ + if (!damagesource.isUnblockable()) + { + float armorDamage = (float) (event.getDamage() + event.getDamage(DamageModifier.BLOCKING) + event.getDamage(DamageModifier.HARD_HAT)); -+ if (this instanceof EntityPlayer) { ++ if (human) { + EntityPlayer player = (EntityPlayer) this; + armorDamage = ArmorProperties.ApplyArmor(player, player.inventory.armorInventory, damagesource, armorDamage, true); + } else {