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

@@ -31,17 +31,11 @@ public class EntitySlime extends EntityInsentient implements IMonster {
// CraftBukkit - protected -> public
public void setSize(int i) {
boolean updateMaxHealth = this.getMaxHealth() == this.maxHealth; // CraftBukkit
this.datawatcher.watch(16, new Byte((byte) i));
this.a(0.6F * (float) i, 0.6F * (float) i);
this.setPosition(this.locX, this.locY, this.locZ);
this.a(GenericAttributes.a).a((double) (i * i));
// CraftBukkit start
if (updateMaxHealth) {
this.maxHealth = this.getMaxHealth();
}
this.setHealth(this.maxHealth);
// CraftBukkit end
this.setHealth(this.getMaxHealth());
this.b = i;
}