diff --git a/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java b/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java index cf1bb9161..d546354d7 100644 --- a/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java +++ b/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java @@ -30,6 +30,7 @@ import net.citizensnpcs.api.astar.pathfinder.SwimmingExaminer; import net.citizensnpcs.api.event.DespawnReason; import net.citizensnpcs.api.event.NPCDespawnEvent; import net.citizensnpcs.api.event.NPCSpawnEvent; +import net.citizensnpcs.api.event.NPCTeleportEvent; import net.citizensnpcs.api.event.SpawnReason; import net.citizensnpcs.api.npc.AbstractNPC; import net.citizensnpcs.api.npc.BlockBreaker; @@ -437,8 +438,19 @@ public class CitizensNPC extends AbstractNPC { getOrAddTrait(SitTrait.class).setSitting(location); } Location npcLoc = getEntity().getLocation(CACHE_LOCATION); - if (isSpawned() && npcLoc.getWorld() == location.getWorld() && npcLoc.distance(location) < 1) { - NMS.setHeadYaw(getEntity(), location.getYaw()); + if (isSpawned() && npcLoc.getWorld() == location.getWorld()) { + if (npcLoc.distance(location) < 1) { + NMS.setHeadYaw(getEntity(), location.getYaw()); + } + if (getEntity().getType() == EntityType.PLAYER && !getEntity().isInsideVehicle() + && NMS.getPassengers(getEntity()).size() == 0) { + NPCTeleportEvent event = new NPCTeleportEvent(this, location); + Bukkit.getPluginManager().callEvent(event); + if (event.isCancelled()) + return; + NMS.setLocationDirectly(getEntity(), location); + return; + } } super.teleport(location, reason); } diff --git a/main/src/main/java/net/citizensnpcs/util/NMS.java b/main/src/main/java/net/citizensnpcs/util/NMS.java index cda19ab04..180d05145 100644 --- a/main/src/main/java/net/citizensnpcs/util/NMS.java +++ b/main/src/main/java/net/citizensnpcs/util/NMS.java @@ -636,6 +636,10 @@ public class NMS { BRIDGE.setKnockbackResistance(entity, d); } + public static void setLocationDirectly(Entity entity, Location location) { + BRIDGE.setLocationDirectly(entity, location); + } + public static void setLyingDown(Entity cat, boolean lying) { BRIDGE.setLyingDown(cat, lying); } diff --git a/main/src/main/java/net/citizensnpcs/util/NMSBridge.java b/main/src/main/java/net/citizensnpcs/util/NMSBridge.java index 4cf81198c..649ec9a1c 100644 --- a/main/src/main/java/net/citizensnpcs/util/NMSBridge.java +++ b/main/src/main/java/net/citizensnpcs/util/NMSBridge.java @@ -192,6 +192,8 @@ public interface NMSBridge { public void setKnockbackResistance(LivingEntity entity, double d); + public void setLocationDirectly(Entity entity, Location location); + public default void setLyingDown(Entity cat, boolean lying) { throw new UnsupportedOperationException(); } diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util/NMSImpl.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util/NMSImpl.java index 82d08fb07..30cc39387 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util/NMSImpl.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util/NMSImpl.java @@ -1191,6 +1191,12 @@ public class NMSImpl implements NMSBridge { handle.getAttributeInstance(GenericAttributes.c).setValue(d); } + @Override + public void setLocationDirectly(org.bukkit.entity.Entity entity, Location location) { + getHandle(entity).setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), + location.getPitch()); + } + @Override public void setNavigationTarget(org.bukkit.entity.Entity handle, org.bukkit.entity.Entity target, float speed) { NMSImpl.getNavigation(handle).a(NMSImpl.getHandle(target), speed); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/NMSImpl.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/NMSImpl.java index 0e8fc6ca8..0db37b1d1 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/NMSImpl.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/NMSImpl.java @@ -1251,6 +1251,12 @@ public class NMSImpl implements NMSBridge { handle.getAttributeInstance(GenericAttributes.c).setValue(d); } + @Override + public void setLocationDirectly(org.bukkit.entity.Entity entity, Location location) { + getHandle(entity).setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), + location.getPitch()); + } + @Override public void setNavigationTarget(org.bukkit.entity.Entity handle, org.bukkit.entity.Entity target, float speed) { NMSImpl.getNavigation(handle).a(NMSImpl.getHandle(target), speed); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util/NMSImpl.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util/NMSImpl.java index 9b2260d83..0da2aed5e 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util/NMSImpl.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util/NMSImpl.java @@ -1258,6 +1258,12 @@ public class NMSImpl implements NMSBridge { handle.getAttributeInstance(GenericAttributes.c).setValue(d); } + @Override + public void setLocationDirectly(org.bukkit.entity.Entity entity, Location location) { + getHandle(entity).setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), + location.getPitch()); + } + @Override public void setNavigationTarget(org.bukkit.entity.Entity handle, org.bukkit.entity.Entity target, float speed) { NMSImpl.getNavigation(handle).a(NMSImpl.getHandle(target), speed); diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/NMSImpl.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/NMSImpl.java index 5852c9c55..9c27ac906 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/NMSImpl.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/NMSImpl.java @@ -1298,6 +1298,12 @@ public class NMSImpl implements NMSBridge { handle.getAttributeInstance(GenericAttributes.c).setValue(d); } + @Override + public void setLocationDirectly(org.bukkit.entity.Entity entity, Location location) { + getHandle(entity).setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), + location.getPitch()); + } + @Override public void setNavigationTarget(org.bukkit.entity.Entity handle, org.bukkit.entity.Entity target, float speed) { NMSImpl.getNavigation(handle).a(NMSImpl.getHandle(target), speed); diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java index 31b310893..0d410751d 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java @@ -1335,6 +1335,12 @@ public class NMSImpl implements NMSBridge { handle.getAttributeInstance(GenericAttributes.KNOCKBACK_RESISTANCE).setValue(d); } + @Override + public void setLocationDirectly(org.bukkit.entity.Entity entity, Location location) { + getHandle(entity).setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), + location.getPitch()); + } + @Override public void setLyingDown(org.bukkit.entity.Entity cat, boolean lying) { ((EntityCat) getHandle(cat)).u(lying); diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/NMSImpl.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/NMSImpl.java index 01c9634c1..de801dc57 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/NMSImpl.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/NMSImpl.java @@ -1353,6 +1353,12 @@ public class NMSImpl implements NMSBridge { handle.getAttributeInstance(GenericAttributes.KNOCKBACK_RESISTANCE).setValue(d); } + @Override + public void setLocationDirectly(org.bukkit.entity.Entity entity, Location location) { + getHandle(entity).setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), + location.getPitch()); + } + @Override public void setLyingDown(org.bukkit.entity.Entity cat, boolean lying) { ((EntityCat) getHandle(cat)).u(lying); diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java index fe468564e..4f8201955 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java @@ -1376,6 +1376,12 @@ public class NMSImpl implements NMSBridge { handle.getAttributeInstance(GenericAttributes.KNOCKBACK_RESISTANCE).setValue(d); } + @Override + public void setLocationDirectly(org.bukkit.entity.Entity entity, Location location) { + getHandle(entity).setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), + location.getPitch()); + } + @Override public void setLyingDown(org.bukkit.entity.Entity cat, boolean lying) { ((EntityCat) getHandle(cat)).x(lying); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/AxolotlController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/AxolotlController.java index d80a77c0a..19479e017 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/AxolotlController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/AxolotlController.java @@ -58,12 +58,6 @@ public class AxolotlController extends MobEntityController { } public static class EntityAxolotlNPC extends Axolotl implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -151,6 +145,12 @@ public class AxolotlController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BatController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BatController.java index eb8e45740..955e6b7b1 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BatController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BatController.java @@ -44,12 +44,6 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityBatNPC(EntityType types, Level level) { @@ -130,6 +124,12 @@ public class BatController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BeeController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BeeController.java index e62230372..8216ad384 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BeeController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BeeController.java @@ -44,12 +44,6 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityBeeNPC(EntityType types, Level level) { @@ -127,6 +121,12 @@ public class BeeController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BlazeController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BlazeController.java index d3c55d625..a52ca468c 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BlazeController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BlazeController.java @@ -44,12 +44,6 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityBlazeNPC(EntityType types, Level level) { @@ -122,6 +116,12 @@ public class BlazeController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CatController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CatController.java index ae34c52ad..73e687a1b 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CatController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CatController.java @@ -48,12 +48,6 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -144,6 +138,12 @@ public class CatController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CaveSpiderController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CaveSpiderController.java index 410cd5aba..c5bf7c0e0 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CaveSpiderController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CaveSpiderController.java @@ -47,12 +47,6 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityType types, Level level) { @@ -141,6 +135,12 @@ public class CaveSpiderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ChickenController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ChickenController.java index b165e5d1d..49fb4b61e 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ChickenController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ChickenController.java @@ -48,12 +48,6 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -152,6 +146,12 @@ public class ChickenController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CodController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CodController.java index 134fe367f..dbcb6fa24 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CodController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CodController.java @@ -54,12 +54,6 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -177,6 +171,12 @@ public class CodController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CowController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CowController.java index 376e5fdb2..01a8e0e57 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CowController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CowController.java @@ -53,12 +53,6 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -149,6 +143,12 @@ public class CowController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CreeperController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CreeperController.java index 0314dd9e7..9d222918a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CreeperController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CreeperController.java @@ -49,12 +49,6 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private boolean allowPowered; private final CitizensNPC npc; @@ -145,6 +139,12 @@ public class CreeperController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DolphinController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DolphinController.java index af28d4514..b779ccec6 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DolphinController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DolphinController.java @@ -50,17 +50,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private boolean inProtectedTick; private final CitizensNPC npc; - private MoveControl oldMoveController; + private MoveControl oldMoveController; public EntityDolphinNPC(EntityType types, Level level) { this(types, level, null); } @@ -149,6 +143,12 @@ public class DolphinController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DrownedController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DrownedController.java index 15162be0e..b976f4743 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DrownedController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DrownedController.java @@ -47,12 +47,6 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityDrownedNPC(EntityType types, Level level) { @@ -141,6 +135,12 @@ public class DrownedController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EnderDragonController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EnderDragonController.java index c836425ea..39f2ee34f 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EnderDragonController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EnderDragonController.java @@ -45,12 +45,6 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEnderDragonNPC(EntityType types, Level level) { @@ -139,6 +133,12 @@ public class EnderDragonController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermanController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermanController.java index 13002e28f..9abfd387e 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermanController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermanController.java @@ -50,12 +50,6 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEndermanNPC(EntityType types, Level level) { @@ -148,6 +142,12 @@ public class EndermanController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermiteController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermiteController.java index 93c7749d7..df6462b6c 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermiteController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermiteController.java @@ -47,12 +47,6 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEndermiteNPC(EntityType types, Level level) { @@ -141,6 +135,12 @@ public class EndermiteController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EvokerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EvokerController.java index 0c16d1279..47b9ca7ef 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EvokerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EvokerController.java @@ -41,12 +41,6 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEvokerNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class EvokerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/FoxController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/FoxController.java index 323c0399f..f3e152166 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/FoxController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/FoxController.java @@ -42,12 +42,6 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -138,6 +132,12 @@ public class FoxController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GhastController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GhastController.java index 2abaf324c..cb13a2ef6 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GhastController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GhastController.java @@ -38,12 +38,6 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGhastNPC(EntityType types, Level level) { @@ -122,6 +116,12 @@ public class GhastController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GiantController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GiantController.java index 61d8cf356..941dbe785 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GiantController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GiantController.java @@ -41,12 +41,6 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGiantNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class GiantController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GlowSquidController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GlowSquidController.java index e0c361959..e9918490b 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GlowSquidController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GlowSquidController.java @@ -41,12 +41,6 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGlowSquidNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class GlowSquidController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GoatController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GoatController.java index 5d7a9d46d..3be1dbb3b 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GoatController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GoatController.java @@ -42,12 +42,6 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -138,6 +132,12 @@ public class GoatController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianController.java index 826ef9689..ddb154c14 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianController.java @@ -41,12 +41,6 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGuardianNPC(EntityType types, Level level) { @@ -141,6 +135,12 @@ public class GuardianController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianElderController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianElderController.java index 210f52210..13be74ae8 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianElderController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianElderController.java @@ -41,12 +41,6 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGuardianElderNPC(EntityType types, Level level) { @@ -141,6 +135,12 @@ public class GuardianElderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HoglinController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HoglinController.java index 3acc931eb..b2062d753 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HoglinController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HoglinController.java @@ -41,12 +41,6 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityHoglinNPC(EntityType types, Level level) { @@ -138,6 +132,12 @@ public class HoglinController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseController.java index 82795dce5..8d7e4e5bc 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseController.java @@ -52,12 +52,6 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; private boolean calledNMSHeight = false; @@ -186,6 +180,12 @@ public class HorseController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseDonkeyController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseDonkeyController.java index 2641a0fdf..303cd446e 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseDonkeyController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseDonkeyController.java @@ -52,17 +52,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; + boolean calledNMSHeight = false; private final CitizensNPC npc; private boolean riding; - public EntityHorseDonkeyNPC(EntityType types, Level level) { this(types, level, null); } @@ -182,6 +176,12 @@ public class HorseDonkeyController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseMuleController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseMuleController.java index 3b73a8897..b6a2bfa68 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseMuleController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseMuleController.java @@ -52,12 +52,6 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; boolean calledNMSHeight = false; @@ -185,6 +179,12 @@ public class HorseMuleController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseSkeletonController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseSkeletonController.java index 52c5c2268..1a0ff794a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseSkeletonController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseSkeletonController.java @@ -52,12 +52,6 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; boolean calledNMSHeight = false; @@ -185,6 +179,12 @@ public class HorseSkeletonController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseZombieController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseZombieController.java index d0670d2d8..1ae71f5f6 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseZombieController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseZombieController.java @@ -52,12 +52,6 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; boolean calledNMSHeight = false; @@ -185,6 +179,12 @@ public class HorseZombieController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IllusionerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IllusionerController.java index 7442482b4..6c5b50507 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IllusionerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IllusionerController.java @@ -41,12 +41,6 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityIllusionerNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class IllusionerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IronGolemController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IronGolemController.java index 4b9a2259e..827a16522 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IronGolemController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IronGolemController.java @@ -41,12 +41,6 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityIronGolemNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class IronGolemController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/LlamaController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/LlamaController.java index 2fdc8c97d..d508aee01 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/LlamaController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/LlamaController.java @@ -50,12 +50,6 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -155,6 +149,12 @@ public class LlamaController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MagmaCubeController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MagmaCubeController.java index 83f218f9c..5bb00a9e9 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MagmaCubeController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MagmaCubeController.java @@ -44,12 +44,6 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -136,6 +130,12 @@ public class MagmaCubeController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MushroomCowController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MushroomCowController.java index 92600a218..0e27814e1 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MushroomCowController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MushroomCowController.java @@ -45,12 +45,6 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -141,6 +135,12 @@ public class MushroomCowController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/OcelotController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/OcelotController.java index f53918704..93e50d65a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/OcelotController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/OcelotController.java @@ -43,12 +43,6 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -144,6 +138,12 @@ public class OcelotController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PandaController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PandaController.java index b664c22ae..07ecc08c0 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PandaController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PandaController.java @@ -42,12 +42,6 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -138,6 +132,12 @@ public class PandaController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ParrotController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ParrotController.java index 9478541eb..3d2c99de0 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ParrotController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ParrotController.java @@ -41,12 +41,6 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityParrotNPC(EntityType types, Level level) { @@ -126,6 +120,12 @@ public class ParrotController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PhantomController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PhantomController.java index a7885362a..d3ec41f67 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PhantomController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PhantomController.java @@ -45,12 +45,6 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -163,6 +157,12 @@ public class PhantomController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isSunBurnTick() { if (npc == null || !npc.isProtected()) diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigController.java index 019c99bc9..7981ec52d 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigController.java @@ -44,12 +44,6 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -146,6 +140,12 @@ public class PigController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigZombieController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigZombieController.java index 0ec945d9e..955ea65bd 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigZombieController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigZombieController.java @@ -42,12 +42,6 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityPigZombieNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class PigZombieController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinBruteController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinBruteController.java index 95716eda4..ddb34e4f0 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinBruteController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinBruteController.java @@ -41,12 +41,6 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityType types, Level level) { @@ -138,6 +132,12 @@ public class PiglinBruteController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinController.java index 913f2ac28..12900ac9d 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinController.java @@ -41,12 +41,6 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityPiglinNPC(EntityType types, Level level) { @@ -138,6 +132,12 @@ public class PiglinController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PillagerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PillagerController.java index f2e8cb147..b93913575 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PillagerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PillagerController.java @@ -42,12 +42,6 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -138,6 +132,12 @@ public class PillagerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PolarBearController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PolarBearController.java index 826866305..e9f775ae1 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PolarBearController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PolarBearController.java @@ -39,12 +39,6 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -120,6 +114,12 @@ public class PolarBearController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PufferFishController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PufferFishController.java index c027c4063..99c9b04d1 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PufferFishController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PufferFishController.java @@ -51,12 +51,6 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -180,6 +174,12 @@ public class PufferFishController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RabbitController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RabbitController.java index f2b6f784e..acdea4063 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RabbitController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RabbitController.java @@ -43,12 +43,6 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -147,6 +141,12 @@ public class RabbitController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RavagerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RavagerController.java index a46be1810..66663dc34 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RavagerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RavagerController.java @@ -42,12 +42,6 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -138,6 +132,12 @@ public class RavagerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SalmonController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SalmonController.java index 95b841dd7..872ec47bf 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SalmonController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SalmonController.java @@ -48,12 +48,6 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -169,6 +163,12 @@ public class SalmonController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SheepController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SheepController.java index 303e32742..7e8a6af85 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SheepController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SheepController.java @@ -42,12 +42,6 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -138,6 +132,12 @@ public class SheepController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ShulkerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ShulkerController.java index 1c39b39d3..caf2b36d8 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ShulkerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ShulkerController.java @@ -42,12 +42,6 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityShulkerNPC(EntityType types, Level level) { @@ -139,6 +133,12 @@ public class ShulkerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SilverfishController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SilverfishController.java index 1909184d4..e48f17292 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SilverfishController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SilverfishController.java @@ -42,12 +42,6 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySilverfishNPC(EntityType types, Level level) { @@ -142,6 +136,12 @@ public class SilverfishController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonController.java index e806d0718..4f2d4d56d 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonController.java @@ -41,12 +41,6 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySkeletonNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class SkeletonController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonStrayController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonStrayController.java index 835e0576a..bb819e06f 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonStrayController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonStrayController.java @@ -41,12 +41,6 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityStrayNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class SkeletonStrayController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonWitherController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonWitherController.java index 2d9fb49ca..388ef036a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonWitherController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonWitherController.java @@ -41,12 +41,6 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class SkeletonWitherController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SlimeController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SlimeController.java index eb2dbefa8..45593380d 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SlimeController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SlimeController.java @@ -44,12 +44,6 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -136,6 +130,12 @@ public class SlimeController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SnowmanController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SnowmanController.java index f1b32dd90..0951c92df 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SnowmanController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SnowmanController.java @@ -41,12 +41,6 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySnowmanNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class SnowmanController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SpiderController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SpiderController.java index 58e67bf47..48edfe368 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SpiderController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SpiderController.java @@ -41,12 +41,6 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySpiderNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class SpiderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SquidController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SquidController.java index 31dea2004..343602098 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SquidController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SquidController.java @@ -41,12 +41,6 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySquidNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class SquidController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/StriderController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/StriderController.java index 617228d43..c0aa90ab4 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/StriderController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/StriderController.java @@ -41,12 +41,6 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityStriderNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class StriderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TraderLlamaController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TraderLlamaController.java index 358142df9..2e17fd42d 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TraderLlamaController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TraderLlamaController.java @@ -50,12 +50,6 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -156,6 +150,12 @@ public class TraderLlamaController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TropicalFishController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TropicalFishController.java index 2abe00cdd..e0dc6b2f8 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TropicalFishController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TropicalFishController.java @@ -48,12 +48,6 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -171,6 +165,12 @@ public class TropicalFishController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TurtleController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TurtleController.java index 549940af7..4891cccc2 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TurtleController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TurtleController.java @@ -45,12 +45,6 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private JumpControl oldJumpController; @@ -157,6 +151,12 @@ public class TurtleController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VexController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VexController.java index ed692d25d..8233ebb01 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VexController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VexController.java @@ -38,12 +38,6 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityVexNPC(EntityType types, Level level) { @@ -120,6 +114,12 @@ public class VexController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VillagerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VillagerController.java index 697ee2c88..681549c52 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VillagerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VillagerController.java @@ -49,12 +49,6 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private boolean blockingATrade; boolean calledNMSHeight = false; @@ -152,6 +146,12 @@ public class VillagerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isTrading() { if (blockingATrade) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VindicatorController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VindicatorController.java index 7a11612b6..e4a9993c2 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VindicatorController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VindicatorController.java @@ -42,12 +42,6 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -138,6 +132,12 @@ public class VindicatorController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WanderingTraderController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WanderingTraderController.java index 2e2e8cfe8..65a23f016 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WanderingTraderController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WanderingTraderController.java @@ -48,12 +48,6 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private boolean blockingATrade; private boolean blockTrades = true; @@ -155,6 +149,12 @@ public class WanderingTraderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isTrading() { if (blockingATrade) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitchController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitchController.java index c3ebb8978..f6a4ec6ad 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitchController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitchController.java @@ -41,12 +41,6 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityWitchNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class WitchController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitherController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitherController.java index d07052987..29f3c062c 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitherController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitherController.java @@ -38,12 +38,6 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityWitherNPC(EntityType types, Level level) { @@ -132,6 +126,12 @@ public class WitherController extends MobEntityController { : npc.data().get("wither-arrow-shield"); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WolfController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WolfController.java index 0a4ac1fc0..f15a6eeef 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WolfController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WolfController.java @@ -44,12 +44,6 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -140,6 +134,12 @@ public class WolfController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZoglinController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZoglinController.java index c5f5fe46c..0a0d9633b 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZoglinController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZoglinController.java @@ -41,12 +41,6 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityZoglinNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class ZoglinController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieController.java index dce578e30..463809a59 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieController.java @@ -41,12 +41,6 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityZombieNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class ZombieController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieHuskController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieHuskController.java index c4a2ca95e..ab2a8a83f 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieHuskController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieHuskController.java @@ -41,12 +41,6 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityZombieHuskNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class ZombieHuskController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieVillagerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieVillagerController.java index 921315bbd..76ddf19e5 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieVillagerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieVillagerController.java @@ -41,12 +41,6 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityType types, Level level) { @@ -135,6 +129,12 @@ public class ZombieVillagerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/AreaEffectCloudController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/AreaEffectCloudController.java index abdd8bc84..46b3f8b33 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/AreaEffectCloudController.java @@ -40,12 +40,6 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityType types, Level level) { @@ -70,6 +64,12 @@ public class AreaEffectCloudController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ArmorStandController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ArmorStandController.java index 13dfff95a..6aeabc60d 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ArmorStandController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ArmorStandController.java @@ -45,12 +45,6 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends ArmorStand implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityArmorStandNPC(EntityType types, Level level) { @@ -86,6 +80,12 @@ public class ArmorStandController extends MobEntityController { return event.isCancelled() ? InteractionResult.FAIL : InteractionResult.SUCCESS; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/BoatController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/BoatController.java index c10e85d4d..51969bd16 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/BoatController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/BoatController.java @@ -47,22 +47,16 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double aC; private float aD; private Status aE; + private Status aF; private double ap; private double ar; private final CitizensNPC npc; - public EntityBoatNPC(EntityType types, Level level) { this(types, level, null); } @@ -101,6 +95,12 @@ public class BoatController extends MobEntityController { return Status.IN_AIR; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/DragonFireballController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/DragonFireballController.java index 2dcb44680..8b67b742b 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/DragonFireballController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/DragonFireballController.java @@ -40,12 +40,6 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityDragonFireballNPC(EntityType types, Level level) { @@ -70,6 +64,12 @@ public class DragonFireballController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EggController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EggController.java index f1820688f..296a3daac 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EggController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EggController.java @@ -50,12 +50,6 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEggNPC(EntityType types, Level level) { @@ -85,6 +79,12 @@ public class EggController extends AbstractEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderCrystalController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderCrystalController.java index df433bf2b..40dc8efc7 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderCrystalController.java @@ -40,12 +40,6 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityType types, Level level) { @@ -70,6 +64,12 @@ public class EnderCrystalController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderPearlController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderPearlController.java index 5555ff019..671873960 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderPearlController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderPearlController.java @@ -41,12 +41,6 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEnderPearlNPC(EntityType types, Level level) { @@ -71,6 +65,12 @@ public class EnderPearlController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderSignalController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderSignalController.java index 1815e6d95..e8fe57caf 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderSignalController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderSignalController.java @@ -41,12 +41,6 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEnderSignalNPC(EntityType types, Level level) { @@ -71,6 +65,12 @@ public class EnderSignalController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EvokerFangsController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EvokerFangsController.java index d3a1762fa..9fb6a6c47 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EvokerFangsController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EvokerFangsController.java @@ -39,12 +39,6 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityType types, Level level) { @@ -80,6 +74,12 @@ public class EvokerFangsController extends MobEntityController { return event.isCancelled() ? InteractionResult.FAIL : InteractionResult.SUCCESS; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ExperienceOrbController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ExperienceOrbController.java index ed9456707..6b0b3ce3d 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ExperienceOrbController.java @@ -34,12 +34,6 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityType types, Level level) { @@ -64,6 +58,12 @@ public class ExperienceOrbController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FallingBlockController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FallingBlockController.java index f1c273a92..d90638439 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FallingBlockController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FallingBlockController.java @@ -51,12 +51,6 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends FallingBlockEntity implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityFallingBlockNPC(EntityType types, Level level) { @@ -86,6 +80,12 @@ public class FallingBlockController extends AbstractEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FireworkController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FireworkController.java index 048795b28..e322ffe63 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FireworkController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FireworkController.java @@ -35,12 +35,6 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityFireworkNPC(EntityType types, Level level) { @@ -65,6 +59,12 @@ public class FireworkController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FishingHookController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FishingHookController.java index 39ece5adc..cdacebf6d 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FishingHookController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FishingHookController.java @@ -44,12 +44,6 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityFishingHookNPC(EntityType types, Level level) { @@ -84,6 +78,12 @@ public class FishingHookController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/GlowItemFrameController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/GlowItemFrameController.java index 2a97c17c3..08bd75565 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/GlowItemFrameController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/GlowItemFrameController.java @@ -46,12 +46,6 @@ public class GlowItemFrameController extends MobEntityController { } public static class EntityGlowItemFrameNPC extends GlowItemFrame implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGlowItemFrameNPC(EntityType types, Level level) { @@ -76,6 +70,12 @@ public class GlowItemFrameController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemController.java index 596eb9adc..c12d3c0fc 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemController.java @@ -46,12 +46,6 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends ItemEntity implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityItemNPC(EntityType types, Level level) { @@ -77,6 +71,12 @@ public class ItemController extends AbstractEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemFrameController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemFrameController.java index 59a032394..b8361a6e1 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemFrameController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemFrameController.java @@ -45,12 +45,6 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends ItemFrame implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityItemFrameNPC(EntityType types, Level level) { @@ -75,6 +69,12 @@ public class ItemFrameController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LargeFireballController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LargeFireballController.java index 560015ea9..071d56e9c 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LargeFireballController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LargeFireballController.java @@ -34,12 +34,6 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityLargeFireballNPC(EntityType types, Level level) { @@ -64,6 +58,12 @@ public class LargeFireballController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LeashController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LeashController.java index abe755c77..a5a80f444 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LeashController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LeashController.java @@ -35,12 +35,6 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityLeashNPC(EntityType types, Level level) { @@ -65,6 +59,12 @@ public class LeashController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LlamaSpitController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LlamaSpitController.java index b179f9483..73fa5ba4a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LlamaSpitController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LlamaSpitController.java @@ -47,12 +47,6 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityType types, Level level) { @@ -82,6 +76,12 @@ public class LlamaSpitController extends AbstractEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MarkerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MarkerController.java index c4ea5a1e7..e0b8a8067 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MarkerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MarkerController.java @@ -34,12 +34,6 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMarkerNPC(EntityType types, Level level) { @@ -64,6 +58,12 @@ public class MarkerController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartChestController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartChestController.java index 9796e8eda..111059546 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartChestController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartChestController.java @@ -35,12 +35,6 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartChestNPC(EntityType types, Level level) { @@ -65,6 +59,12 @@ public class MinecartChestController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartCommandController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartCommandController.java index df0242096..aa9725e77 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartCommandController.java @@ -35,12 +35,6 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityType types, Level level) { @@ -65,6 +59,12 @@ public class MinecartCommandController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartFurnaceController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartFurnaceController.java index fa3965b0e..e3ad31183 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartFurnaceController.java @@ -35,12 +35,6 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityType types, Level level) { @@ -65,6 +59,12 @@ public class MinecartFurnaceController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartHopperController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartHopperController.java index ceefd0bd4..4de5b51cc 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartHopperController.java @@ -30,12 +30,6 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityType types, Level level) { @@ -52,6 +46,12 @@ public class MinecartHopperController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartRideableController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartRideableController.java index 5e87474a0..626ea999a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartRideableController.java @@ -34,12 +34,6 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityType types, Level level) { @@ -64,6 +58,12 @@ public class MinecartRideableController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartSpawnerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartSpawnerController.java index 4fe4a0159..bb5d4002e 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartSpawnerController.java @@ -30,12 +30,6 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityType types, Level level) { @@ -52,6 +46,12 @@ public class MinecartSpawnerController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartTNTController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartTNTController.java index fec106152..78b5f4b27 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartTNTController.java @@ -30,12 +30,6 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityType types, Level level) { @@ -52,6 +46,12 @@ public class MinecartTNTController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/PaintingController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/PaintingController.java index 9a6f430a8..3ab7caaa8 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/PaintingController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/PaintingController.java @@ -34,12 +34,6 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityPaintingNPC(EntityType types, Level level) { @@ -64,6 +58,12 @@ public class PaintingController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ShulkerBulletController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ShulkerBulletController.java index 308bf8830..540207c95 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ShulkerBulletController.java @@ -34,12 +34,6 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityType types, Level level) { @@ -64,6 +58,12 @@ public class ShulkerBulletController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SmallFireballController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SmallFireballController.java index 12ef378a6..ca80547ff 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SmallFireballController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SmallFireballController.java @@ -34,12 +34,6 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySmallFireballNPC(EntityType types, Level level) { @@ -64,6 +58,12 @@ public class SmallFireballController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SnowballController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SnowballController.java index 284763278..4bc03b2d0 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SnowballController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SnowballController.java @@ -34,12 +34,6 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySnowballNPC(EntityType types, Level level) { @@ -64,6 +58,12 @@ public class SnowballController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SpectralArrowController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SpectralArrowController.java index 36b8cd7c2..eaed357ce 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SpectralArrowController.java @@ -35,12 +35,6 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityType types, Level level) { @@ -65,6 +59,12 @@ public class SpectralArrowController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TNTPrimedController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TNTPrimedController.java index 27c4c22d5..ab3b7f2fa 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TNTPrimedController.java @@ -35,12 +35,6 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityType types, Level level) { @@ -65,6 +59,12 @@ public class TNTPrimedController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownExpBottleController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownExpBottleController.java index 9b8778d7b..3ea2b5193 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownExpBottleController.java @@ -35,12 +35,6 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityType types, Level level) { @@ -65,6 +59,12 @@ public class ThrownExpBottleController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownPotionController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownPotionController.java index 43de39436..edb8b095b 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownPotionController.java @@ -35,12 +35,6 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends ThrownPotion implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityThrownPotionNPC(EntityType types, Level level) { @@ -69,6 +63,12 @@ public class ThrownPotionController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownTridentController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownTridentController.java index 273f2faf1..49cda50d4 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownTridentController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownTridentController.java @@ -35,12 +35,6 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityThrownTridentNPC(EntityType types, Level level) { @@ -65,6 +59,12 @@ public class ThrownTridentController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TippedArrowController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TippedArrowController.java index acd516fa2..4587652ed 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TippedArrowController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TippedArrowController.java @@ -34,12 +34,6 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityTippedArrowNPC(EntityType types, Level level) { @@ -64,6 +58,12 @@ public class TippedArrowController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/WitherSkullController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/WitherSkullController.java index 431a79588..00fa3bf20 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/WitherSkullController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/WitherSkullController.java @@ -34,12 +34,6 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { @@ -64,6 +58,12 @@ public class WitherSkullController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/util/NMSImpl.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/util/NMSImpl.java index 9f4e68840..b99bc8ddd 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/util/NMSImpl.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/util/NMSImpl.java @@ -1375,6 +1375,12 @@ public class NMSImpl implements NMSBridge { handle.getAttribute(Attributes.KNOCKBACK_RESISTANCE).setBaseValue(d); } + @Override + public void setLocationDirectly(org.bukkit.entity.Entity entity, Location location) { + getHandle(entity).moveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), + location.getPitch()); + } + @Override public void setLyingDown(org.bukkit.entity.Entity cat, boolean lying) { ((Cat) getHandle(cat)).setLying(lying); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BatController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BatController.java index 08c76bd1a..6a50b8880 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BatController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BatController.java @@ -46,12 +46,6 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityBatNPC(EntityType types, Level level) { @@ -132,6 +126,12 @@ public class BatController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BeeController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BeeController.java index 0a6c234fa..78ff93de2 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BeeController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BeeController.java @@ -46,12 +46,6 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityBeeNPC(EntityType types, Level level) { @@ -129,6 +123,12 @@ public class BeeController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BlazeController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BlazeController.java index ec275776e..92d792aee 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BlazeController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BlazeController.java @@ -46,12 +46,6 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityBlazeNPC(EntityType types, Level level) { @@ -124,6 +118,12 @@ public class BlazeController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CatController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CatController.java index 131e87555..c80532507 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CatController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CatController.java @@ -49,12 +49,6 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -145,6 +139,12 @@ public class CatController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CaveSpiderController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CaveSpiderController.java index 7655eb220..a62376a62 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CaveSpiderController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CaveSpiderController.java @@ -48,12 +48,6 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityType types, Level level) { @@ -142,6 +136,12 @@ public class CaveSpiderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ChickenController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ChickenController.java index 9ec182cd0..f6bd9ecf0 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ChickenController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ChickenController.java @@ -49,12 +49,6 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -153,6 +147,12 @@ public class ChickenController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CodController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CodController.java index 9f5ca5f19..af43c94f3 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CodController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CodController.java @@ -55,12 +55,6 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -178,6 +172,12 @@ public class CodController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CowController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CowController.java index 1a2ef2201..96888394c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CowController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CowController.java @@ -54,12 +54,6 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -150,6 +144,12 @@ public class CowController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CreeperController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CreeperController.java index 90eaccfec..c436bd642 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CreeperController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CreeperController.java @@ -49,12 +49,6 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private boolean allowPowered; private final CitizensNPC npc; @@ -145,6 +139,12 @@ public class CreeperController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DolphinController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DolphinController.java index bf18e39a9..e38b111a7 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DolphinController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DolphinController.java @@ -50,17 +50,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private boolean inProtectedTick; private final CitizensNPC npc; - private MoveControl oldMoveController; + private MoveControl oldMoveController; public EntityDolphinNPC(EntityType types, Level level) { this(types, level, null); } @@ -149,6 +143,12 @@ public class DolphinController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DrownedController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DrownedController.java index daeaa8c83..4aef93e2f 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DrownedController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DrownedController.java @@ -48,12 +48,6 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityDrownedNPC(EntityType types, Level level) { @@ -142,6 +136,12 @@ public class DrownedController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EnderDragonController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EnderDragonController.java index 4a874d8c6..2e8123fd0 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EnderDragonController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EnderDragonController.java @@ -47,12 +47,6 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEnderDragonNPC(EntityType types, Level level) { @@ -141,6 +135,12 @@ public class EnderDragonController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermanController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermanController.java index 7fa369ddf..9e2545be7 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermanController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermanController.java @@ -51,12 +51,6 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEndermanNPC(EntityType types, Level level) { @@ -145,6 +139,12 @@ public class EndermanController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermiteController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermiteController.java index f333f9510..312505aa4 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermiteController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermiteController.java @@ -48,12 +48,6 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEndermiteNPC(EntityType types, Level level) { @@ -142,6 +136,12 @@ public class EndermiteController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EvokerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EvokerController.java index 568491a36..27f5026c0 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EvokerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EvokerController.java @@ -42,12 +42,6 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEvokerNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class EvokerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/FoxController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/FoxController.java index b990a0f9a..09101768c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/FoxController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/FoxController.java @@ -43,12 +43,6 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -139,6 +133,12 @@ public class FoxController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GhastController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GhastController.java index 586af3990..1a5caaecf 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GhastController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GhastController.java @@ -40,12 +40,6 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGhastNPC(EntityType types, Level level) { @@ -124,6 +118,12 @@ public class GhastController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GiantController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GiantController.java index 844673147..50406860b 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GiantController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GiantController.java @@ -42,12 +42,6 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGiantNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class GiantController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GlowSquidController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GlowSquidController.java index 7e920b7f1..db9c56d32 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GlowSquidController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GlowSquidController.java @@ -42,12 +42,6 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGlowSquidNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class GlowSquidController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GoatController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GoatController.java index 73eedb441..9053be8e7 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GoatController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GoatController.java @@ -43,12 +43,6 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -139,6 +133,12 @@ public class GoatController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianController.java index 6aa39dbf8..e874a6caa 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianController.java @@ -42,12 +42,6 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGuardianNPC(EntityType types, Level level) { @@ -142,6 +136,12 @@ public class GuardianController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianElderController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianElderController.java index 76dabbe3f..f98bb4440 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianElderController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianElderController.java @@ -42,12 +42,6 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGuardianElderNPC(EntityType types, Level level) { @@ -142,6 +136,12 @@ public class GuardianElderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HoglinController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HoglinController.java index b209d80d6..d032565aa 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HoglinController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HoglinController.java @@ -42,12 +42,6 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityHoglinNPC(EntityType types, Level level) { @@ -139,6 +133,12 @@ public class HoglinController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseController.java index 0be7dbd14..5cc566fbd 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseController.java @@ -53,18 +53,12 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; private boolean calledNMSHeight = false; + private final CitizensNPC npc; private boolean riding; - public EntityHorseNPC(EntityType types, Level level) { this(types, level, null); } @@ -185,6 +179,12 @@ public class HorseController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseDonkeyController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseDonkeyController.java index aa1bd10bb..5f881cf2c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseDonkeyController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseDonkeyController.java @@ -53,12 +53,6 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; boolean calledNMSHeight = false; @@ -186,6 +180,12 @@ public class HorseDonkeyController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseMuleController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseMuleController.java index d67cf14f1..f73ed7a86 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseMuleController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseMuleController.java @@ -53,12 +53,6 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; boolean calledNMSHeight = false; @@ -186,6 +180,12 @@ public class HorseMuleController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseSkeletonController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseSkeletonController.java index fc5074cbd..b40bfa317 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseSkeletonController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseSkeletonController.java @@ -53,12 +53,6 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; boolean calledNMSHeight = false; @@ -186,6 +180,12 @@ public class HorseSkeletonController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseZombieController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseZombieController.java index d5b7a43c2..814d05b28 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseZombieController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseZombieController.java @@ -53,12 +53,6 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; boolean calledNMSHeight = false; @@ -186,6 +180,12 @@ public class HorseZombieController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IllusionerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IllusionerController.java index a66ae732a..089c198cb 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IllusionerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IllusionerController.java @@ -42,12 +42,6 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityIllusionerNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class IllusionerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IronGolemController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IronGolemController.java index 9e483a9cc..d7bb0ff67 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IronGolemController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IronGolemController.java @@ -42,12 +42,6 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityIronGolemNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class IronGolemController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/LlamaController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/LlamaController.java index 07e98de64..a889dde51 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/LlamaController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/LlamaController.java @@ -51,12 +51,6 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -156,6 +150,12 @@ public class LlamaController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MagmaCubeController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MagmaCubeController.java index c9b06a542..bc1e9a6bf 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MagmaCubeController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MagmaCubeController.java @@ -45,12 +45,6 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -137,6 +131,12 @@ public class MagmaCubeController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MushroomCowController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MushroomCowController.java index e7fe436b7..97dc6af74 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MushroomCowController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MushroomCowController.java @@ -46,12 +46,6 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -142,6 +136,12 @@ public class MushroomCowController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/OcelotController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/OcelotController.java index 62c6d8bb0..535f4254a 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/OcelotController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/OcelotController.java @@ -44,12 +44,6 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -145,6 +139,12 @@ public class OcelotController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PandaController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PandaController.java index 71979b87d..ef0220603 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PandaController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PandaController.java @@ -43,12 +43,6 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -139,6 +133,12 @@ public class PandaController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ParrotController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ParrotController.java index 9a5c0f6bd..0f9a393c9 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ParrotController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ParrotController.java @@ -43,12 +43,6 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityParrotNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class ParrotController extends MobEntityController { return false; // shouldLeash } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PhantomController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PhantomController.java index fcb056254..7451e8cd1 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PhantomController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PhantomController.java @@ -46,12 +46,6 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -164,6 +158,12 @@ public class PhantomController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isSunBurnTick() { if (npc == null || !npc.isProtected()) diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigController.java index 45ac9416a..b7408fa4f 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigController.java @@ -44,12 +44,6 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -146,6 +140,12 @@ public class PigController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigZombieController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigZombieController.java index 3dda4ff30..5d37a1d2c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigZombieController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigZombieController.java @@ -43,12 +43,6 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityPigZombieNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class PigZombieController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinBruteController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinBruteController.java index 028ba2056..2c2a8a70b 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinBruteController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinBruteController.java @@ -42,12 +42,6 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityType types, Level level) { @@ -139,6 +133,12 @@ public class PiglinBruteController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinController.java index 526b7d87d..29762670f 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinController.java @@ -42,12 +42,6 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityPiglinNPC(EntityType types, Level level) { @@ -139,6 +133,12 @@ public class PiglinController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PillagerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PillagerController.java index c292e913f..b5fb63c54 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PillagerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PillagerController.java @@ -43,12 +43,6 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -139,6 +133,12 @@ public class PillagerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PolarBearController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PolarBearController.java index bcb2245f4..cd91bf677 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PolarBearController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PolarBearController.java @@ -41,12 +41,6 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -122,6 +116,12 @@ public class PolarBearController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PufferFishController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PufferFishController.java index 130a447ba..2feac6340 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PufferFishController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PufferFishController.java @@ -52,12 +52,6 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -181,6 +175,12 @@ public class PufferFishController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RabbitController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RabbitController.java index 028390ac2..5db45378e 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RabbitController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RabbitController.java @@ -44,12 +44,6 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -148,6 +142,12 @@ public class RabbitController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RavagerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RavagerController.java index 8aea9dc8d..22b603218 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RavagerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RavagerController.java @@ -43,12 +43,6 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -144,6 +138,12 @@ public class RavagerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SalmonController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SalmonController.java index 29c175d87..ad0d9699b 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SalmonController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SalmonController.java @@ -49,12 +49,6 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -170,6 +164,12 @@ public class SalmonController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SheepController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SheepController.java index badf5e50e..ea81a33e6 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SheepController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SheepController.java @@ -43,12 +43,6 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -139,6 +133,12 @@ public class SheepController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ShulkerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ShulkerController.java index 84d642352..0d6938421 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ShulkerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ShulkerController.java @@ -43,12 +43,6 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityShulkerNPC(EntityType types, Level level) { @@ -140,6 +134,12 @@ public class ShulkerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SilverfishController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SilverfishController.java index 948df0249..4f520b190 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SilverfishController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SilverfishController.java @@ -43,12 +43,6 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySilverfishNPC(EntityType types, Level level) { @@ -143,6 +137,12 @@ public class SilverfishController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonController.java index 93640a7e5..e782b7537 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonController.java @@ -42,12 +42,6 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySkeletonNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class SkeletonController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonStrayController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonStrayController.java index db3c1af4a..8e42705c7 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonStrayController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonStrayController.java @@ -42,12 +42,6 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityStrayNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class SkeletonStrayController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonWitherController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonWitherController.java index f5b9e69a2..9bae03919 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonWitherController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonWitherController.java @@ -42,12 +42,6 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class SkeletonWitherController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SlimeController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SlimeController.java index 8ccc07407..74fff91ca 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SlimeController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SlimeController.java @@ -45,12 +45,6 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -137,6 +131,12 @@ public class SlimeController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SnowmanController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SnowmanController.java index 096282a75..d72d16576 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SnowmanController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SnowmanController.java @@ -42,12 +42,6 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySnowmanNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class SnowmanController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SpiderController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SpiderController.java index 77640a11d..7e193ef78 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SpiderController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SpiderController.java @@ -42,12 +42,6 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySpiderNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class SpiderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SquidController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SquidController.java index 23b1d8e20..0ab07a574 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SquidController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SquidController.java @@ -42,12 +42,6 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySquidNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class SquidController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/StriderController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/StriderController.java index 1a3162d11..12d68260c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/StriderController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/StriderController.java @@ -42,12 +42,6 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityStriderNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class StriderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TraderLlamaController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TraderLlamaController.java index 2221520c9..a31e2f791 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TraderLlamaController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TraderLlamaController.java @@ -51,12 +51,6 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -157,6 +151,12 @@ public class TraderLlamaController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TropicalFishController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TropicalFishController.java index 50a5fd493..dc7bd3993 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TropicalFishController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TropicalFishController.java @@ -49,12 +49,6 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private MoveControl oldMoveController; @@ -172,6 +166,12 @@ public class TropicalFishController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TurtleController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TurtleController.java index bb53ca0bd..245c084a0 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TurtleController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TurtleController.java @@ -46,12 +46,6 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; private JumpControl oldJumpController; @@ -158,6 +152,12 @@ public class TurtleController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VexController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VexController.java index eeec2b3e4..c183959b9 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VexController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VexController.java @@ -40,12 +40,6 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityVexNPC(EntityType types, Level level) { @@ -122,6 +116,12 @@ public class VexController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VillagerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VillagerController.java index ccc124379..7bfc72073 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VillagerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VillagerController.java @@ -49,12 +49,6 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private boolean blockingATrade; boolean calledNMSHeight = false; @@ -152,6 +146,12 @@ public class VillagerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isTrading() { if (blockingATrade) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VindicatorController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VindicatorController.java index 44d5adc7a..1830601aa 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VindicatorController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VindicatorController.java @@ -43,12 +43,6 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -139,6 +133,12 @@ public class VindicatorController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WanderingTraderController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WanderingTraderController.java index 66f11c22c..7c6135b77 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WanderingTraderController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WanderingTraderController.java @@ -48,18 +48,12 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private boolean blockingATrade; private boolean blockTrades = true; + boolean calledNMSHeight = false; private final CitizensNPC npc; - public EntityWanderingTraderNPC(EntityType types, Level level) { this(types, level, null); } @@ -153,6 +147,12 @@ public class WanderingTraderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isTrading() { if (blockingATrade) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitchController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitchController.java index 7a0ca4efa..7a7c05f3b 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitchController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitchController.java @@ -42,12 +42,6 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityWitchNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class WitchController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitherController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitherController.java index 255b41770..819d07687 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitherController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitherController.java @@ -40,12 +40,6 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityWitherNPC(EntityType types, Level level) { @@ -134,6 +128,12 @@ public class WitherController extends MobEntityController { : npc.data().get("wither-arrow-shield"); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WolfController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WolfController.java index a42e83c28..b438fc60a 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WolfController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WolfController.java @@ -45,12 +45,6 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; private final CitizensNPC npc; @@ -141,6 +135,12 @@ public class WolfController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZoglinController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZoglinController.java index 52bb97079..d1531c388 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZoglinController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZoglinController.java @@ -42,12 +42,6 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityZoglinNPC(EntityType types, Level level) { @@ -138,6 +132,12 @@ public class ZoglinController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieController.java index a1fccd301..d785a0368 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieController.java @@ -42,12 +42,6 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityZombieNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class ZombieController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieHuskController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieHuskController.java index 49cef7bb1..d23ad171c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieHuskController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieHuskController.java @@ -42,12 +42,6 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityZombieHuskNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class ZombieHuskController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieVillagerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieVillagerController.java index 8b0387af7..191aabc87 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieVillagerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieVillagerController.java @@ -42,12 +42,6 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityType types, Level level) { @@ -136,6 +130,12 @@ public class ZombieVillagerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/AreaEffectCloudController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/AreaEffectCloudController.java index ff971611b..bad233431 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/AreaEffectCloudController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/AreaEffectCloudController.java @@ -42,12 +42,6 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityType types, Level level) { @@ -72,6 +66,12 @@ public class AreaEffectCloudController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ArmorStandController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ArmorStandController.java index 5b60a26b7..9e89bb8c9 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ArmorStandController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ArmorStandController.java @@ -47,12 +47,6 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends ArmorStand implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityArmorStandNPC(EntityType types, Level level) { @@ -88,6 +82,12 @@ public class ArmorStandController extends MobEntityController { return event.isCancelled() ? InteractionResult.FAIL : InteractionResult.SUCCESS; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/BoatController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/BoatController.java index bfdb0ea99..219eea0a9 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/BoatController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/BoatController.java @@ -48,22 +48,16 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double aC; private float aD; private Status aE; + private Status aF; private double ap; private double ar; private final CitizensNPC npc; - public EntityBoatNPC(EntityType types, Level level) { this(types, level, null); } @@ -102,6 +96,12 @@ public class BoatController extends MobEntityController { return Status.IN_AIR; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/DragonFireballController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/DragonFireballController.java index bd2800481..037d54c90 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/DragonFireballController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/DragonFireballController.java @@ -42,12 +42,6 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityDragonFireballNPC(EntityType types, Level level) { @@ -72,6 +66,12 @@ public class DragonFireballController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EggController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EggController.java index a5248a6ca..9dc2c4544 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EggController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EggController.java @@ -51,12 +51,6 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEggNPC(EntityType types, Level level) { @@ -86,6 +80,12 @@ public class EggController extends AbstractEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderCrystalController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderCrystalController.java index 2f0e7f923..1bc9597f9 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderCrystalController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderCrystalController.java @@ -42,12 +42,6 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityType types, Level level) { @@ -72,6 +66,12 @@ public class EnderCrystalController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderPearlController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderPearlController.java index 86cc26f20..704205fdf 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderPearlController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderPearlController.java @@ -43,12 +43,6 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEnderPearlNPC(EntityType types, Level level) { @@ -73,6 +67,12 @@ public class EnderPearlController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderSignalController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderSignalController.java index c23d131b4..466819177 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderSignalController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderSignalController.java @@ -43,12 +43,6 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEnderSignalNPC(EntityType types, Level level) { @@ -73,6 +67,12 @@ public class EnderSignalController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EvokerFangsController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EvokerFangsController.java index fdca8f69a..4bd2cf166 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EvokerFangsController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EvokerFangsController.java @@ -41,12 +41,6 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityType types, Level level) { @@ -82,6 +76,12 @@ public class EvokerFangsController extends MobEntityController { return event.isCancelled() ? InteractionResult.FAIL : InteractionResult.SUCCESS; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ExperienceOrbController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ExperienceOrbController.java index 8e401cc05..e105470ab 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ExperienceOrbController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ExperienceOrbController.java @@ -36,12 +36,6 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class ExperienceOrbController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FallingBlockController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FallingBlockController.java index ca6cf2d04..8f94564bb 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FallingBlockController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FallingBlockController.java @@ -54,12 +54,6 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends FallingBlockEntity implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityFallingBlockNPC(EntityType types, Level level) { @@ -84,6 +78,12 @@ public class FallingBlockController extends AbstractEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FireworkController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FireworkController.java index 54dd5b0c0..7fb9e7030 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FireworkController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FireworkController.java @@ -37,12 +37,6 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityFireworkNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class FireworkController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FishingHookController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FishingHookController.java index 00752ab00..42a672a7e 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FishingHookController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FishingHookController.java @@ -45,12 +45,6 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityFishingHookNPC(EntityType types, Level level) { @@ -85,6 +79,12 @@ public class FishingHookController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/GlowItemFrameController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/GlowItemFrameController.java index c26c1886b..bba834142 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/GlowItemFrameController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/GlowItemFrameController.java @@ -47,12 +47,6 @@ public class GlowItemFrameController extends MobEntityController { } public static class EntityGlowItemFrameNPC extends GlowItemFrame implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGlowItemFrameNPC(EntityType types, Level level) { @@ -77,6 +71,12 @@ public class GlowItemFrameController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemController.java index dddd17716..4c7e38d98 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemController.java @@ -48,12 +48,6 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends ItemEntity implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityItemNPC(EntityType types, Level level) { @@ -79,6 +73,12 @@ public class ItemController extends AbstractEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemFrameController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemFrameController.java index 107c0f29b..f898412f1 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemFrameController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemFrameController.java @@ -46,12 +46,6 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends ItemFrame implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityItemFrameNPC(EntityType types, Level level) { @@ -76,6 +70,12 @@ public class ItemFrameController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LargeFireballController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LargeFireballController.java index 9417214b4..a9d35c4ee 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LargeFireballController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LargeFireballController.java @@ -36,12 +36,6 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityLargeFireballNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class LargeFireballController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LeashController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LeashController.java index 817d84a05..20a0f7017 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LeashController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LeashController.java @@ -37,12 +37,6 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityLeashNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class LeashController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LlamaSpitController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LlamaSpitController.java index c33def7c7..efa2e5d3a 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LlamaSpitController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LlamaSpitController.java @@ -48,12 +48,6 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityType types, Level level) { @@ -83,6 +77,12 @@ public class LlamaSpitController extends AbstractEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MarkerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MarkerController.java index db749ae4b..54295649a 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MarkerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MarkerController.java @@ -36,12 +36,6 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMarkerNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class MarkerController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartChestController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartChestController.java index 5990321e0..165bf32ad 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartChestController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartChestController.java @@ -37,12 +37,6 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartChestNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class MinecartChestController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartCommandController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartCommandController.java index c1a799e49..0402b9c5d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartCommandController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartCommandController.java @@ -37,12 +37,6 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class MinecartCommandController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartFurnaceController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartFurnaceController.java index 87b9b9d98..14a7bf746 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartFurnaceController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartFurnaceController.java @@ -37,12 +37,6 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class MinecartFurnaceController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartHopperController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartHopperController.java index 43d9c7000..edc49f814 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartHopperController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartHopperController.java @@ -32,12 +32,6 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityType types, Level level) { @@ -54,6 +48,12 @@ public class MinecartHopperController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartRideableController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartRideableController.java index f45e51aec..066d21a4a 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartRideableController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartRideableController.java @@ -36,12 +36,6 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class MinecartRideableController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartSpawnerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartSpawnerController.java index 22176d100..525561b9d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartSpawnerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartSpawnerController.java @@ -32,12 +32,6 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityType types, Level level) { @@ -54,6 +48,12 @@ public class MinecartSpawnerController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartTNTController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartTNTController.java index 938ff5b64..c6db4a177 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartTNTController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartTNTController.java @@ -32,12 +32,6 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityType types, Level level) { @@ -54,6 +48,12 @@ public class MinecartTNTController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/PaintingController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/PaintingController.java index 01bbe17a0..ba835e596 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/PaintingController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/PaintingController.java @@ -36,12 +36,6 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityPaintingNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class PaintingController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ShulkerBulletController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ShulkerBulletController.java index 2c623caa1..8528f4855 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ShulkerBulletController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ShulkerBulletController.java @@ -36,12 +36,6 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class ShulkerBulletController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SmallFireballController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SmallFireballController.java index a95d2498a..18864587d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SmallFireballController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SmallFireballController.java @@ -36,12 +36,6 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySmallFireballNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class SmallFireballController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SnowballController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SnowballController.java index 3f62171bb..dd1229a85 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SnowballController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SnowballController.java @@ -36,12 +36,6 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySnowballNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class SnowballController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SpectralArrowController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SpectralArrowController.java index 72cd3189c..733c2e9b9 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SpectralArrowController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SpectralArrowController.java @@ -37,12 +37,6 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class SpectralArrowController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TNTPrimedController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TNTPrimedController.java index 1cfd24b58..3c430bad9 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TNTPrimedController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TNTPrimedController.java @@ -37,12 +37,6 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class TNTPrimedController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownExpBottleController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownExpBottleController.java index 819b1cb4a..19c8ca213 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownExpBottleController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownExpBottleController.java @@ -37,12 +37,6 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class ThrownExpBottleController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownPotionController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownPotionController.java index 659d74d33..a018cbb80 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownPotionController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownPotionController.java @@ -37,12 +37,6 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends ThrownPotion implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityThrownPotionNPC(EntityType types, Level level) { @@ -71,6 +65,12 @@ public class ThrownPotionController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownTridentController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownTridentController.java index 1df49c3b8..f8de0cac8 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownTridentController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownTridentController.java @@ -37,12 +37,6 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityThrownTridentNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class ThrownTridentController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TippedArrowController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TippedArrowController.java index 798c221c9..51b968de1 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TippedArrowController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TippedArrowController.java @@ -36,12 +36,6 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityTippedArrowNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class TippedArrowController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/WitherSkullController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/WitherSkullController.java index c4221b604..f6766e4c2 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/WitherSkullController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/WitherSkullController.java @@ -36,12 +36,6 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class WitherSkullController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/NMSImpl.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/NMSImpl.java index a26500842..9645fc2b7 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/NMSImpl.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/NMSImpl.java @@ -1383,6 +1383,12 @@ public class NMSImpl implements NMSBridge { handle.getAttribute(Attributes.KNOCKBACK_RESISTANCE).setBaseValue(d); } + @Override + public void setLocationDirectly(org.bukkit.entity.Entity entity, Location location) { + getHandle(entity).moveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), + location.getPitch()); + } + @Override public void setLyingDown(org.bukkit.entity.Entity cat, boolean lying) { ((Cat) getHandle(cat)).setLying(lying); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/AllayController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/AllayController.java index e2882441e..3c00dc6bd 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/AllayController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/AllayController.java @@ -58,15 +58,9 @@ public class AllayController extends MobEntityController { } public static class EntityAllayNPC extends Allay implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; - private int taskId = -1; + private int taskId = -1; public EntityAllayNPC(EntityType types, Level level) { this(types, level, null); } @@ -153,6 +147,12 @@ public class AllayController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/BatController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/BatController.java index ac7fb6bba..09b8c1ee6 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/BatController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/BatController.java @@ -46,12 +46,6 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityBatNPC(EntityType types, Level level) { @@ -132,6 +126,12 @@ public class BatController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/BeeController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/BeeController.java index ab2173853..c59a7809a 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/BeeController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/BeeController.java @@ -46,12 +46,6 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityBeeNPC(EntityType types, Level level) { @@ -129,6 +123,12 @@ public class BeeController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/BlazeController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/BlazeController.java index eb891d47b..0931c37ae 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/BlazeController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/BlazeController.java @@ -46,12 +46,6 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityBlazeNPC(EntityType types, Level level) { @@ -124,6 +118,12 @@ public class BlazeController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CamelController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CamelController.java index 9abfde69e..2359f9e6c 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CamelController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CamelController.java @@ -58,15 +58,9 @@ public class CamelController extends MobEntityController { } public static class EntityCamelNPC extends Camel implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityCamelNPC(EntityType types, Level level) { this(types, level, null); } @@ -162,6 +156,12 @@ public class CamelController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CatController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CatController.java index 079de2c9e..24cc43f7b 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CatController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CatController.java @@ -50,15 +50,9 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityCatNPC(EntityType types, Level level) { this(types, level, null); } @@ -145,6 +139,12 @@ public class CatController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CaveSpiderController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CaveSpiderController.java index 892ddc0de..4721ce9d6 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CaveSpiderController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CaveSpiderController.java @@ -49,12 +49,6 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityType types, Level level) { @@ -143,6 +137,12 @@ public class CaveSpiderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ChickenController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ChickenController.java index 774b15c04..b3d10422d 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ChickenController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ChickenController.java @@ -50,15 +50,9 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityChickenNPC(EntityType types, Level level) { this(types, level, null); } @@ -153,6 +147,12 @@ public class ChickenController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CodController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CodController.java index 7bcc41e02..ea55bfe9f 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CodController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CodController.java @@ -56,15 +56,9 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; - private MoveControl oldMoveController; + private MoveControl oldMoveController; public EntityCodNPC(EntityType types, Level level) { this(types, level, null); } @@ -178,6 +172,12 @@ public class CodController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CowController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CowController.java index accc4b80a..5eb78f706 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CowController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CowController.java @@ -55,15 +55,9 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityCowNPC(EntityType types, Level level) { this(types, level, null); } @@ -150,6 +144,12 @@ public class CowController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CreeperController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CreeperController.java index 7411e081b..25b846121 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CreeperController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/CreeperController.java @@ -50,15 +50,9 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private boolean allowPowered; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityCreeperNPC(EntityType types, Level level) { this(types, level, null); } @@ -145,6 +139,12 @@ public class CreeperController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/DolphinController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/DolphinController.java index 0b93d4ece..98865de75 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/DolphinController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/DolphinController.java @@ -51,16 +51,10 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private boolean inProtectedTick; + private final CitizensNPC npc; private MoveControl oldMoveController; - public EntityDolphinNPC(EntityType types, Level level) { this(types, level, null); } @@ -149,6 +143,12 @@ public class DolphinController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/DrownedController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/DrownedController.java index 55a233dea..b7d72f6e5 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/DrownedController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/DrownedController.java @@ -49,12 +49,6 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityDrownedNPC(EntityType types, Level level) { @@ -143,6 +137,12 @@ public class DrownedController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EnderDragonController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EnderDragonController.java index b9b944476..c585d7ff7 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EnderDragonController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EnderDragonController.java @@ -47,12 +47,6 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEnderDragonNPC(EntityType types, Level level) { @@ -141,6 +135,12 @@ public class EnderDragonController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EndermanController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EndermanController.java index c205c8933..faf7e8144 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EndermanController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EndermanController.java @@ -52,12 +52,6 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEndermanNPC(EntityType types, Level level) { @@ -146,6 +140,12 @@ public class EndermanController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EndermiteController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EndermiteController.java index 9793d224b..b09ac2d64 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EndermiteController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EndermiteController.java @@ -49,12 +49,6 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEndermiteNPC(EntityType types, Level level) { @@ -143,6 +137,12 @@ public class EndermiteController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EvokerController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EvokerController.java index 13d164824..46122c547 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EvokerController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/EvokerController.java @@ -43,12 +43,6 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEvokerNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class EvokerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/FoxController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/FoxController.java index f4e0a5413..e6a6b9bf2 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/FoxController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/FoxController.java @@ -44,15 +44,9 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityFoxNPC(EntityType types, Level level) { this(types, level, null); } @@ -139,6 +133,12 @@ public class FoxController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/FrogController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/FrogController.java index e203f6ee4..7cd4a2733 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/FrogController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/FrogController.java @@ -44,15 +44,9 @@ public class FrogController extends MobEntityController { } public static class EntityFrogNPC extends Frog implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityFrogNPC(EntityType types, Level level) { this(types, level, null); } @@ -142,6 +136,12 @@ public class FrogController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GhastController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GhastController.java index 3ab0f40fb..22396634e 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GhastController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GhastController.java @@ -40,12 +40,6 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGhastNPC(EntityType types, Level level) { @@ -124,6 +118,12 @@ public class GhastController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GiantController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GiantController.java index fda7e1721..4355beb7f 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GiantController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GiantController.java @@ -43,12 +43,6 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGiantNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class GiantController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GlowSquidController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GlowSquidController.java index 278c2735e..975bce05e 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GlowSquidController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GlowSquidController.java @@ -43,12 +43,6 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGlowSquidNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class GlowSquidController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GoatController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GoatController.java index fff7a3b6c..57cac7a18 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GoatController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GoatController.java @@ -44,15 +44,9 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityGoatNPC(EntityType types, Level level) { this(types, level, null); } @@ -139,6 +133,12 @@ public class GoatController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GuardianController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GuardianController.java index 5be6883c5..07ed199a2 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GuardianController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GuardianController.java @@ -43,12 +43,6 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGuardianNPC(EntityType types, Level level) { @@ -143,6 +137,12 @@ public class GuardianController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GuardianElderController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GuardianElderController.java index 701e0a502..f212f66de 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GuardianElderController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/GuardianElderController.java @@ -43,12 +43,6 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGuardianElderNPC(EntityType types, Level level) { @@ -143,6 +137,12 @@ public class GuardianElderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HoglinController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HoglinController.java index 50a89aeaf..035fef7b9 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HoglinController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HoglinController.java @@ -43,12 +43,6 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityHoglinNPC(EntityType types, Level level) { @@ -143,6 +137,12 @@ public class HoglinController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseController.java index 55a77a29f..2b0e6c9b0 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseController.java @@ -54,17 +54,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; + private boolean calledNMSHeight = false; private final CitizensNPC npc; private boolean riding; - public EntityHorseNPC(EntityType types, Level level) { this(types, level, null); } @@ -180,6 +174,12 @@ public class HorseController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isVehicle() { return npc != null && npc.getNavigator().isNavigating() ? false : super.isVehicle(); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseDonkeyController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseDonkeyController.java index 877fd9b18..656634ada 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseDonkeyController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseDonkeyController.java @@ -54,18 +54,12 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; + boolean calledNMSHeight = false; - private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseDonkeyNPC(EntityType types, Level level) { this(types, level, null); } @@ -180,6 +174,12 @@ public class HorseDonkeyController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isVehicle() { return npc != null && npc.getNavigator().isNavigating() ? false : super.isVehicle(); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseMuleController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseMuleController.java index b9993d422..c7526e8ef 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseMuleController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseMuleController.java @@ -54,18 +54,12 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; + boolean calledNMSHeight = false; - private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseMuleNPC(EntityType types, Level level) { this(types, level, null); } @@ -180,6 +174,12 @@ public class HorseMuleController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isVehicle() { return npc != null && npc.getNavigator().isNavigating() ? false : super.isVehicle(); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseSkeletonController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseSkeletonController.java index 1c961d90b..a70562ede 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseSkeletonController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseSkeletonController.java @@ -54,18 +54,12 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; + boolean calledNMSHeight = false; - private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseSkeletonNPC(EntityType types, Level level) { this(types, level, null); } @@ -180,6 +174,12 @@ public class HorseSkeletonController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isVehicle() { return npc != null && npc.getNavigator().isNavigating() ? false : super.isVehicle(); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseZombieController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseZombieController.java index 66d2526ce..b4749682c 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseZombieController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/HorseZombieController.java @@ -54,18 +54,12 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double baseMovementSpeed; + boolean calledNMSHeight = false; - private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseZombieNPC(EntityType types, Level level) { this(types, level, null); } @@ -180,6 +174,12 @@ public class HorseZombieController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isVehicle() { return npc != null && npc.getNavigator().isNavigating() ? false : super.isVehicle(); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/IllusionerController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/IllusionerController.java index 6973391e6..0821eb428 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/IllusionerController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/IllusionerController.java @@ -43,12 +43,6 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityIllusionerNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class IllusionerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/IronGolemController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/IronGolemController.java index d13fd8077..b6719d851 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/IronGolemController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/IronGolemController.java @@ -43,12 +43,6 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityIronGolemNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class IronGolemController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/LlamaController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/LlamaController.java index f49cd1d30..4fbbcdc53 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/LlamaController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/LlamaController.java @@ -52,15 +52,9 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityLlamaNPC(EntityType types, Level level) { this(types, level, null); } @@ -156,6 +150,12 @@ public class LlamaController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/MagmaCubeController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/MagmaCubeController.java index 3b898527d..432b47d39 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/MagmaCubeController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/MagmaCubeController.java @@ -46,15 +46,9 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; - private MoveControl oldMoveController; + private MoveControl oldMoveController; public EntityMagmaCubeNPC(EntityType types, Level level) { this(types, level, null); } @@ -137,6 +131,12 @@ public class MagmaCubeController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/MushroomCowController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/MushroomCowController.java index f2077cf25..ecfd40005 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/MushroomCowController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/MushroomCowController.java @@ -47,15 +47,9 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityType types, Level level) { this(types, level, null); } @@ -142,6 +136,12 @@ public class MushroomCowController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/OcelotController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/OcelotController.java index 3ce42f49c..898025e62 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/OcelotController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/OcelotController.java @@ -45,15 +45,9 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityOcelotNPC(EntityType types, Level level) { this(types, level, null); } @@ -145,6 +139,12 @@ public class OcelotController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PandaController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PandaController.java index 37396221e..f570a13e7 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PandaController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PandaController.java @@ -44,15 +44,9 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityPandaNPC(EntityType types, Level level) { this(types, level, null); } @@ -139,6 +133,12 @@ public class PandaController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ParrotController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ParrotController.java index 6701ae191..d377b969c 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ParrotController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ParrotController.java @@ -43,12 +43,6 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityParrotNPC(EntityType types, Level level) { @@ -128,6 +122,12 @@ public class ParrotController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PhantomController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PhantomController.java index b6a77461a..e88d9d0f3 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PhantomController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PhantomController.java @@ -47,17 +47,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; + private final CitizensNPC npc; private LookControl oldLookController; private MoveControl oldMoveController; - public EntityPhantomNPC(EntityType types, Level level) { this(types, level, null); } @@ -162,6 +156,12 @@ public class PhantomController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isSunBurnTick() { if (npc == null || !npc.isProtected()) diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PigController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PigController.java index d151bf5b8..b666ef1ad 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PigController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PigController.java @@ -45,15 +45,9 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityPigNPC(EntityType types, Level level) { this(types, level, null); } @@ -140,6 +134,12 @@ public class PigController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isVehicle() { // block carrot-on-a-stick behaviour diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PigZombieController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PigZombieController.java index 0c9652e4b..d78d9b79d 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PigZombieController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PigZombieController.java @@ -44,12 +44,6 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityPigZombieNPC(EntityType types, Level level) { @@ -138,6 +132,12 @@ public class PigZombieController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PiglinBruteController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PiglinBruteController.java index 51cf5ad2d..9d9c91281 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PiglinBruteController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PiglinBruteController.java @@ -43,12 +43,6 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityType types, Level level) { @@ -140,6 +134,12 @@ public class PiglinBruteController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PiglinController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PiglinController.java index e1d71e9dc..305334319 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PiglinController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PiglinController.java @@ -43,12 +43,6 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityPiglinNPC(EntityType types, Level level) { @@ -140,6 +134,12 @@ public class PiglinController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PillagerController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PillagerController.java index 20540baa7..62eaea663 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PillagerController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PillagerController.java @@ -44,15 +44,9 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityPillagerNPC(EntityType types, Level level) { this(types, level, null); } @@ -139,6 +133,12 @@ public class PillagerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PolarBearController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PolarBearController.java index a9bd2f9e8..1b2e0dd1a 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PolarBearController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PolarBearController.java @@ -41,15 +41,9 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityPolarBearNPC(EntityType types, Level level) { this(types, level, null); } @@ -121,6 +115,12 @@ public class PolarBearController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PufferFishController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PufferFishController.java index 6d75ac60b..e903ea1f0 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PufferFishController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/PufferFishController.java @@ -53,15 +53,9 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; - private MoveControl oldMoveController; + private MoveControl oldMoveController; public EntityPufferFishNPC(EntityType types, Level level) { this(types, level, null); } @@ -181,6 +175,12 @@ public class PufferFishController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/RabbitController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/RabbitController.java index 2b6cc7b61..0da36f403 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/RabbitController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/RabbitController.java @@ -45,15 +45,9 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityRabbitNPC(EntityType types, Level level) { this(types, level, null); } @@ -148,6 +142,12 @@ public class RabbitController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/RavagerController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/RavagerController.java index c44abcd6d..6a728f8cf 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/RavagerController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/RavagerController.java @@ -44,15 +44,9 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityRavagerNPC(EntityType types, Level level) { this(types, level, null); } @@ -139,6 +133,12 @@ public class RavagerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isVehicle() { return (npc == null || npc.useMinecraftAI()) ? super.isVehicle() : false; diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SalmonController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SalmonController.java index b0adb3bc3..6701ddbb3 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SalmonController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SalmonController.java @@ -50,15 +50,9 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; - private MoveControl oldMoveController; + private MoveControl oldMoveController; public EntitySalmonNPC(EntityType types, Level level) { this(types, level, null); } @@ -170,6 +164,12 @@ public class SalmonController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SheepController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SheepController.java index cc95bea11..7cfb7d8b9 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SheepController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SheepController.java @@ -44,15 +44,9 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntitySheepNPC(EntityType types, Level level) { this(types, level, null); } @@ -139,6 +133,12 @@ public class SheepController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ShulkerController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ShulkerController.java index 3fc2493a0..5c955ba38 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ShulkerController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ShulkerController.java @@ -44,12 +44,6 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityShulkerNPC(EntityType types, Level level) { @@ -141,6 +135,12 @@ public class ShulkerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SilverfishController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SilverfishController.java index 7864c1774..56fcc6bd6 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SilverfishController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SilverfishController.java @@ -44,12 +44,6 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySilverfishNPC(EntityType types, Level level) { @@ -144,6 +138,12 @@ public class SilverfishController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SkeletonController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SkeletonController.java index 2afd51796..9d9bac5ca 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SkeletonController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SkeletonController.java @@ -43,12 +43,6 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySkeletonNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class SkeletonController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SkeletonStrayController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SkeletonStrayController.java index eee37be93..aa9bc1d3a 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SkeletonStrayController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SkeletonStrayController.java @@ -43,12 +43,6 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityStrayNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class SkeletonStrayController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SkeletonWitherController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SkeletonWitherController.java index 976b85ce9..2898e88cc 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SkeletonWitherController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SkeletonWitherController.java @@ -43,12 +43,6 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class SkeletonWitherController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SlimeController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SlimeController.java index 9b69f7792..cedac2126 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SlimeController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SlimeController.java @@ -46,15 +46,9 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; - private MoveControl oldMoveController; + private MoveControl oldMoveController; public EntitySlimeNPC(EntityType types, Level level) { this(types, level, null); } @@ -137,6 +131,12 @@ public class SlimeController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SnowmanController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SnowmanController.java index 9b2d3111a..3016984ec 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SnowmanController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SnowmanController.java @@ -43,12 +43,6 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySnowmanNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class SnowmanController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SpiderController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SpiderController.java index 5cd54f8ca..38cc5c615 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SpiderController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SpiderController.java @@ -43,12 +43,6 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySpiderNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class SpiderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SquidController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SquidController.java index 1d20479e0..76aafc422 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SquidController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/SquidController.java @@ -43,12 +43,6 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySquidNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class SquidController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/StriderController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/StriderController.java index c0ea98715..44f2024f4 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/StriderController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/StriderController.java @@ -43,12 +43,6 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityStriderNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class StriderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TadpoleController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TadpoleController.java index 0b0d5d3f4..a2503b6d8 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TadpoleController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TadpoleController.java @@ -51,15 +51,9 @@ public class TadpoleController extends MobEntityController { } public static class EntityTadpoleNPC extends Tadpole implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; - private MoveControl oldMoveController; + private MoveControl oldMoveController; public EntityTadpoleNPC(EntityType types, Level level) { this(types, level, null); } @@ -170,6 +164,12 @@ public class TadpoleController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TraderLlamaController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TraderLlamaController.java index 6dac5d35d..0df73b5cf 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TraderLlamaController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TraderLlamaController.java @@ -52,15 +52,9 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityType types, Level level) { this(types, level, null); } @@ -157,6 +151,12 @@ public class TraderLlamaController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TropicalFishController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TropicalFishController.java index 4be9e9cf2..b325a4b94 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TropicalFishController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TropicalFishController.java @@ -50,15 +50,9 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; - private MoveControl oldMoveController; + private MoveControl oldMoveController; public EntityTropicalFishNPC(EntityType types, Level level) { this(types, level, null); } @@ -172,6 +166,12 @@ public class TropicalFishController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TurtleController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TurtleController.java index e4c67abc8..42fa7df1a 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TurtleController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/TurtleController.java @@ -47,15 +47,9 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; - private JumpControl oldJumpController; + private JumpControl oldJumpController; private MoveControl oldMoveController; public EntityTurtleNPC(EntityType types, Level level) { @@ -158,6 +152,12 @@ public class TurtleController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/VexController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/VexController.java index 63c0c081b..f90b74060 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/VexController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/VexController.java @@ -40,12 +40,6 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityVexNPC(EntityType types, Level level) { @@ -122,6 +116,12 @@ public class VexController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/VillagerController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/VillagerController.java index a1354168d..618c0ccea 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/VillagerController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/VillagerController.java @@ -50,15 +50,9 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private boolean blockingATrade; - boolean calledNMSHeight = false; + boolean calledNMSHeight = false; private final CitizensNPC npc; public EntityVillagerNPC(EntityType types, Level level) { @@ -152,6 +146,12 @@ public class VillagerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isTrading() { if (blockingATrade) { diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/VindicatorController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/VindicatorController.java index c0201679a..40258dfcc 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/VindicatorController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/VindicatorController.java @@ -44,15 +44,9 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityVindicatorNPC(EntityType types, Level level) { this(types, level, null); } @@ -139,6 +133,12 @@ public class VindicatorController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WanderingTraderController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WanderingTraderController.java index 5f4752861..232e5dab7 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WanderingTraderController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WanderingTraderController.java @@ -49,17 +49,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private boolean blockingATrade; + private boolean blockTrades = true; boolean calledNMSHeight = false; private final CitizensNPC npc; - public EntityWanderingTraderNPC(EntityType types, Level level) { this(types, level, null); } @@ -153,6 +147,12 @@ public class WanderingTraderController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public boolean isTrading() { if (blockingATrade) { diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WardenController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WardenController.java index b666f305e..d5545e41a 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WardenController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WardenController.java @@ -45,12 +45,6 @@ public class WardenController extends MobEntityController { } public static class EntityWardenNPC extends Warden implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityWardenNPC(EntityType types, Level level) { @@ -147,6 +141,12 @@ public class WardenController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WitchController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WitchController.java index 01fc29de3..c5ef8cee9 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WitchController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WitchController.java @@ -43,12 +43,6 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityWitchNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class WitchController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WitherController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WitherController.java index b8ba7b611..27dd5df1a 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WitherController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WitherController.java @@ -40,12 +40,6 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityWitherNPC(EntityType types, Level level) { @@ -134,6 +128,12 @@ public class WitherController extends MobEntityController { : npc.data().get("wither-arrow-shield"); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WolfController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WolfController.java index 50397a6b0..ece472262 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WolfController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/WolfController.java @@ -46,15 +46,9 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - boolean calledNMSHeight = false; - private final CitizensNPC npc; + private final CitizensNPC npc; public EntityWolfNPC(EntityType types, Level level) { this(types, level, null); } @@ -141,6 +135,12 @@ public class WolfController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZoglinController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZoglinController.java index f96d4bcc6..e70626290 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZoglinController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZoglinController.java @@ -43,12 +43,6 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityZoglinNPC(EntityType types, Level level) { @@ -139,6 +133,12 @@ public class ZoglinController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZombieController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZombieController.java index 61131f73b..9b8b23741 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZombieController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZombieController.java @@ -43,12 +43,6 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityZombieNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class ZombieController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZombieHuskController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZombieHuskController.java index 967e12799..6d49a470f 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZombieHuskController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZombieHuskController.java @@ -43,12 +43,6 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityZombieHuskNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class ZombieHuskController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZombieVillagerController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZombieVillagerController.java index 0d25502ee..f9daa0f74 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZombieVillagerController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/ZombieVillagerController.java @@ -43,12 +43,6 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityType types, Level level) { @@ -137,6 +131,12 @@ public class ZombieVillagerController extends MobEntityController { return NMSImpl.isLeashed(npc, super::isLeashed, this); } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override public void knockback(double strength, double dx, double dz) { NMS.callKnockbackEvent(npc, (float) strength, dx, dz, (evt) -> super.knockback((float) evt.getStrength(), diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/AreaEffectCloudController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/AreaEffectCloudController.java index 33e60e127..0427f6ebb 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/AreaEffectCloudController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/AreaEffectCloudController.java @@ -42,12 +42,6 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityType types, Level level) { @@ -72,6 +66,12 @@ public class AreaEffectCloudController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ArmorStandController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ArmorStandController.java index 62ddd13ba..c45bc4925 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ArmorStandController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ArmorStandController.java @@ -47,12 +47,6 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends ArmorStand implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityArmorStandNPC(EntityType types, Level level) { @@ -88,6 +82,12 @@ public class ArmorStandController extends MobEntityController { return event.isCancelled() ? InteractionResult.FAIL : InteractionResult.SUCCESS; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/BoatController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/BoatController.java index 291f6c775..da1dd0654 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/BoatController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/BoatController.java @@ -49,20 +49,14 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double aC; + private float aD; private Status aE; private Status aF; private double ap; private double ar; private final CitizensNPC npc; - public EntityBoatNPC(EntityType types, Level level) { this(types, level, null); } @@ -101,6 +95,12 @@ public class BoatController extends MobEntityController { return Status.IN_AIR; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ChestBoatController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ChestBoatController.java index fa4bb1d74..13409a12f 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ChestBoatController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ChestBoatController.java @@ -50,20 +50,14 @@ public class ChestBoatController extends MobEntityController { } public static class EntityChestBoatNPC extends ChestBoat implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private double aC; + private float aD; private Status aE; private Status aF; private double ap; private double ar; private final CitizensNPC npc; - public EntityChestBoatNPC(EntityType types, Level level) { this(types, level, null); } @@ -102,6 +96,12 @@ public class ChestBoatController extends MobEntityController { return Status.IN_AIR; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/DragonFireballController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/DragonFireballController.java index e37a3ab06..840548dd4 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/DragonFireballController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/DragonFireballController.java @@ -42,12 +42,6 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityDragonFireballNPC(EntityType types, Level level) { @@ -72,6 +66,12 @@ public class DragonFireballController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EggController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EggController.java index cb15aef7f..960bcf7bb 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EggController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EggController.java @@ -51,12 +51,6 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEggNPC(EntityType types, Level level) { @@ -86,6 +80,12 @@ public class EggController extends AbstractEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EnderCrystalController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EnderCrystalController.java index 0ac8226d2..8c8424e03 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EnderCrystalController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EnderCrystalController.java @@ -42,12 +42,6 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityType types, Level level) { @@ -72,6 +66,12 @@ public class EnderCrystalController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EnderPearlController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EnderPearlController.java index c52a66498..d629ab16e 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EnderPearlController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EnderPearlController.java @@ -43,12 +43,6 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEnderPearlNPC(EntityType types, Level level) { @@ -73,6 +67,12 @@ public class EnderPearlController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EnderSignalController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EnderSignalController.java index bbe9db81d..d4ec3971f 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EnderSignalController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EnderSignalController.java @@ -43,12 +43,6 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEnderSignalNPC(EntityType types, Level level) { @@ -73,6 +67,12 @@ public class EnderSignalController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EvokerFangsController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EvokerFangsController.java index a4ffe0574..8d6e548a6 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EvokerFangsController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/EvokerFangsController.java @@ -41,12 +41,6 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityType types, Level level) { @@ -82,6 +76,12 @@ public class EvokerFangsController extends MobEntityController { return event.isCancelled() ? InteractionResult.FAIL : InteractionResult.SUCCESS; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ExperienceOrbController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ExperienceOrbController.java index bd343bb2a..c7c6d71f1 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ExperienceOrbController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ExperienceOrbController.java @@ -36,12 +36,6 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class ExperienceOrbController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/FallingBlockController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/FallingBlockController.java index bd420a2a9..f741a2f6e 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/FallingBlockController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/FallingBlockController.java @@ -53,12 +53,6 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends FallingBlockEntity implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityFallingBlockNPC(EntityType types, Level level) { @@ -83,6 +77,12 @@ public class FallingBlockController extends AbstractEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/FireworkController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/FireworkController.java index 43328747a..55b6213b5 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/FireworkController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/FireworkController.java @@ -37,12 +37,6 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityFireworkNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class FireworkController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/GlowItemFrameController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/GlowItemFrameController.java index e31473f50..27b39b12b 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/GlowItemFrameController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/GlowItemFrameController.java @@ -48,12 +48,6 @@ public class GlowItemFrameController extends MobEntityController { } public static class EntityGlowItemFrameNPC extends GlowItemFrame implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityGlowItemFrameNPC(EntityType types, Level level) { @@ -78,6 +72,12 @@ public class GlowItemFrameController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ItemController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ItemController.java index aac3ff620..40db0fac8 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ItemController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ItemController.java @@ -48,12 +48,6 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends ItemEntity implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityItemNPC(EntityType types, Level level) { @@ -79,6 +73,12 @@ public class ItemController extends AbstractEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ItemFrameController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ItemFrameController.java index 7de3fb4ff..4069351f4 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ItemFrameController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ItemFrameController.java @@ -47,12 +47,6 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends ItemFrame implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityItemFrameNPC(EntityType types, Level level) { @@ -77,6 +71,12 @@ public class ItemFrameController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/LargeFireballController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/LargeFireballController.java index c26d64bb5..76ab8929c 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/LargeFireballController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/LargeFireballController.java @@ -36,12 +36,6 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityLargeFireballNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class LargeFireballController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/LeashController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/LeashController.java index a37968270..cacf71b81 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/LeashController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/LeashController.java @@ -37,12 +37,6 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityLeashNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class LeashController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/LlamaSpitController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/LlamaSpitController.java index 62a95eccd..015f2e0d2 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/LlamaSpitController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/LlamaSpitController.java @@ -48,12 +48,6 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityType types, Level level) { @@ -83,6 +77,12 @@ public class LlamaSpitController extends AbstractEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MarkerController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MarkerController.java index 7a1a5bf84..2564ea6fc 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MarkerController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MarkerController.java @@ -36,12 +36,6 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMarkerNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class MarkerController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartChestController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartChestController.java index 03c6e62c7..0f4f2e2bd 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartChestController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartChestController.java @@ -37,12 +37,6 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartChestNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class MinecartChestController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartCommandController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartCommandController.java index b837c0fbc..b9466a2f4 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartCommandController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartCommandController.java @@ -37,12 +37,6 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class MinecartCommandController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartFurnaceController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartFurnaceController.java index dc7a6086d..6fa2b9751 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartFurnaceController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartFurnaceController.java @@ -37,12 +37,6 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class MinecartFurnaceController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartHopperController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartHopperController.java index 3147398c3..faea8d6c4 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartHopperController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartHopperController.java @@ -32,12 +32,6 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityType types, Level level) { @@ -54,6 +48,12 @@ public class MinecartHopperController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartRideableController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartRideableController.java index 886868382..29eeac73c 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartRideableController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartRideableController.java @@ -36,12 +36,6 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class MinecartRideableController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartSpawnerController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartSpawnerController.java index f80f4686f..e174936ce 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartSpawnerController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartSpawnerController.java @@ -32,12 +32,6 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityType types, Level level) { @@ -54,6 +48,12 @@ public class MinecartSpawnerController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartTNTController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartTNTController.java index 4031469c2..b502268d6 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartTNTController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/MinecartTNTController.java @@ -32,12 +32,6 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityType types, Level level) { @@ -54,6 +48,12 @@ public class MinecartTNTController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/PaintingController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/PaintingController.java index f4129551d..9fc5347ad 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/PaintingController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/PaintingController.java @@ -36,12 +36,6 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityPaintingNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class PaintingController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ShulkerBulletController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ShulkerBulletController.java index 77afc43ae..5364de60c 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ShulkerBulletController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ShulkerBulletController.java @@ -36,12 +36,6 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class ShulkerBulletController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/SmallFireballController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/SmallFireballController.java index a880be5d2..1f001f88d 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/SmallFireballController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/SmallFireballController.java @@ -36,12 +36,6 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySmallFireballNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class SmallFireballController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/SnowballController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/SnowballController.java index 63236a595..3c111058e 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/SnowballController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/SnowballController.java @@ -36,12 +36,6 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySnowballNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class SnowballController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/SpectralArrowController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/SpectralArrowController.java index 510a38e65..801cff038 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/SpectralArrowController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/SpectralArrowController.java @@ -37,12 +37,6 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class SpectralArrowController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/TNTPrimedController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/TNTPrimedController.java index 7f1cb159a..73f8cb5aa 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/TNTPrimedController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/TNTPrimedController.java @@ -37,12 +37,6 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class TNTPrimedController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ThrownExpBottleController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ThrownExpBottleController.java index 96da4ec18..cb1e219df 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ThrownExpBottleController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ThrownExpBottleController.java @@ -37,12 +37,6 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class ThrownExpBottleController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ThrownPotionController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ThrownPotionController.java index ea3a37c86..13185a183 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ThrownPotionController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ThrownPotionController.java @@ -37,12 +37,6 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends ThrownPotion implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityThrownPotionNPC(EntityType types, Level level) { @@ -71,6 +65,12 @@ public class ThrownPotionController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ThrownTridentController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ThrownTridentController.java index d8c3aba18..3f38f2cdb 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ThrownTridentController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/ThrownTridentController.java @@ -37,12 +37,6 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityThrownTridentNPC(EntityType types, Level level) { @@ -67,6 +61,12 @@ public class ThrownTridentController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/TippedArrowController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/TippedArrowController.java index 0c545b72f..c9d66fc94 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/TippedArrowController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/TippedArrowController.java @@ -36,12 +36,6 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityTippedArrowNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class TippedArrowController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/WitherSkullController.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/WitherSkullController.java index b31b26235..39d425552 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/WitherSkullController.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/entity/nonliving/WitherSkullController.java @@ -36,12 +36,6 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { - @Override - public boolean isPushable() { - return npc == null ? super.isPushable() - : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); - } - private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { @@ -66,6 +60,12 @@ public class WitherSkullController extends MobEntityController { return npc; } + @Override + public boolean isPushable() { + return npc == null ? super.isPushable() + : npc.data(). get(NPC.Metadata.COLLIDABLE, !npc.isProtected()); + } + @Override protected AABB makeBoundingBox() { return NMSBoundingBox.makeBB(npc, super.makeBoundingBox()); diff --git a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/util/NMSImpl.java b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/util/NMSImpl.java index 81f2a046f..874f7861f 100644 --- a/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/util/NMSImpl.java +++ b/v1_19_R2/src/main/java/net/citizensnpcs/nms/v1_19_R2/util/NMSImpl.java @@ -1519,6 +1519,12 @@ public class NMSImpl implements NMSBridge { handle.getAttribute(Attributes.KNOCKBACK_RESISTANCE).setBaseValue(d); } + @Override + public void setLocationDirectly(org.bukkit.entity.Entity entity, Location location) { + getHandle(entity).moveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), + location.getPitch()); + } + @Override public void setLyingDown(org.bukkit.entity.Entity cat, boolean lying) { ((Cat) getHandle(cat)).setLying(lying); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/NMSImpl.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/NMSImpl.java index 8ac7913ee..64737b4c0 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/NMSImpl.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/NMSImpl.java @@ -55,6 +55,7 @@ import org.bukkit.util.Vector; import com.google.common.base.Function; import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -452,7 +453,7 @@ public class NMSImpl implements NMSBridge { Entity passenger = NMSImpl.getHandle(entity).passenger; if (passenger == null) return Collections.emptyList(); - return Lists. newArrayList(passenger.getBukkitEntity()); + return ImmutableList.of(passenger.getBukkitEntity()); } @Override @@ -1117,6 +1118,12 @@ public class NMSImpl implements NMSBridge { handle.getAttributeInstance(GenericAttributes.c).setValue(d); } + @Override + public void setLocationDirectly(org.bukkit.entity.Entity entity, Location location) { + getHandle(entity).setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), + location.getPitch()); + } + @Override public void setNavigationTarget(org.bukkit.entity.Entity handle, org.bukkit.entity.Entity target, float speed) { NMSImpl.getNavigation(handle).a(NMSImpl.getHandle(target), speed);