Try to clean up our poor EntityListener...

This commit is contained in:
GJ
2013-05-21 13:27:52 -04:00
parent 38ba2c21e5
commit d9926bab4e
2 changed files with 114 additions and 96 deletions

View File

@ -575,16 +575,11 @@ public final class CombatUtils {
* @return true if the entity is invincible, false otherwise
*/
public static boolean isInvincible(LivingEntity entity, int eventDamage) {
/*
* So apparently if you do more damage to a LivingEntity than its last damage int you bypass the invincibility.
* So yeah, this is for that.
*/
if ((entity.getNoDamageTicks() > entity.getMaximumNoDamageTicks() / 2.0F) && (eventDamage <= entity.getLastDamage())) {
return true;
}
return false;
return (entity.getNoDamageTicks() > entity.getMaximumNoDamageTicks() / 2.0F) && (eventDamage <= entity.getLastDamage());
}
/**