SPIGOT-5803: Add Piglin/Zoglin Baby API

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2020-06-25 19:58:27 +10:00
parent a955c5cbab
commit 27d67a7a4e
2 changed files with 20 additions and 0 deletions

View File

@ -11,6 +11,16 @@ public class CraftPiglin extends CraftMonster implements Piglin {
super(server, entity);
}
@Override
public boolean isBaby() {
return getHandle().isBaby();
}
@Override
public void setBaby(boolean flag) {
getHandle().a(flag);
}
@Override
public EntityPiglin getHandle() {
return (EntityPiglin) super.getHandle();

View File

@ -11,6 +11,16 @@ public class CraftZoglin extends CraftMonster implements Zoglin {
super(server, entity);
}
@Override
public boolean isBaby() {
return getHandle().isBaby();
}
@Override
public void setBaby(boolean flag) {
getHandle().a(flag);
}
@Override
public EntityZoglin getHandle() {
return (EntityZoglin) entity;