From f7ff58c6c5c0c879dd6b9b2fe309cd99088776f8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 25 Jun 2020 19:58:27 +1000 Subject: [PATCH] SPIGOT-5803: Add Piglin/Zoglin Baby API --- .../org/bukkit/craftbukkit/entity/CraftPiglin.java | 10 ++++++++++ .../org/bukkit/craftbukkit/entity/CraftZoglin.java | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java index 41ba2d89aa..ddd728da8d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java @@ -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(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZoglin.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZoglin.java index bdfb5ef791..3d1774cf22 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZoglin.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZoglin.java @@ -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;