Implemented pig zombie get/set anger functions.

By: Celtic Minstrel <celtic.minstrel.ca@>
This commit is contained in:
CraftBukkit/Spigot 2011-07-02 22:15:06 -04:00
parent 81d54eaa7c
commit 8c447e8839

View File

@ -11,9 +11,30 @@ public class CraftPigZombie extends CraftZombie implements PigZombie {
super(server, entity);
}
@Override
public EntityPigZombie getHandle() {
return (EntityPigZombie) super.getHandle();
}
@Override
public String toString() {
return "CraftPigZombie";
}
public int getAnger() {
return getHandle().angerLevel;
}
public void setAnger(int level) {
getHandle().angerLevel = level;
}
public void setAngry(boolean angry) {
setAnger(angry ? 400 : 0);
}
public boolean isAngry() {
return getAnger() > 0;
}
}