Rework max health values. Fixes BUKKIT-4398

This commit is contained in:
Wesley Wolfe
2013-07-02 12:34:40 -05:00
parent e79d26d7d7
commit 22adf8a3ce
12 changed files with 21 additions and 60 deletions

View File

@@ -6,10 +6,6 @@ import java.util.UUID;
//CraftBukkit start
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.event.entity.EntityDamageByBlockEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityRegainHealthEvent;
//CraftBukkit end
public abstract class EntityInsentient extends EntityLiving {
@@ -529,7 +525,7 @@ public abstract class EntityInsentient extends EntityLiving {
if (this.getGoalTarget() == null) {
return 3;
} else {
int i = (int) (this.getHealth() - this.maxHealth * 0.33F); // CraftBukkit - this.getMaxHealth() -> this.maxHealth
int i = (int) (this.getHealth() - this.getMaxHealth() * 0.33F);
i -= (3 - this.world.difficulty) * 4;
if (i < 0) {