Fix Entityies not taking damage correctly. Closes #1511

This commit is contained in:
Lex Manos 2014-11-28 07:43:10 -08:00
parent a059a9a7fb
commit 17e5480b6e
2 changed files with 2 additions and 2 deletions

View file

@ -29,7 +29,7 @@
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_) public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_)
{ {
+ if (net.minecraftforge.common.ForgeHooks.onLivingAttack(this, p_70097_1_, p_70097_2_)) return false; + if (!net.minecraftforge.common.ForgeHooks.onLivingAttack(this, p_70097_1_, p_70097_2_)) return false;
if (this.func_180431_b(p_70097_1_)) if (this.func_180431_b(p_70097_1_))
{ {
return false; return false;

View file

@ -326,7 +326,7 @@ public class ForgeHooks
public static boolean onLivingAttack(EntityLivingBase entity, DamageSource src, float amount) public static boolean onLivingAttack(EntityLivingBase entity, DamageSource src, float amount)
{ {
return MinecraftForge.EVENT_BUS.post(new LivingAttackEvent(entity, src, amount)); return !MinecraftForge.EVENT_BUS.post(new LivingAttackEvent(entity, src, amount));
} }
public static float onLivingHurt(EntityLivingBase entity, DamageSource src, float amount) public static float onLivingHurt(EntityLivingBase entity, DamageSource src, float amount)