Implement entity max health methods. Adds BUKKIT-266

This commit is contained in:
feildmaster
2012-12-23 05:49:03 -06:00
parent 4e1793f363
commit ced0646351
10 changed files with 92 additions and 18 deletions

View File

@@ -70,7 +70,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
public void c() {
if (!this.world.isStatic) {
this.datawatcher.watch(16, Integer.valueOf(this.health));
this.datawatcher.watch(16, Integer.valueOf(this.getScaledHealth())); // CraftBukkit - this.health -> this.getScaledHealth()
}
this.motY *= 0.6000000238418579D;
@@ -458,7 +458,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
}
public boolean o() {
return this.b() <= this.getMaxHealth() / 2;
return this.b() <= this.maxHealth / 2; // CraftBukkit - this.getMaxHealth() -> this.maxHealth
}
public EnumMonsterType getMonsterType() {