mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +01:00
Implemented pig zombie get/set anger functions.
By: Celtic Minstrel <celtic.minstrel.ca@>
This commit is contained in:
parent
81d54eaa7c
commit
8c447e8839
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user