diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java index be0a540128..f3087eba4a 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java @@ -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; + } + }