diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ArmorStandController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ArmorStandController.java index 1cc69dff1..b31c8e57a 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ArmorStandController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ArmorStandController.java @@ -14,7 +14,6 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; -import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityArmorStand; @@ -93,8 +92,6 @@ public class ArmorStandController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BatController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BatController.java index 86ae99916..b9310ee0d 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BatController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BatController.java @@ -56,7 +56,7 @@ public class BatController extends MobEntityController { super(world); this.npc = (CitizensNPC) npc; if (npc != null) { - setFlying(false); + setAsleep(false); } } @@ -101,8 +101,6 @@ public class BatController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); @@ -149,9 +147,5 @@ public class BatController extends MobEntityController { npc.update(); } } - - public void setFlying(boolean flying) { - setAsleep(flying); - } } } \ No newline at end of file diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BlazeController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BlazeController.java index f7f326a92..44fb1b9f2 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BlazeController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BlazeController.java @@ -98,8 +98,6 @@ public class BlazeController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CaveSpiderController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CaveSpiderController.java index 699e3df6d..d4507c178 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CaveSpiderController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CaveSpiderController.java @@ -114,8 +114,6 @@ public class CaveSpiderController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ChickenController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ChickenController.java index 80f12c4bf..215d8fba8 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ChickenController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ChickenController.java @@ -123,8 +123,6 @@ public class ChickenController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CowController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CowController.java index 8f6221d72..9cb57ef19 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CowController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CowController.java @@ -138,8 +138,6 @@ public class CowController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CreeperController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CreeperController.java index 61367c8da..da2a30060 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CreeperController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CreeperController.java @@ -131,8 +131,6 @@ public class CreeperController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermanController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermanController.java index ba3df1966..8110cac90 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermanController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermanController.java @@ -113,8 +113,6 @@ public class EndermanController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermiteController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermiteController.java index 9975a6a26..627a3afb3 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermiteController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermiteController.java @@ -113,8 +113,6 @@ public class EndermiteController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GhastController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GhastController.java index 74ad9679e..29fda2b86 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GhastController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GhastController.java @@ -89,8 +89,6 @@ public class GhastController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GiantController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GiantController.java index f9349a492..07569e110 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GiantController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GiantController.java @@ -99,8 +99,6 @@ public class GiantController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GuardianController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GuardianController.java index 2c526e3f3..73a30a101 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GuardianController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GuardianController.java @@ -100,8 +100,6 @@ public class GuardianController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/HorseController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/HorseController.java index a5aef5329..aa8a9c109 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/HorseController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/HorseController.java @@ -128,8 +128,6 @@ public class HorseController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/IronGolemController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/IronGolemController.java index dadb6a176..7cbf55166 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/IronGolemController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/IronGolemController.java @@ -99,8 +99,6 @@ public class IronGolemController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MagmaCubeController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MagmaCubeController.java index 199aa1fb0..5499722b2 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MagmaCubeController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MagmaCubeController.java @@ -112,8 +112,6 @@ public class MagmaCubeController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MushroomCowController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MushroomCowController.java index ef987aefd..d9fd93143 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MushroomCowController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MushroomCowController.java @@ -118,8 +118,6 @@ public class MushroomCowController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/OcelotController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/OcelotController.java index cd3b39890..a25268227 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/OcelotController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/OcelotController.java @@ -115,8 +115,6 @@ public class OcelotController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigController.java index 2140176f7..64681cab6 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigController.java @@ -118,8 +118,6 @@ public class PigController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigZombieController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigZombieController.java index 0e0f58176..c18a9e63a 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigZombieController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigZombieController.java @@ -99,8 +99,6 @@ public class PigZombieController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PolarBearController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PolarBearController.java index 6ac6b20bc..e4d536245 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PolarBearController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PolarBearController.java @@ -93,8 +93,6 @@ public class PolarBearController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/RabbitController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/RabbitController.java index 3387fae36..d11eb5bca 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/RabbitController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/RabbitController.java @@ -110,8 +110,6 @@ public class RabbitController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SheepController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SheepController.java index 8e557ba6a..469bf162d 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SheepController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SheepController.java @@ -108,8 +108,6 @@ public class SheepController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ShulkerController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ShulkerController.java index 606199192..aeb0a4344 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ShulkerController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ShulkerController.java @@ -100,8 +100,6 @@ public class ShulkerController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SilverfishController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SilverfishController.java index 31d6084ad..cdb836c21 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SilverfishController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SilverfishController.java @@ -99,8 +99,6 @@ public class SilverfishController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SkeletonController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SkeletonController.java index 54fe22d4e..ad211c8e6 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SkeletonController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SkeletonController.java @@ -99,8 +99,6 @@ public class SkeletonController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SlimeController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SlimeController.java index cf6519430..258f0ab6d 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SlimeController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SlimeController.java @@ -113,8 +113,6 @@ public class SlimeController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SnowmanController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SnowmanController.java index a4abdbad4..db48cac80 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SnowmanController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SnowmanController.java @@ -99,8 +99,6 @@ public class SnowmanController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SpiderController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SpiderController.java index d1aec14c0..2046c32f8 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SpiderController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SpiderController.java @@ -99,8 +99,6 @@ public class SpiderController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SquidController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SquidController.java index 650f93263..82a160d74 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SquidController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SquidController.java @@ -99,8 +99,6 @@ public class SquidController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/VillagerController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/VillagerController.java index 43f32fc15..3058952e1 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/VillagerController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/VillagerController.java @@ -132,8 +132,6 @@ public class VillagerController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitchController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitchController.java index ded419391..a97bb014c 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitchController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitchController.java @@ -99,8 +99,6 @@ public class WitchController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitherController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitherController.java index 82d5a87f0..97f7d80c4 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitherController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitherController.java @@ -89,8 +89,6 @@ public class WitherController extends MobEntityController { : npc.data().get("wither-arrow-shield"); } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WolfController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WolfController.java index 146e9e8eb..2eb758bc9 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WolfController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WolfController.java @@ -111,8 +111,6 @@ public class WolfController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ZombieController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ZombieController.java index baf579979..2eac0db63 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ZombieController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ZombieController.java @@ -99,8 +99,6 @@ public class ZombieController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ArmorStandController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ArmorStandController.java index 9c735d671..63c3bdc5f 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ArmorStandController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ArmorStandController.java @@ -13,7 +13,6 @@ import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; -import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityArmorStand; @@ -99,8 +98,6 @@ public class ArmorStandController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BatController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BatController.java index b8a3aa81e..85a0e2e03 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BatController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BatController.java @@ -56,7 +56,7 @@ public class BatController extends MobEntityController { super(world); this.npc = (CitizensNPC) npc; if (npc != null) { - setFlying(false); + setAsleep(false); } } @@ -101,8 +101,6 @@ public class BatController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); @@ -150,9 +148,5 @@ public class BatController extends MobEntityController { npc.update(); } } - - public void setFlying(boolean flying) { - setAsleep(flying); - } } } \ No newline at end of file diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BlazeController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BlazeController.java index 2c765a1b6..da71167a6 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BlazeController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BlazeController.java @@ -98,8 +98,6 @@ public class BlazeController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CaveSpiderController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CaveSpiderController.java index 987654b80..87487b968 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CaveSpiderController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CaveSpiderController.java @@ -114,8 +114,6 @@ public class CaveSpiderController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ChickenController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ChickenController.java index a0c2fd803..9509d5567 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ChickenController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ChickenController.java @@ -123,8 +123,6 @@ public class ChickenController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CowController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CowController.java index 61774063f..83f0c6fb3 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CowController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CowController.java @@ -138,8 +138,6 @@ public class CowController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CreeperController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CreeperController.java index 93eefd9ec..c8c25d0b8 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CreeperController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CreeperController.java @@ -123,8 +123,6 @@ public class CreeperController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermanController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermanController.java index 540781917..961453ffb 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermanController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermanController.java @@ -113,8 +113,6 @@ public class EndermanController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermiteController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermiteController.java index 6a6a16176..b6e2f0335 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermiteController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermiteController.java @@ -113,8 +113,6 @@ public class EndermiteController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EvokerController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EvokerController.java index a304b28e9..d1c9fee7d 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EvokerController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EvokerController.java @@ -100,8 +100,6 @@ public class EvokerController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GhastController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GhastController.java index d8e182729..bc8c38662 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GhastController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GhastController.java @@ -89,8 +89,6 @@ public class GhastController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GiantController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GiantController.java index abcdeeb64..6bdad3597 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GiantController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GiantController.java @@ -99,8 +99,6 @@ public class GiantController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianController.java index 969ba6c01..bb02426cd 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianController.java @@ -100,8 +100,6 @@ public class GuardianController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianElderController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianElderController.java index 1559ff015..68f08d7a2 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianElderController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianElderController.java @@ -100,8 +100,6 @@ public class GuardianElderController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseController.java index 08b55c2f3..e79b003ae 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseController.java @@ -120,8 +120,6 @@ public class HorseController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseDonkeyController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseDonkeyController.java index 9f87162a1..6578f3c67 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseDonkeyController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseDonkeyController.java @@ -120,8 +120,6 @@ public class HorseDonkeyController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseMuleController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseMuleController.java index a979e5962..bfe55a49c 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseMuleController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseMuleController.java @@ -120,8 +120,6 @@ public class HorseMuleController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseSkeletonController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseSkeletonController.java index f6d12993b..c3ff6fffd 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseSkeletonController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseSkeletonController.java @@ -121,8 +121,6 @@ public class HorseSkeletonController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseZombieController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseZombieController.java index 180a718ff..f0ed24089 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseZombieController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseZombieController.java @@ -121,8 +121,6 @@ public class HorseZombieController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/IronGolemController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/IronGolemController.java index 77f62d485..cd877ac03 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/IronGolemController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/IronGolemController.java @@ -99,8 +99,6 @@ public class IronGolemController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/LlamaController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/LlamaController.java index 44dcc72f4..878dcb42a 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/LlamaController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/LlamaController.java @@ -120,8 +120,6 @@ public class LlamaController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MagmaCubeController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MagmaCubeController.java index b972bf22f..6326f6a4b 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MagmaCubeController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MagmaCubeController.java @@ -120,8 +120,6 @@ public class MagmaCubeController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MushroomCowController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MushroomCowController.java index 3e382b6da..021a7c690 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MushroomCowController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MushroomCowController.java @@ -117,8 +117,6 @@ public class MushroomCowController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/OcelotController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/OcelotController.java index 15d23d6d6..ab565b9ca 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/OcelotController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/OcelotController.java @@ -115,8 +115,6 @@ public class OcelotController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigController.java index 39a531327..c96e915e9 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigController.java @@ -116,8 +116,6 @@ public class PigController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigZombieController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigZombieController.java index c4dc52151..63c1d97dd 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigZombieController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigZombieController.java @@ -99,8 +99,6 @@ public class PigZombieController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PolarBearController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PolarBearController.java index 0dee1e15a..972077a3e 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PolarBearController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PolarBearController.java @@ -93,8 +93,6 @@ public class PolarBearController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/RabbitController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/RabbitController.java index 4cee51a4b..55ebecc54 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/RabbitController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/RabbitController.java @@ -110,8 +110,6 @@ public class RabbitController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SheepController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SheepController.java index 93b751bb5..17e24c230 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SheepController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SheepController.java @@ -108,8 +108,6 @@ public class SheepController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ShulkerController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ShulkerController.java index 989894f6c..a0ba3c0ba 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ShulkerController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ShulkerController.java @@ -110,8 +110,6 @@ public class ShulkerController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SilverfishController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SilverfishController.java index 0730425ae..517adb0b8 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SilverfishController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SilverfishController.java @@ -99,8 +99,6 @@ public class SilverfishController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonController.java index a71c2efb3..6df00fbc7 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonController.java @@ -99,8 +99,6 @@ public class SkeletonController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonStrayController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonStrayController.java index b1e24b54f..37523c86f 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonStrayController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonStrayController.java @@ -99,8 +99,6 @@ public class SkeletonStrayController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonWitherController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonWitherController.java index 1888d46ce..72ce107fc 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonWitherController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonWitherController.java @@ -99,8 +99,6 @@ public class SkeletonWitherController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SlimeController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SlimeController.java index 2b09fe564..76818db13 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SlimeController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SlimeController.java @@ -121,8 +121,6 @@ public class SlimeController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SnowmanController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SnowmanController.java index 181b44c62..926306f67 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SnowmanController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SnowmanController.java @@ -99,8 +99,6 @@ public class SnowmanController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SpiderController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SpiderController.java index d339b3a8d..a832dfe26 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SpiderController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SpiderController.java @@ -99,8 +99,6 @@ public class SpiderController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SquidController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SquidController.java index 1e52427df..28f2582f7 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SquidController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SquidController.java @@ -99,8 +99,6 @@ public class SquidController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VexController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VexController.java index 7fb41e91b..5c8b20223 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VexController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VexController.java @@ -87,8 +87,6 @@ public class VexController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VillagerController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VillagerController.java index 0b55f2e2e..29c04c676 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VillagerController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VillagerController.java @@ -138,8 +138,6 @@ public class VillagerController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VindicatorController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VindicatorController.java index 96fa46148..733c953be 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VindicatorController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VindicatorController.java @@ -109,8 +109,6 @@ public class VindicatorController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitchController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitchController.java index 186703ad3..80cb11578 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitchController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitchController.java @@ -99,8 +99,6 @@ public class WitchController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitherController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitherController.java index 3dd3b1b68..86c495514 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitherController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitherController.java @@ -89,8 +89,6 @@ public class WitherController extends MobEntityController { : npc.data().get("wither-arrow-shield"); } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WolfController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WolfController.java index 66d0986dd..7d62ec988 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WolfController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WolfController.java @@ -111,8 +111,6 @@ public class WolfController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieController.java index 3a92316a6..10d0f0d8b 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieController.java @@ -99,8 +99,6 @@ public class ZombieController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieHuskController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieHuskController.java index 49ecdc66f..e056741a4 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieHuskController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieHuskController.java @@ -99,8 +99,6 @@ public class ZombieHuskController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieVillagerController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieVillagerController.java index 71182467d..4142945ad 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieVillagerController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieVillagerController.java @@ -99,8 +99,6 @@ public class ZombieVillagerController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ArmorStandController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ArmorStandController.java index 437b4be6f..1afaefa1e 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ArmorStandController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ArmorStandController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.EntityArmorStand; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EnumHand; import net.minecraft.server.v1_12_R1.EnumInteractionResult; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.Vec3D; import net.minecraft.server.v1_12_R1.World; @@ -48,6 +49,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityArmorStandNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BatController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BatController.java index b3d2674ec..beb2b6838 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BatController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BatController.java @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityBat; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; import net.minecraft.server.v1_12_R1.World; @@ -47,6 +48,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBatNPC(World world) { @@ -57,7 +63,7 @@ public class BatController extends MobEntityController { super(world); this.npc = (CitizensNPC) npc; if (npc != null) { - setFlying(false); + setAsleep(false); } } @@ -102,8 +108,6 @@ public class BatController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); @@ -151,9 +155,5 @@ public class BatController extends MobEntityController { npc.update(); } } - - public void setFlying(boolean flying) { - setAsleep(flying); - } } } \ No newline at end of file diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BlazeController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BlazeController.java index fc241ae92..f27d8c1a0 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BlazeController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BlazeController.java @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityBlaze; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; import net.minecraft.server.v1_12_R1.World; @@ -47,6 +48,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBlazeNPC(World world) { @@ -99,8 +105,6 @@ public class BlazeController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CaveSpiderController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CaveSpiderController.java index c2d191d31..3f3030839 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CaveSpiderController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CaveSpiderController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityCaveSpider; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -49,6 +50,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(World world) { @@ -124,8 +130,6 @@ public class CaveSpiderController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ChickenController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ChickenController.java index 29bc45f4d..8eba51fb4 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ChickenController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ChickenController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityChicken; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -49,6 +50,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityChickenNPC(World world) { @@ -133,8 +139,6 @@ public class ChickenController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CowController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CowController.java index a050d7a69..9d1e1103c 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CowController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CowController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityCow; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EnumHand; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.ItemStack; import net.minecraft.server.v1_12_R1.Items; @@ -53,6 +54,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCowNPC(World world) { @@ -148,8 +154,6 @@ public class CowController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CreeperController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CreeperController.java index 3413a7796..be25749cf 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CreeperController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CreeperController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityCreeper; import net.minecraft.server.v1_12_R1.EntityLightning; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -50,6 +51,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean allowPowered; private final CitizensNPC npc; @@ -133,8 +139,6 @@ public class CreeperController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java index 555048a78..d8848ef1e 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.DragonControllerPhase; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityEnderDragon; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IEntitySelector; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -53,6 +54,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermanController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermanController.java index a5c991d66..a3b0c8177 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermanController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermanController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityEnderman; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -49,6 +50,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEndermanNPC(World world) { @@ -123,8 +129,6 @@ public class EndermanController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermiteController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermiteController.java index b87b03aad..e1805109f 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermiteController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermiteController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityEndermite; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -49,6 +50,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEndermiteNPC(World world) { @@ -123,8 +129,6 @@ public class EndermiteController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EvokerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EvokerController.java index c73ce98b9..b50aeb184 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EvokerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EvokerController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityEvoker; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerNPC(World world) { @@ -110,8 +116,6 @@ public class EvokerController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GhastController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GhastController.java index 8b3845108..906d442a1 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GhastController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GhastController.java @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityGhast; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; import net.minecraft.server.v1_12_R1.World; @@ -33,6 +34,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGhastNPC(World world) { @@ -90,8 +96,6 @@ public class GhastController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GiantController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GiantController.java index 3aae9e19e..8e57214b6 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GiantController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GiantController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityGiantZombie; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGiantNPC(World world) { @@ -109,8 +115,6 @@ public class GiantController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianController.java index 08699a0b1..d262e60c2 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityGuardian; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianNPC(World world) { @@ -110,8 +116,6 @@ public class GuardianController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianElderController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianElderController.java index 637433aeb..76cdabe9f 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianElderController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianElderController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityGuardianElder; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(World world) { @@ -110,8 +116,6 @@ public class GuardianElderController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseController.java index b0ee9826d..d49f5f24b 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHorse; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.GenericAttributes; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -45,6 +46,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; @@ -144,8 +150,6 @@ public class HorseController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseDonkeyController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseDonkeyController.java index 3127e157d..a4844c1e2 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseDonkeyController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseDonkeyController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHorseDonkey; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.GenericAttributes; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -45,6 +46,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseMuleController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseMuleController.java index d4d3cec13..56b75b866 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseMuleController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseMuleController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHorseMule; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.GenericAttributes; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -45,6 +46,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; @@ -144,8 +150,6 @@ public class HorseMuleController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseSkeletonController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseSkeletonController.java index 530c5a344..4ceb30ed3 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseSkeletonController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseSkeletonController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHorseSkeleton; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.GenericAttributes; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -45,6 +46,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; @@ -145,8 +151,6 @@ public class HorseSkeletonController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseZombieController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseZombieController.java index 8579217ed..26e3fbc88 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseZombieController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseZombieController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHorseZombie; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.GenericAttributes; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -45,6 +46,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; @@ -145,8 +151,6 @@ public class HorseZombieController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IllusionerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IllusionerController.java index 4e0566ae9..a8306140f 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IllusionerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IllusionerController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityIllagerIllusioner; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityIllusionerNPC(World world) { @@ -110,8 +116,6 @@ public class IllusionerController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IronGolemController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IronGolemController.java index 31d3d4e7d..e5c58f994 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IronGolemController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IronGolemController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityIronGolem; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityIronGolemNPC(World world) { @@ -109,8 +115,6 @@ public class IronGolemController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/LlamaController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/LlamaController.java index e184fdd7e..4cdabef29 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/LlamaController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/LlamaController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityLlama; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.GenericAttributes; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -45,6 +46,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MagmaCubeController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MagmaCubeController.java index 8b89f9f2a..dc0fa627c 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MagmaCubeController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MagmaCubeController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EntityMagmaCube; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -37,6 +38,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMagmaCubeNPC(World world) { @@ -130,8 +136,6 @@ public class MagmaCubeController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MushroomCowController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MushroomCowController.java index 7914edd36..c501a5b87 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MushroomCowController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MushroomCowController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EntityMushroomCow; import net.minecraft.server.v1_12_R1.EnumHand; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -37,6 +38,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(World world) { @@ -127,8 +133,6 @@ public class MushroomCowController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java index f014b1a68..645788858 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityOcelot; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityOcelotNPC(World world) { @@ -126,8 +132,6 @@ public class OcelotController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ParrotController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ParrotController.java index 572d86b82..9a534b219 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ParrotController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ParrotController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EntityParrot; import net.minecraft.server.v1_12_R1.EnumHand; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; import net.minecraft.server.v1_12_R1.World; @@ -35,6 +36,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityParrotNPC(World world) { @@ -96,8 +102,6 @@ public class ParrotController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigController.java index ead492c42..45925de44 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityLightning; import net.minecraft.server.v1_12_R1.EntityPig; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -36,6 +37,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPigNPC(World world) { @@ -126,8 +132,6 @@ public class PigController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigZombieController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigZombieController.java index f0f5c0d11..d42cd7d2f 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigZombieController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigZombieController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityPigZombie; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPigZombieNPC(World world) { @@ -109,8 +115,6 @@ public class PigZombieController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PolarBearController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PolarBearController.java index 191726acd..34c67982d 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PolarBearController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PolarBearController.java @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityPolarBear; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; import net.minecraft.server.v1_12_R1.World; @@ -33,6 +34,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPolarBearNPC(World world) { @@ -94,8 +100,6 @@ public class PolarBearController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/RabbitController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/RabbitController.java index 4f1a02cc1..2bb44dae6 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/RabbitController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/RabbitController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityLiving; import net.minecraft.server.v1_12_R1.EntityRabbit; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -36,6 +37,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityRabbitNPC(World world) { @@ -120,8 +126,6 @@ public class RabbitController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SheepController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SheepController.java index 66d28c5e5..4a409c6a8 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SheepController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SheepController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntitySheep; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySheepNPC(World world) { @@ -118,8 +124,6 @@ public class SheepController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ShulkerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ShulkerController.java index 3c17ba6d0..2d1ecec3b 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ShulkerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ShulkerController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityAIBodyControl; import net.minecraft.server.v1_12_R1.EntityShulker; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -36,6 +37,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerNPC(World world) { @@ -119,8 +125,6 @@ public class ShulkerController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SilverfishController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SilverfishController.java index c1eb6ca9c..604677dee 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SilverfishController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SilverfishController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntitySilverfish; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySilverfishNPC(World world) { @@ -109,8 +115,6 @@ public class SilverfishController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonController.java index 57ef77351..6d0b1bc12 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntitySkeleton; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonNPC(World world) { @@ -109,8 +115,6 @@ public class SkeletonController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonStrayController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonStrayController.java index d787470ca..613fb2c90 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonStrayController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonStrayController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntitySkeletonStray; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityStrayNPC(World world) { @@ -109,8 +115,6 @@ public class SkeletonStrayController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonWitherController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonWitherController.java index 8d0f0d4a9..e6f4aaedb 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonWitherController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonWitherController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntitySkeletonWither; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(World world) { @@ -109,8 +115,6 @@ public class SkeletonWitherController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SlimeController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SlimeController.java index ffafa978f..32a19d23b 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SlimeController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SlimeController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EntitySlime; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -37,6 +38,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySlimeNPC(World world) { @@ -131,8 +137,6 @@ public class SlimeController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SnowmanController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SnowmanController.java index 2c077468f..326dc23ba 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SnowmanController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SnowmanController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntitySnowman; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySnowmanNPC(World world) { @@ -109,8 +115,6 @@ public class SnowmanController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SpiderController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SpiderController.java index 32d3fd7e7..6df89b2fc 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SpiderController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SpiderController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntitySpider; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySpiderNPC(World world) { @@ -109,8 +115,6 @@ public class SpiderController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SquidController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SquidController.java index 3c8bf94dd..f76d1b7d6 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SquidController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SquidController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntitySquid; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySquidNPC(World world) { @@ -109,8 +115,6 @@ public class SquidController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VexController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VexController.java index 63f64991a..5504f7499 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VexController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VexController.java @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityVex; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; import net.minecraft.server.v1_12_R1.World; @@ -33,6 +34,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityVexNPC(World world) { @@ -88,8 +94,6 @@ public class VexController extends MobEntityController { return npc == null ? super.d(save) : false; } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VillagerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VillagerController.java index 926543793..3aa344c3d 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VillagerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VillagerController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EntityLightning; import net.minecraft.server.v1_12_R1.EntityVillager; import net.minecraft.server.v1_12_R1.EnumHand; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.MerchantRecipe; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean blockingATrade; private final CitizensNPC npc; @@ -148,8 +154,6 @@ public class VillagerController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VindicatorController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VindicatorController.java index 6c19e88f3..215ae5011 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VindicatorController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VindicatorController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityVindicator; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityVindicatorNPC(World world) { @@ -119,8 +125,6 @@ public class VindicatorController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitchController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitchController.java index 6b5fa007b..7467bd19c 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitchController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitchController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityWitch; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitchNPC(World world) { @@ -109,8 +115,6 @@ public class WitchController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitherController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitherController.java index 180638ab7..b986bebec 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitherController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitherController.java @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityWither; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; import net.minecraft.server.v1_12_R1.World; @@ -33,6 +34,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitherNPC(World world) { @@ -90,8 +96,6 @@ public class WitherController extends MobEntityController { : npc.data().get("wither-arrow-shield"); } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WolfController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WolfController.java index 2f75debda..b2fd4e3de 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WolfController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WolfController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityLiving; import net.minecraft.server.v1_12_R1.EntityWolf; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -37,6 +38,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWolfNPC(World world) { @@ -121,8 +127,6 @@ public class WolfController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieController.java index e9374bed9..9aa3050ae 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityZombie; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieNPC(World world) { @@ -109,8 +115,6 @@ public class ZombieController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieHuskController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieHuskController.java index 6bc209785..d489adbd6 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieHuskController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieHuskController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityZombieHusk; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(World world) { @@ -109,8 +115,6 @@ public class ZombieHuskController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieVillagerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieVillagerController.java index 6f2276207..5668eac79 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieVillagerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieVillagerController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityZombieVillager; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -35,6 +36,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(World world) { @@ -109,8 +115,6 @@ public class ZombieVillagerController extends MobEntityController { } } - - @Override public void f(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/AreaEffectCloudController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/AreaEffectCloudController.java index 303028d9f..b51bec2e5 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/AreaEffectCloudController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityAreaEffectCloud; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -43,6 +44,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/BoatController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/BoatController.java index e3e733fdf..6d0293719 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/BoatController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/BoatController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityBoat; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -44,6 +45,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBoatNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/DragonFireballController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/DragonFireballController.java index e0e3b80ae..aed24fd42 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/DragonFireballController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/DragonFireballController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityDragonFireball; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -44,6 +45,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EggController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EggController.java index 6a59ab0f1..dcfffdbcd 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EggController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EggController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityEgg; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; import net.minecraft.server.v1_12_R1.WorldServer; @@ -54,6 +55,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEggNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderCrystalController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderCrystalController.java index 778599950..b8fd3c75a 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderCrystalController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityEnderCrystal; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -43,6 +44,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderPearlController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderPearlController.java index 2688d5dc3..e88b351cd 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderPearlController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderPearlController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityEnderPearl; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -43,6 +44,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderSignalController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderSignalController.java index 99d253671..a4392c9ba 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderSignalController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderSignalController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityEnderSignal; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -43,6 +44,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EvokerFangsController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EvokerFangsController.java index 1f7503eb2..5f8bcf554 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EvokerFangsController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EvokerFangsController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_12_R1.EntityEvokerFangs; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EnumHand; import net.minecraft.server.v1_12_R1.EnumInteractionResult; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.Vec3D; import net.minecraft.server.v1_12_R1.World; @@ -35,6 +36,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ExperienceOrbController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ExperienceOrbController.java index 2f631e25f..ed97665cd 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ExperienceOrbController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityExperienceOrb; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FallingBlockController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FallingBlockController.java index 30af51ed0..5926043a0 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FallingBlockController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FallingBlockController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.Block; import net.minecraft.server.v1_12_R1.EntityFallingBlock; import net.minecraft.server.v1_12_R1.EnumMoveType; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -47,6 +48,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FireworkController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FireworkController.java index d0bb81b06..e5014507c 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FireworkController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FireworkController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityFireworks; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFireworkNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FishingHookController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FishingHookController.java index dea43f95d..839178fde 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FishingHookController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FishingHookController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityFishingHook; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFishingHookNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemController.java index 944e3f14d..105c7c8d8 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemController.java @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EntityItem; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.ItemStack; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -41,6 +42,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityItemNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemFrameController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemFrameController.java index ed548317b..7a76c51bf 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemFrameController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemFrameController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.EntityItemFrame; import net.minecraft.server.v1_12_R1.EnumDirection; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -42,6 +43,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityItemFrameNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LargeFireballController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LargeFireballController.java index 29a30fd95..60123e27c 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LargeFireballController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LargeFireballController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityLargeFireball; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -30,6 +31,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LeashController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LeashController.java index d1eb59f3f..1340db84f 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LeashController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LeashController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityLeash; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLeashNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LlamaSpitController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LlamaSpitController.java index 3fee43314..5b0322e7f 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LlamaSpitController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LlamaSpitController.java @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityLlama; import net.minecraft.server.v1_12_R1.EntityLlamaSpit; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; import net.minecraft.server.v1_12_R1.WorldServer; @@ -42,6 +43,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartChestController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartChestController.java index a2c7181c7..3509f7ebb 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartChestController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartChestController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartChest; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -30,6 +31,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartCommandController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartCommandController.java index 49476e482..17cc05e34 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartCommandController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartCommandBlock; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -30,6 +31,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartFurnaceController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartFurnaceController.java index f4e7c892a..067121afc 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartFurnaceController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartFurnace; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -30,6 +31,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartHopperController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartHopperController.java index 413539dc7..f9fe8a6e9 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartHopperController.java @@ -12,6 +12,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartHopper; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -26,6 +27,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartRideableController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartRideableController.java index f77e6569a..0d6502242 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartRideableController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartRideable; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -30,6 +31,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartSpawnerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartSpawnerController.java index e89028ff4..d88d99e3b 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartSpawnerController.java @@ -12,6 +12,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartMobSpawner; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -26,6 +27,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartTNTController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartTNTController.java index da569d9e6..a43d55131 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartTNTController.java @@ -12,6 +12,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartTNT; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -26,6 +27,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/PaintingController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/PaintingController.java index 8b415a315..35bb70932 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/PaintingController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/PaintingController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityPainting; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPaintingNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ShulkerBulletController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ShulkerBulletController.java index 6e09f0bdd..08eb2a999 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ShulkerBulletController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityShulkerBullet; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SmallFireballController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SmallFireballController.java index b2abdb837..e7638e315 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SmallFireballController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SmallFireballController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntitySmallFireball; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SnowballController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SnowballController.java index dda8f8cc4..7b02d37c0 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SnowballController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SnowballController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntitySnowball; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySnowballNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SpectralArrowController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SpectralArrowController.java index 178fb2b70..20240c274 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SpectralArrowController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntitySpectralArrow; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TNTPrimedController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TNTPrimedController.java index 756c08a18..afd8b1c97 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TNTPrimedController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityTNTPrimed; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownExpBottleController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownExpBottleController.java index 0ebbe68d4..ffd843f77 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownExpBottleController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityThrownExpBottle; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownPotionController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownPotionController.java index fb03898b8..a648bef9a 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownPotionController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityPotion; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.Items; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -30,6 +31,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TippedArrowController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TippedArrowController.java index a4d0ac50d..303aee2e3 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TippedArrowController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TippedArrowController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityTippedArrow; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/WitherSkullController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/WitherSkullController.java index b5523d352..0eaed0634 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/WitherSkullController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/WitherSkullController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityWitherSkull; +import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -29,6 +30,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ArmorStandController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ArmorStandController.java index 9bf86a9ae..0ba95f05b 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ArmorStandController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ArmorStandController.java @@ -11,7 +11,6 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; @@ -20,6 +19,7 @@ import net.minecraft.server.v1_13_R2.EntityArmorStand; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EnumHand; import net.minecraft.server.v1_13_R2.EnumInteractionResult; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -51,6 +51,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityArmorStandNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BatController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BatController.java index 604d4b8a8..e4bdb92f8 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BatController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BatController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBat; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.SoundEffect; @@ -51,6 +52,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBatNPC(World world) { @@ -61,7 +67,7 @@ public class BatController extends MobEntityController { super(world); this.npc = (CitizensNPC) npc; if (npc != null) { - setFlying(false); + setAsleep(false); } } @@ -178,9 +184,5 @@ public class BatController extends MobEntityController { } return super.n(entity); } - - public void setFlying(boolean flying) { - setAsleep(flying); - } } } \ No newline at end of file diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BlazeController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BlazeController.java index a0db311e6..478f4274e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BlazeController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BlazeController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBlaze; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.SoundEffect; @@ -51,6 +52,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBlazeNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CaveSpiderController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CaveSpiderController.java index 4a1fe478b..e1d59d882 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CaveSpiderController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CaveSpiderController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityCaveSpider; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -53,6 +54,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ChickenController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ChickenController.java index 24dfa5d38..81919d2a6 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ChickenController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ChickenController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityChicken; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -55,6 +56,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityChickenNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CodController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CodController.java index 039d15032..dc6371e55 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CodController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CodController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.EntityCod; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EnumHand; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.ItemStack; @@ -58,6 +59,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends EntityCod implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCodNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CowController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CowController.java index 1a09a0a44..585bb5972 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CowController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CowController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.EntityCow; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EnumHand; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.ItemStack; @@ -57,6 +58,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCowNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CreeperController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CreeperController.java index 622c91527..21744244d 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CreeperController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CreeperController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityCreeper; import net.minecraft.server.v1_13_R2.EntityLightning; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -54,6 +55,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DolphinController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DolphinController.java index 0a391bd5f..17aee16c9 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DolphinController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DolphinController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityDolphin; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; import net.minecraft.server.v1_13_R2.IBlockData; @@ -54,6 +55,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean inProtectedTick; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DrownedController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DrownedController.java index d46aa360e..71a6cb67a 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DrownedController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DrownedController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityDrowned; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -53,6 +54,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityDrownedNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EnderDragonController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EnderDragonController.java index 8566492eb..9db64cb33 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EnderDragonController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EnderDragonController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityEnderDragon; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IEntitySelector; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -58,6 +59,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermanController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermanController.java index 0ed338e92..cb084c2f1 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermanController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermanController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityEnderman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -53,6 +54,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEndermanNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermiteController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermiteController.java index a7f744b44..30dbe7ef5 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermiteController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermiteController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityEndermite; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -53,6 +54,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEndermiteNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EvokerController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EvokerController.java index 3cdf59b3f..97e617f33 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EvokerController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EvokerController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityEvoker; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GhastController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GhastController.java index c6821efda..75c8464e5 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GhastController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GhastController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityGhast; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.SoundEffect; @@ -37,6 +38,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGhastNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GiantController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GiantController.java index 04068e04c..a3bde2803 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GiantController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GiantController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityGiantZombie; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGiantNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianController.java index cbcdd12c0..1e54514c5 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityGuardian; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -41,6 +42,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianElderController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianElderController.java index 67dbb7c9f..a8e64971a 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianElderController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianElderController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityGuardianElder; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -41,6 +42,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseController.java index 30c0b346a..316b46707 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHorse; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; import net.minecraft.server.v1_13_R2.IBlockData; @@ -49,6 +50,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseDonkeyController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseDonkeyController.java index c97980646..e8272e4cb 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseDonkeyController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseDonkeyController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHorseDonkey; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; import net.minecraft.server.v1_13_R2.IBlockData; @@ -49,6 +50,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseMuleController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseMuleController.java index 3dbe5feaf..4f0860be3 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseMuleController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseMuleController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHorseMule; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; import net.minecraft.server.v1_13_R2.IBlockData; @@ -49,6 +50,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseSkeletonController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseSkeletonController.java index 6039b8b6f..e01bff70f 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseSkeletonController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseSkeletonController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHorseSkeleton; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; import net.minecraft.server.v1_13_R2.IBlockData; @@ -49,6 +50,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseZombieController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseZombieController.java index 19f6c8449..3bf6ba1a1 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseZombieController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseZombieController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHorseZombie; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; import net.minecraft.server.v1_13_R2.IBlockData; @@ -49,6 +50,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IllusionerController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IllusionerController.java index 4b628f7e5..71e2515fb 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IllusionerController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IllusionerController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityIllagerIllusioner; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityIllusionerNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IronGolemController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IronGolemController.java index edbc3e694..a51df7ddf 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IronGolemController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IronGolemController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityIronGolem; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityIronGolemNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/LlamaController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/LlamaController.java index bc1e49cd9..6a5dea88a 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/LlamaController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/LlamaController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityLlama; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; import net.minecraft.server.v1_13_R2.IBlockData; @@ -49,6 +50,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MagmaCubeController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MagmaCubeController.java index 090c996f6..224ca409b 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MagmaCubeController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MagmaCubeController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMagmaCube; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -41,6 +42,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMagmaCubeNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MushroomCowController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MushroomCowController.java index 44e901d38..c1bb1c830 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MushroomCowController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MushroomCowController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityMushroomCow; import net.minecraft.server.v1_13_R2.EnumHand; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -41,6 +42,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/OcelotController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/OcelotController.java index 130f208f7..3e21bc016 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/OcelotController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/OcelotController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityOcelot; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityOcelotNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ParrotController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ParrotController.java index 79580184d..0dfebfa76 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ParrotController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ParrotController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityParrot; import net.minecraft.server.v1_13_R2.EnumHand; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.SoundEffect; @@ -39,6 +40,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityParrotNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PhantomController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PhantomController.java index 89530aa86..9507ba3f4 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PhantomController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PhantomController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityPhantom; import net.minecraft.server.v1_13_R2.EnumDifficulty; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -44,6 +45,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPhantomNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigController.java index 047c6e4bc..b7d6316ba 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityLightning; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityPig; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -40,6 +41,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPigNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigZombieController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigZombieController.java index 307d340d5..060bafde4 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigZombieController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigZombieController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityPigZombie; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPigZombieNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PolarBearController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PolarBearController.java index 7cf2da936..18b473643 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PolarBearController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PolarBearController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityPolarBear; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.SoundEffect; @@ -37,6 +38,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPolarBearNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PufferFishController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PufferFishController.java index 78d1e68d1..9280a9513 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PufferFishController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PufferFishController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityPufferFish; import net.minecraft.server.v1_13_R2.EnumHand; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.ItemStack; @@ -45,6 +46,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPufferFishNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/RabbitController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/RabbitController.java index 24cef42ea..43a1b7073 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/RabbitController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/RabbitController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityLiving; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityRabbit; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -40,6 +41,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityRabbitNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SalmonController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SalmonController.java index ddbd3db29..7d9e58f14 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SalmonController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SalmonController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntitySalmon; import net.minecraft.server.v1_13_R2.EnumHand; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.ItemStack; @@ -44,6 +45,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySalmonNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SheepController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SheepController.java index 1d9e7b524..9e10a9740 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SheepController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SheepController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntitySheep; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySheepNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ShulkerController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ShulkerController.java index 313e835c4..58b0d7ebc 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ShulkerController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ShulkerController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.EntityAIBodyControl; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityShulker; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -42,6 +43,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SilverfishController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SilverfishController.java index 7e0e6f09c..613df27f2 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SilverfishController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SilverfishController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntitySilverfish; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySilverfishNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonController.java index 336a81ced..ee9bda15a 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntitySkeleton; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonStrayController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonStrayController.java index 6a24ced4f..61743b94f 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonStrayController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonStrayController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntitySkeletonStray; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityStrayNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonWitherController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonWitherController.java index 3cda79334..e9804e57a 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonWitherController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonWitherController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntitySkeletonWither; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SlimeController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SlimeController.java index b11d6108a..fc9cc1b33 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SlimeController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SlimeController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntitySlime; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -41,6 +42,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySlimeNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SnowmanController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SnowmanController.java index b6a3739ea..6ecfb602e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SnowmanController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SnowmanController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntitySnowman; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySnowmanNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SpiderController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SpiderController.java index 15baeb9e6..8a76a85f2 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SpiderController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SpiderController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntitySpider; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySpiderNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SquidController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SquidController.java index 184caae57..e2c86cc9e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SquidController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SquidController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntitySquid; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySquidNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TropicalFishController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TropicalFishController.java index ec7dafb8a..1a895ecbe 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TropicalFishController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TropicalFishController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityTropicalFish; import net.minecraft.server.v1_13_R2.EnumHand; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.ItemStack; @@ -44,6 +45,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTropicalFishNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TurtleController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TurtleController.java index b7e13c65a..eae7d6462 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TurtleController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TurtleController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityInsentient; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityTurtle; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -42,6 +43,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTurtleNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VexController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VexController.java index bbe638a16..e27774439 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VexController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VexController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityVex; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.SoundEffect; @@ -37,6 +38,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityVexNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VillagerController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VillagerController.java index 0214e61f1..5c58df356 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VillagerController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VillagerController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_13_R2.EntityLightning; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityVillager; import net.minecraft.server.v1_13_R2.EnumHand; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.MerchantRecipe; @@ -45,6 +46,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean blockingATrade; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VindicatorController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VindicatorController.java index 75124cf1f..e53e32608 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VindicatorController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VindicatorController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityVindicator; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityVindicatorNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitchController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitchController.java index df5e3c94d..db12236b3 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitchController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitchController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityWitch; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitchNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitherController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitherController.java index 6507c4f22..9cbca5896 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitherController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitherController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityWither; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.SoundEffect; @@ -37,6 +38,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitherNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WolfController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WolfController.java index 5e7138247..5d52984a5 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WolfController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WolfController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityLiving; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityWolf; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -41,6 +42,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWolfNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieController.java index b483df4b9..974c28796 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityZombie; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieHuskController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieHuskController.java index 9d204d196..ad85fd21e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieHuskController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieHuskController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityZombieHusk; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieVillagerController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieVillagerController.java index 784f7d618..2ab865461 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieVillagerController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieVillagerController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityZombieVillager; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -39,6 +40,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/AreaEffectCloudController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/AreaEffectCloudController.java index f410c2789..6648a18f9 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/AreaEffectCloudController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/AreaEffectCloudController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityAreaEffectCloud; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -46,6 +46,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/BoatController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/BoatController.java index 7bbad4c2b..fc21a8220 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/BoatController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/BoatController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityBoat; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -46,6 +47,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBoatNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/DragonFireballController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/DragonFireballController.java index e9f8161f9..ad53acefc 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/DragonFireballController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/DragonFireballController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityDragonFireball; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -46,6 +47,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EggController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EggController.java index 4f42e9378..66056975b 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EggController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EggController.java @@ -12,13 +12,13 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityEgg; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -57,6 +57,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEggNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderCrystalController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderCrystalController.java index 6a22274b9..6cee1df25 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderCrystalController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderCrystalController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityEnderCrystal; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -46,6 +46,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderPearlController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderPearlController.java index 27396f0d0..b8637965e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderPearlController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderPearlController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityEnderPearl; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -46,6 +46,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderSignalController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderSignalController.java index 278de9168..f97a92d2a 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderSignalController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderSignalController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityEnderSignal; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -46,6 +46,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EvokerFangsController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EvokerFangsController.java index b688ae9cd..173a4641e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EvokerFangsController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EvokerFangsController.java @@ -12,7 +12,6 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; @@ -21,6 +20,7 @@ import net.minecraft.server.v1_13_R2.EntityEvokerFangs; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EnumHand; import net.minecraft.server.v1_13_R2.EnumInteractionResult; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -38,6 +38,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ExperienceOrbController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ExperienceOrbController.java index 5775fb90a..8808f24e1 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ExperienceOrbController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ExperienceOrbController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityExperienceOrb; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FallingBlockController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FallingBlockController.java index 07d4f0ae0..7fdd2e76c 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FallingBlockController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FallingBlockController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.Block; import net.minecraft.server.v1_13_R2.EntityFallingBlock; import net.minecraft.server.v1_13_R2.EnumMoveType; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -49,6 +50,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FireworkController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FireworkController.java index 120a4dbb2..346754615 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FireworkController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FireworkController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityFireworks; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFireworkNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FishingHookController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FishingHookController.java index 70568c02c..a58113a93 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FishingHookController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FishingHookController.java @@ -14,13 +14,13 @@ import com.mojang.authlib.GameProfile; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityFishingHook; import net.minecraft.server.v1_13_R2.EntityPlayer; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.PlayerInteractManager; @@ -39,6 +39,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFishingHookNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemController.java index 75e077dd0..14e395cb4 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemController.java @@ -12,7 +12,6 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; @@ -20,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityItem; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.ItemStack; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -44,6 +44,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityItemNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemFrameController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemFrameController.java index e42a872d6..07ff0213e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemFrameController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemFrameController.java @@ -12,7 +12,6 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; @@ -20,6 +19,7 @@ import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.BlockPosition; import net.minecraft.server.v1_13_R2.EntityItemFrame; import net.minecraft.server.v1_13_R2.EnumDirection; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -45,6 +45,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityItemFrameNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LargeFireballController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LargeFireballController.java index 8411d445c..5afc5d357 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LargeFireballController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LargeFireballController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityLargeFireball; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +33,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LeashController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LeashController.java index 9236a62fe..78095d7e0 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LeashController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LeashController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityLeash; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLeashNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LlamaSpitController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LlamaSpitController.java index 2f3dd5e50..6cd459ca4 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LlamaSpitController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LlamaSpitController.java @@ -12,7 +12,6 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; @@ -20,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityLlama; import net.minecraft.server.v1_13_R2.EntityLlamaSpit; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -45,6 +45,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartChestController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartChestController.java index 5e1f1400d..8f52e88c8 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartChestController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartChestController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartChest; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +33,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartCommandController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartCommandController.java index 0d9280eb4..96275a803 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartCommandController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartCommandController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartCommandBlock; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +33,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartFurnaceController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartFurnaceController.java index 296432e9d..7f48c848e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartFurnaceController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartFurnaceController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartFurnace; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +33,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartHopperController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartHopperController.java index 5e33fe638..910e25972 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartHopperController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartHopperController.java @@ -12,6 +12,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartHopper; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -28,6 +29,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartRideableController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartRideableController.java index 97a9db198..eb651823d 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartRideableController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartRideableController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartRideable; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +33,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartSpawnerController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartSpawnerController.java index b07f3890e..c5d40f277 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartSpawnerController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartSpawnerController.java @@ -12,6 +12,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartMobSpawner; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -28,6 +29,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartTNTController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartTNTController.java index abb4c5a45..d3b7715c0 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartTNTController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartTNTController.java @@ -12,6 +12,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartTNT; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -28,6 +29,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/PaintingController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/PaintingController.java index c9343846d..88e2d934d 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/PaintingController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/PaintingController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityPainting; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPaintingNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ShulkerBulletController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ShulkerBulletController.java index 6d0337bdd..dc5471d7b 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ShulkerBulletController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ShulkerBulletController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityShulkerBullet; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SmallFireballController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SmallFireballController.java index d64d1240c..f7eabca3b 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SmallFireballController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SmallFireballController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntitySmallFireball; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SnowballController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SnowballController.java index ac9638b8b..85aedb973 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SnowballController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SnowballController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntitySnowball; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySnowballNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SpectralArrowController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SpectralArrowController.java index 21589ef2f..6874608e8 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SpectralArrowController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SpectralArrowController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntitySpectralArrow; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TNTPrimedController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TNTPrimedController.java index dffe47c35..aa95743a6 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TNTPrimedController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TNTPrimedController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityTNTPrimed; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownExpBottleController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownExpBottleController.java index 9658bd553..1b10ebb7e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownExpBottleController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownExpBottleController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityThrownExpBottle; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownPotionController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownPotionController.java index 7f4d0a140..7acce4685 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownPotionController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownPotionController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityPotion; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.Items; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -33,6 +33,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownTridentController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownTridentController.java index 964b03621..c290c8d50 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownTridentController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownTridentController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityThrownTrident; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends EntityThrownTrident implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TippedArrowController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TippedArrowController.java index 619b29a70..69cb5b8de 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TippedArrowController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TippedArrowController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityTippedArrow; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/WitherSkullController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/WitherSkullController.java index a5b5f9530..d6e7fe498 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/WitherSkullController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/WitherSkullController.java @@ -10,12 +10,12 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; -import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityWitherSkull; +import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.Tag; @@ -32,6 +32,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ArmorStandController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ArmorStandController.java index 7fa0a4240..8007e35e1 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ArmorStandController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ArmorStandController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; import net.minecraft.server.v1_14_R1.EnumInteractionResult; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -52,6 +53,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityArmorStandNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BatController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BatController.java index c835285d9..b7145747d 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BatController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BatController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.EntityBat; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.SoundEffect; @@ -53,6 +54,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBatNPC(EntityTypes types, World world) { @@ -63,7 +69,7 @@ public class BatController extends MobEntityController { super(types, world); this.npc = (CitizensNPC) npc; if (npc != null) { - setFlying(false); + setAsleep(false); } } @@ -176,9 +182,5 @@ public class BatController extends MobEntityController { } return super.n(entity); } - - public void setFlying(boolean flying) { - setAsleep(flying); - } } } diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BlazeController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BlazeController.java index cfa2fa734..72119a11e 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BlazeController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BlazeController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.EntityBlaze; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.SoundEffect; @@ -53,6 +54,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CatController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CatController.java index c518681f1..4943b02ea 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CatController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CatController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityCat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -56,6 +57,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends EntityCat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCatNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CaveSpiderController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CaveSpiderController.java index 384271a9a..23b5e67ae 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CaveSpiderController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CaveSpiderController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityCaveSpider; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -55,6 +56,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ChickenController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ChickenController.java index 23979753f..eba2b2a25 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ChickenController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ChickenController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityChicken; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -56,6 +57,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CodController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CodController.java index 079790d58..b9b4e6079 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CodController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CodController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.ItemStack; @@ -60,6 +61,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends EntityCod implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCodNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CowController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CowController.java index 2578e63b8..aa0f41a3f 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CowController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CowController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.ItemStack; @@ -60,6 +61,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCowNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CreeperController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CreeperController.java index 1fea2554e..fe84874f9 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CreeperController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CreeperController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityCreeper; import net.minecraft.server.v1_14_R1.EntityLightning; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -56,6 +57,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DolphinController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DolphinController.java index fd21d5103..b51b30599 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DolphinController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DolphinController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityDolphin; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.GenericAttributes; import net.minecraft.server.v1_14_R1.IBlockData; @@ -57,6 +58,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean inProtectedTick; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DrownedController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DrownedController.java index 763dcc766..255b2664d 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DrownedController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DrownedController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityDrowned; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -55,6 +56,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EnderDragonController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EnderDragonController.java index fc2961b73..31f8480a8 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EnderDragonController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EnderDragonController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityEnderDragon; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IEntitySelector; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -58,6 +59,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermanController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermanController.java index ba78f0c0a..1bbaf8ae4 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermanController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermanController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityEnderman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -55,6 +56,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermiteController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermiteController.java index 6b8d0ca88..cb3ee7454 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermiteController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermiteController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityEndermite; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -55,6 +56,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EvokerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EvokerController.java index 5e4c01dd5..6d0ff573e 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EvokerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EvokerController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityEvoker; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/FoxController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/FoxController.java index 2912edbf8..572d8e7a5 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/FoxController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/FoxController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityFox; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends EntityFox implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GhastController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GhastController.java index 12d970a4d..553f2a49c 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GhastController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GhastController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityGhast; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.SoundEffect; @@ -39,6 +40,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GiantController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GiantController.java index e34adc35c..79abb8409 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GiantController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GiantController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityGiantZombie; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianController.java index 5aa08bde2..bf77654bc 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityGuardian; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianElderController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianElderController.java index f83a817bf..bee42a78a 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianElderController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianElderController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityGuardianElder; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseController.java index 07e80dc53..ff7eff55d 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHorse; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.GenericAttributes; import net.minecraft.server.v1_14_R1.IBlockData; @@ -52,6 +53,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseDonkeyController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseDonkeyController.java index 7046b156b..21e387f82 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseDonkeyController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseDonkeyController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHorseDonkey; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.GenericAttributes; import net.minecraft.server.v1_14_R1.IBlockData; @@ -52,6 +53,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseMuleController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseMuleController.java index 17950c3c8..9b80ef498 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseMuleController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseMuleController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHorseMule; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.GenericAttributes; import net.minecraft.server.v1_14_R1.IBlockData; @@ -52,6 +53,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseSkeletonController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseSkeletonController.java index f522521d3..e8ec942a0 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseSkeletonController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseSkeletonController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHorseSkeleton; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.GenericAttributes; import net.minecraft.server.v1_14_R1.IBlockData; @@ -52,6 +53,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseZombieController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseZombieController.java index cbed983fd..27767e69b 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseZombieController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseZombieController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHorseZombie; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.GenericAttributes; import net.minecraft.server.v1_14_R1.IBlockData; @@ -52,6 +53,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IllusionerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IllusionerController.java index be6776b08..17e7d1642 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IllusionerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IllusionerController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityIllagerIllusioner; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IronGolemController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IronGolemController.java index 0f4e24152..456697742 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IronGolemController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IronGolemController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityIronGolem; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/LlamaController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/LlamaController.java index bc26246cc..556bb3130 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/LlamaController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/LlamaController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityLlama; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.GenericAttributes; import net.minecraft.server.v1_14_R1.IBlockData; @@ -52,6 +53,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MagmaCubeController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MagmaCubeController.java index b0055c967..5e3da1b6d 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MagmaCubeController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MagmaCubeController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMagmaCube; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -43,6 +44,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMagmaCubeNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MushroomCowController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MushroomCowController.java index 3a808a944..2bdf54f24 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MushroomCowController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MushroomCowController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityMushroomCow; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -44,6 +45,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/OcelotController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/OcelotController.java index 4e812a172..49c8a772f 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/OcelotController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/OcelotController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityOcelot; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PandaController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PandaController.java index b97c2d9d1..7f8c4b05c 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PandaController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PandaController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityPanda; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends EntityPanda implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ParrotController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ParrotController.java index 0099df27e..6b6e613aa 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ParrotController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ParrotController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityParrot; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.SoundEffect; @@ -41,6 +42,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PhantomController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PhantomController.java index 6a47e4eab..bf0518d68 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PhantomController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PhantomController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityPhantom; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumDifficulty; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -44,6 +45,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPhantomNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigController.java index a6bd280b9..48d588db3 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_14_R1.EntityLightning; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityPig; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -43,6 +44,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPigNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigZombieController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigZombieController.java index a7d4db025..1c8d0a6e5 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigZombieController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigZombieController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityPigZombie; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PillagerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PillagerController.java index 1701a55b8..8c89d36e2 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PillagerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PillagerController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityPillager; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends EntityPillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PolarBearController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PolarBearController.java index a3f694238..29d7f6dcc 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PolarBearController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PolarBearController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityPolarBear; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.SoundEffect; @@ -40,6 +41,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PufferFishController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PufferFishController.java index 5e4feccd7..dcd017635 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PufferFishController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PufferFishController.java @@ -28,6 +28,7 @@ import net.minecraft.server.v1_14_R1.EntityPufferFish; import net.minecraft.server.v1_14_R1.EntitySize; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.ItemStack; @@ -49,6 +50,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPufferFishNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RabbitController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RabbitController.java index 8877fbfd9..0e316f68b 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RabbitController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RabbitController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_14_R1.EntityLiving; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityRabbit; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -43,6 +44,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RavagerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RavagerController.java index 16f46745a..ec472ada1 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RavagerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RavagerController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityRavager; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends EntityRavager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SalmonController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SalmonController.java index cdd48e7b2..47747c4e1 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SalmonController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SalmonController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntitySalmon; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.ItemStack; @@ -46,6 +47,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySalmonNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SheepController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SheepController.java index 37bdd034a..4adf8a5fd 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SheepController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SheepController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntitySheep; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ShulkerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ShulkerController.java index cdca25f80..acf72e148 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ShulkerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ShulkerController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityShulker; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SilverfishController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SilverfishController.java index ec977b959..8cbb71e03 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SilverfishController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SilverfishController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntitySilverfish; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonController.java index 3b2109bc8..1477942ec 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntitySkeleton; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonStrayController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonStrayController.java index 73101ce83..83c7bfc53 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonStrayController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonStrayController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntitySkeletonStray; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonWitherController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonWitherController.java index 3bfa95822..adb8e4322 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonWitherController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonWitherController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntitySkeletonWither; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SlimeController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SlimeController.java index 3cacf85e7..ec7512f7a 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SlimeController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SlimeController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntitySlime; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -43,6 +44,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySlimeNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SnowmanController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SnowmanController.java index 8cab4763f..6ababb378 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SnowmanController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SnowmanController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntitySnowman; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SpiderController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SpiderController.java index c8b918a12..9605f3210 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SpiderController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SpiderController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntitySpider; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SquidController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SquidController.java index 9fc24f7e8..d495def6c 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SquidController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SquidController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntitySquid; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TraderLlamaController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TraderLlamaController.java index 71d6b0f4c..af6578173 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TraderLlamaController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TraderLlamaController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityLlamaTrader; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -52,6 +53,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends EntityLlamaTrader implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TropicalFishController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TropicalFishController.java index 5ffec3881..9e8d35e2e 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TropicalFishController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TropicalFishController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTropicalFish; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.ItemStack; @@ -46,6 +47,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTropicalFishNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TurtleController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TurtleController.java index feacbef24..4d82daefa 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TurtleController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TurtleController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.EntityInsentient; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTurtle; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -44,6 +45,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTurtleNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VexController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VexController.java index e8ff2bc70..1401e4780 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VexController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VexController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityVex; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.SoundEffect; @@ -39,6 +40,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityVexNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VillagerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VillagerController.java index 8ffe1147d..05a8bb8eb 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VillagerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VillagerController.java @@ -30,6 +30,7 @@ import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityVillager; import net.minecraft.server.v1_14_R1.EnumHand; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.MerchantRecipe; @@ -50,6 +51,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private TreeMap behaviorMap; private boolean blockingATrade; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VindicatorController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VindicatorController.java index c270f5432..f94e309fd 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VindicatorController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VindicatorController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityVindicator; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WanderingTraderController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WanderingTraderController.java index 0fa6e788e..d8320bf3f 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WanderingTraderController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WanderingTraderController.java @@ -30,6 +30,7 @@ import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityVillagerTrader; import net.minecraft.server.v1_14_R1.EnumHand; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.MerchantRecipe; @@ -50,6 +51,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends EntityVillagerTrader implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private TreeMap behaviorMap; private boolean blockingATrade; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitchController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitchController.java index f1ec48b9c..1d3f7ad3c 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitchController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitchController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityWitch; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitherController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitherController.java index 0956d5b72..315955bd7 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitherController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitherController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityWither; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.SoundEffect; @@ -39,6 +40,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WolfController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WolfController.java index 3f1a28ce9..ff4ed9b9e 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WolfController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WolfController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.EntityLiving; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityWolf; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -44,6 +45,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieController.java index 2ee138432..7e8b8b31a 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityZombie; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieHuskController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieHuskController.java index 039f6bf34..6758e6267 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieHuskController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieHuskController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityZombieHusk; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieVillagerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieVillagerController.java index 7ea258b9a..4ff28eb65 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieVillagerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieVillagerController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityZombieVillager; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/AreaEffectCloudController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/AreaEffectCloudController.java index 2134fbfb3..0052e47f7 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/AreaEffectCloudController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityAreaEffectCloud; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -48,6 +49,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/BoatController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/BoatController.java index 2d1e27966..651a52061 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/BoatController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/BoatController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -48,6 +49,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBoatNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/DragonFireballController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/DragonFireballController.java index a0a90c966..0ac070dc6 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/DragonFireballController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/DragonFireballController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityDragonFireball; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -48,6 +49,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EggController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EggController.java index e3cb9e5f8..88c6416f4 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EggController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EggController.java @@ -20,6 +20,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityEgg; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -59,6 +60,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEggNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderCrystalController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderCrystalController.java index 119e3e113..fec2db413 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderCrystalController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityEnderCrystal; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -48,6 +49,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderPearlController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderPearlController.java index 87f3a9529..a6dd91d36 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderPearlController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderPearlController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityEnderPearl; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -48,6 +49,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderSignalController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderSignalController.java index 5e3145d1d..5516f1036 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderSignalController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderSignalController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityEnderSignal; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -48,6 +49,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EvokerFangsController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EvokerFangsController.java index 42a1460be..baa42e8dc 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EvokerFangsController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EvokerFangsController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; import net.minecraft.server.v1_14_R1.EnumInteractionResult; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -39,6 +40,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ExperienceOrbController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ExperienceOrbController.java index 99a585b76..a9c8f69fa 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ExperienceOrbController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityExperienceOrb; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FallingBlockController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FallingBlockController.java index a2a4c913e..82acb6ca1 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FallingBlockController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FallingBlockController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.Block; import net.minecraft.server.v1_14_R1.EntityFallingBlock; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumMoveType; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -51,6 +52,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FireworkController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FireworkController.java index 32f68e215..a566b3702 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FireworkController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FireworkController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityFireworks; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FishingHookController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FishingHookController.java index c6a7c32b4..60837319f 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FishingHookController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FishingHookController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityFishingHook; import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.ItemStack; import net.minecraft.server.v1_14_R1.Items; @@ -45,6 +46,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemController.java index 1468404e2..43b82e786 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityItem; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.ItemStack; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -46,6 +47,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityItemNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemFrameController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemFrameController.java index 5e2f95914..5ce2c411b 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemFrameController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemFrameController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.BlockPosition; import net.minecraft.server.v1_14_R1.EntityItemFrame; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumDirection; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -47,6 +48,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LargeFireballController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LargeFireballController.java index d023c5293..a5179e6bc 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LargeFireballController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LargeFireballController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityLargeFireball; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LeashController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LeashController.java index b1e7243d0..80f794ba9 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LeashController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LeashController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityLeash; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LlamaSpitController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LlamaSpitController.java index 23ff27520..470eb539b 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LlamaSpitController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LlamaSpitController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityLlama; import net.minecraft.server.v1_14_R1.EntityLlamaSpit; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -48,6 +49,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartChestController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartChestController.java index 546867f3f..79c2c6646 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartChestController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartChestController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartChest; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartCommandController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartCommandController.java index 8d0be2044..4781b8c46 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartCommandController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartCommandBlock; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartFurnaceController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartFurnaceController.java index 617f5bb94..df7790827 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartFurnaceController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartFurnace; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartHopperController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartHopperController.java index 60cc166ec..1917f897a 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartHopperController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartHopper; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -30,6 +31,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartRideableController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartRideableController.java index 6c41ad9b8..d6d2e610b 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartRideableController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartRideable; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartSpawnerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartSpawnerController.java index 5e9a7fa57..c93fa9b25 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartSpawnerController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartMobSpawner; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -30,6 +31,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartTNTController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartTNTController.java index 848044027..f25bdd001 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartTNTController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartTNT; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -30,6 +31,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/PaintingController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/PaintingController.java index df0cda166..07a490a52 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/PaintingController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/PaintingController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityPainting; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ShulkerBulletController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ShulkerBulletController.java index 90b096aec..6b80786e0 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ShulkerBulletController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityShulkerBullet; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SmallFireballController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SmallFireballController.java index ad179f1e4..a70341bd5 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SmallFireballController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SmallFireballController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntitySmallFireball; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SnowballController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SnowballController.java index 64eb2189b..361ccd4e0 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SnowballController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SnowballController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntitySnowball; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SpectralArrowController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SpectralArrowController.java index e112ca88f..ebbee4f99 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SpectralArrowController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntitySpectralArrow; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TNTPrimedController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TNTPrimedController.java index 51cbb7155..25bae6e2d 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TNTPrimedController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityTNTPrimed; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownExpBottleController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownExpBottleController.java index 79ec84601..e4a5e8fa7 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownExpBottleController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityThrownExpBottle; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownPotionController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownPotionController.java index 944655485..8740113b5 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownPotionController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityPotion; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.Items; import net.minecraft.server.v1_14_R1.NBTTagCompound; @@ -35,6 +36,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownTridentController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownTridentController.java index 5d98f050e..c6af06079 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownTridentController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownTridentController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityThrownTrident; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends EntityThrownTrident implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TippedArrowController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TippedArrowController.java index 13e41b9e5..6419b2166 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TippedArrowController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TippedArrowController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityTippedArrow; import net.minecraft.server.v1_14_R1.EntityTypes; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/WitherSkullController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/WitherSkullController.java index 9df15360c..45916d438 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/WitherSkullController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/WitherSkullController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityWitherSkull; +import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; import net.minecraft.server.v1_14_R1.NBTTagCompound; import net.minecraft.server.v1_14_R1.Tag; @@ -34,6 +35,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ArmorStandController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ArmorStandController.java index dbc292091..6e69a0bb2 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ArmorStandController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ArmorStandController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; import net.minecraft.server.v1_15_R1.EnumInteractionResult; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -45,6 +46,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityArmorStandNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BatController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BatController.java index 66c239fb2..71455a165 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BatController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BatController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.EntityBat; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.SoundEffect; @@ -46,6 +47,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBatNPC(EntityTypes types, World world) { @@ -56,7 +62,7 @@ public class BatController extends MobEntityController { super(types, world); this.npc = (CitizensNPC) npc; if (npc != null) { - setFlying(false); + setAsleep(false); } } @@ -172,9 +178,5 @@ public class BatController extends MobEntityController { } return super.n(entity); } - - public void setFlying(boolean flying) { - setAsleep(flying); - } } } diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BeeController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BeeController.java index 4d1bdf813..d11df32c6 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BeeController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BeeController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.EntityBee; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.SoundEffect; @@ -46,6 +47,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends EntityBee implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BlazeController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BlazeController.java index 4da710527..af43ba145 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BlazeController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BlazeController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.EntityBlaze; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.SoundEffect; @@ -46,6 +47,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CatController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CatController.java index bf31ee820..4fe851cbb 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CatController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CatController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityCat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -49,6 +50,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends EntityCat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCatNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CaveSpiderController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CaveSpiderController.java index 5a5110bfc..2e1a70505 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CaveSpiderController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CaveSpiderController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityCaveSpider; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -48,6 +49,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ChickenController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ChickenController.java index 139842e55..5c6f06e04 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ChickenController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ChickenController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityChicken; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -49,6 +50,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CodController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CodController.java index 772ca9f11..e7829941f 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CodController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CodController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.ItemStack; @@ -54,6 +55,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends EntityCod implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CowController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CowController.java index c45c87ab2..95646e665 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CowController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CowController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.ItemStack; @@ -53,6 +54,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCowNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CreeperController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CreeperController.java index 7265fafaa..823610ae3 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CreeperController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CreeperController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityCreeper; import net.minecraft.server.v1_15_R1.EntityLightning; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -49,6 +50,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DolphinController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DolphinController.java index 5f5f2ae78..35b5c7535 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DolphinController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DolphinController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityDolphin; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.GenericAttributes; import net.minecraft.server.v1_15_R1.IBlockData; @@ -51,6 +52,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean inProtectedTick; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DrownedController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DrownedController.java index bca18153b..7b09dcaa1 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DrownedController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DrownedController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityDrowned; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -48,6 +49,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EnderDragonController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EnderDragonController.java index a18153279..8b613f60a 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EnderDragonController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EnderDragonController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityEnderDragon; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IEntitySelector; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -52,6 +53,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermanController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermanController.java index 128a6b1ac..936f78f24 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermanController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermanController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityEnderman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -48,6 +49,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermiteController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermiteController.java index 5edda40cf..ccdd93d44 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermiteController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermiteController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityEndermite; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -48,6 +49,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EvokerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EvokerController.java index 3bf3bc623..710ec725c 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EvokerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EvokerController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityEvoker; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/FoxController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/FoxController.java index 08abd26ef..74b8eacb0 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/FoxController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/FoxController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityFox; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -43,6 +44,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends EntityFox implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GhastController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GhastController.java index b70566d80..1a8169d85 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GhastController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GhastController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityGhast; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.SoundEffect; @@ -40,6 +41,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GiantController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GiantController.java index 5d4deaac5..04a261469 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GiantController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GiantController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityGiantZombie; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianController.java index b839cdc37..f7a789b5c 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityGuardian; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianElderController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianElderController.java index 8b5611772..ba7885ad2 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianElderController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianElderController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityGuardianElder; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseController.java index 9ed594da4..cb72795b3 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHorse; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.GenericAttributes; import net.minecraft.server.v1_15_R1.IBlockData; @@ -53,6 +54,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseDonkeyController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseDonkeyController.java index 50e1dc0ab..43187bba1 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseDonkeyController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseDonkeyController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHorseDonkey; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.GenericAttributes; import net.minecraft.server.v1_15_R1.IBlockData; @@ -53,6 +54,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseMuleController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseMuleController.java index 0d0d936bf..ec0fd2a64 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseMuleController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseMuleController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHorseMule; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.GenericAttributes; import net.minecraft.server.v1_15_R1.IBlockData; @@ -53,6 +54,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseSkeletonController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseSkeletonController.java index 95dcbbcb9..700723fc2 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseSkeletonController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseSkeletonController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHorseSkeleton; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.GenericAttributes; import net.minecraft.server.v1_15_R1.IBlockData; @@ -53,6 +54,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseZombieController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseZombieController.java index 06c80a6e0..e4260fb36 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseZombieController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseZombieController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHorseZombie; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.GenericAttributes; import net.minecraft.server.v1_15_R1.IBlockData; @@ -53,6 +54,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IllusionerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IllusionerController.java index 8e3ba3945..c663b702e 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IllusionerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IllusionerController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityIllagerIllusioner; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IronGolemController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IronGolemController.java index 569ec49f3..43383a8ee 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IronGolemController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IronGolemController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityIronGolem; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/LlamaController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/LlamaController.java index 7a8edba2f..5069008ec 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/LlamaController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/LlamaController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityLlama; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.GenericAttributes; import net.minecraft.server.v1_15_R1.IBlockData; @@ -53,6 +54,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MagmaCubeController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MagmaCubeController.java index ea9ba2f87..c01597b90 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MagmaCubeController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MagmaCubeController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMagmaCube; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -45,6 +46,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MushroomCowController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MushroomCowController.java index 154f4f5be..cea749f29 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MushroomCowController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MushroomCowController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityMushroomCow; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -45,6 +46,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/OcelotController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/OcelotController.java index 15417aa95..75b8e453a 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/OcelotController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/OcelotController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityOcelot; import net.minecraft.server.v1_15_R1.EntityPose; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -44,6 +45,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PandaController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PandaController.java index 9be788327..7f279e34e 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PandaController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PandaController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityPanda; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -43,6 +44,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends EntityPanda implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ParrotController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ParrotController.java index c086d728a..a7556390c 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ParrotController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ParrotController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityParrot; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.SoundEffect; @@ -42,6 +43,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PhantomController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PhantomController.java index 6b7c11fc3..e8f04709f 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PhantomController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PhantomController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityPhantom; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -45,6 +46,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerLook oldLookController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigController.java index 84c8ae7dd..e735e7cd9 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_15_R1.EntityLightning; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityPig; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -44,6 +45,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPigNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigZombieController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigZombieController.java index 29edb8539..c4254b90a 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigZombieController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigZombieController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityPigZombie; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PillagerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PillagerController.java index bac6971c2..1fe081302 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PillagerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PillagerController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityPillager; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -43,6 +44,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends EntityPillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PolarBearController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PolarBearController.java index ff8b76ca6..be3607804 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PolarBearController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PolarBearController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityPolarBear; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.SoundEffect; @@ -41,6 +42,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PufferFishController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PufferFishController.java index 1f6ed61d6..120083afd 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PufferFishController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PufferFishController.java @@ -30,6 +30,7 @@ import net.minecraft.server.v1_15_R1.EntityPufferFish; import net.minecraft.server.v1_15_R1.EntitySize; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.ItemStack; @@ -51,6 +52,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RabbitController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RabbitController.java index 7d1952af2..dde919ef6 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RabbitController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RabbitController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_15_R1.EntityLiving; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityRabbit; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -44,6 +45,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RavagerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RavagerController.java index cf00dbfb6..0ddb208fa 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RavagerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RavagerController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityRavager; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -43,6 +44,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends EntityRavager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SalmonController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SalmonController.java index 4e0ea6ea1..14f14dd74 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SalmonController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SalmonController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntitySalmon; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.ItemStack; @@ -48,6 +49,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SheepController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SheepController.java index 082fb456c..1a4a3e366 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SheepController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SheepController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntitySheep; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -43,6 +44,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ShulkerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ShulkerController.java index f7dd97107..c3b306494 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ShulkerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ShulkerController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityShulker; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -43,6 +44,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SilverfishController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SilverfishController.java index 1ed557e2b..84c19f36a 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SilverfishController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SilverfishController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntitySilverfish; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonController.java index d4f0cd57e..4d424882d 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntitySkeleton; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonStrayController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonStrayController.java index e08d828b9..75286a8d6 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonStrayController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonStrayController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntitySkeletonStray; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonWitherController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonWitherController.java index 23e5610d9..d61887eb2 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonWitherController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonWitherController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntitySkeletonWither; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SlimeController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SlimeController.java index b23430ae1..81917cf92 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SlimeController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SlimeController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntitySlime; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -45,6 +46,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SnowmanController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SnowmanController.java index ec8e53d45..7e891d263 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SnowmanController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SnowmanController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntitySnowman; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SpiderController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SpiderController.java index 7f5597c12..b672e99b9 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SpiderController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SpiderController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntitySpider; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SquidController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SquidController.java index 53e93b926..4296fb1d7 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SquidController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SquidController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntitySquid; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TraderLlamaController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TraderLlamaController.java index 6c2267910..e0aedaa7f 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TraderLlamaController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TraderLlamaController.java @@ -28,6 +28,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityLlamaTrader; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -53,6 +54,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends EntityLlamaTrader implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TropicalFishController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TropicalFishController.java index 5dee81b79..498560ade 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TropicalFishController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TropicalFishController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTropicalFish; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.ItemStack; @@ -48,6 +49,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TurtleController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TurtleController.java index c3f9ae75e..653de516f 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TurtleController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TurtleController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.EntityInsentient; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTurtle; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -46,6 +47,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerJump oldJumpController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VexController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VexController.java index ccbc7bdae..9c844d51d 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VexController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VexController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityVex; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.SoundEffect; @@ -40,6 +41,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityVexNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VillagerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VillagerController.java index 9fb4a81af..f33072ea5 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VillagerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VillagerController.java @@ -29,6 +29,7 @@ import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityVillager; import net.minecraft.server.v1_15_R1.EnumHand; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.GenericAttributes; import net.minecraft.server.v1_15_R1.IBlockData; @@ -50,6 +51,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean blockingATrade; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VindicatorController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VindicatorController.java index 439b472ef..4c7c12eba 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VindicatorController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VindicatorController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityVindicator; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -43,6 +44,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WanderingTraderController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WanderingTraderController.java index 90c795ef1..af97b7815 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WanderingTraderController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WanderingTraderController.java @@ -30,6 +30,7 @@ import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityVillagerTrader; import net.minecraft.server.v1_15_R1.EnumHand; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.MerchantRecipe; @@ -50,6 +51,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends EntityVillagerTrader implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean blockingATrade; private boolean blockTrades = true; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitchController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitchController.java index e75aef0e7..7ba66f6ee 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitchController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitchController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityWitch; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -41,6 +42,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitherController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitherController.java index b119fc6ba..6ccb09831 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitherController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitherController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityWither; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.SoundEffect; @@ -40,6 +41,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WolfController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WolfController.java index 46e153ab2..b3d51ef97 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WolfController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WolfController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.EntityLiving; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityWolf; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -45,6 +46,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieController.java index c95b27d59..664cbf871 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityZombie; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieHuskController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieHuskController.java index bcbe0a090..bf70be9cb 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieHuskController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieHuskController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityZombieHusk; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieVillagerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieVillagerController.java index 97fb2b744..4bf0e6efc 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieVillagerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieVillagerController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityZombieVillager; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -42,6 +43,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/AreaEffectCloudController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/AreaEffectCloudController.java index a874dc493..cf17c5c27 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/AreaEffectCloudController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityAreaEffectCloud; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -41,6 +42,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/BoatController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/BoatController.java index 8ffffc10c..769f9b8d4 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/BoatController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/BoatController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumMoveType; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.Fluid; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.MathHelper; @@ -47,6 +48,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double aD; private float aE; private EnumStatus aF; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/DragonFireballController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/DragonFireballController.java index 97ce24339..695e06ca2 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/DragonFireballController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/DragonFireballController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityDragonFireball; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -41,6 +42,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EggController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EggController.java index a77e366f0..6d8dd06f6 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EggController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EggController.java @@ -21,6 +21,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityEgg; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -52,6 +53,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEggNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderCrystalController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderCrystalController.java index f8ac779e5..9711bddbc 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderCrystalController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityEnderCrystal; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -41,6 +42,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderPearlController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderPearlController.java index 2145a3379..cb0b168e1 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderPearlController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderPearlController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityEnderPearl; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -41,6 +42,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderSignalController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderSignalController.java index ffa1c1884..55dee020f 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderSignalController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderSignalController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityEnderSignal; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -41,6 +42,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EvokerFangsController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EvokerFangsController.java index e8c8d3a90..a5cd69427 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EvokerFangsController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EvokerFangsController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; import net.minecraft.server.v1_15_R1.EnumInteractionResult; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -40,6 +41,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ExperienceOrbController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ExperienceOrbController.java index 17372fb10..7de5f2f6b 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ExperienceOrbController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityExperienceOrb; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FallingBlockController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FallingBlockController.java index 26c0291ed..b63b54a27 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FallingBlockController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FallingBlockController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.Block; import net.minecraft.server.v1_15_R1.EntityFallingBlock; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumMoveType; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -51,6 +52,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FireworkController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FireworkController.java index 4c1538ba3..4a0ed959c 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FireworkController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FireworkController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityFireworks; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FishingHookController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FishingHookController.java index d5f9da47b..1fb8ff6ab 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FishingHookController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FishingHookController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityFishingHook; import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.ItemStack; import net.minecraft.server.v1_15_R1.Items; @@ -46,6 +47,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemController.java index ae5320ba1..35dba99a8 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityItem; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.ItemStack; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -46,6 +47,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityItemNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemFrameController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemFrameController.java index a246e3c63..4a7c7d2a3 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemFrameController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemFrameController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.BlockPosition; import net.minecraft.server.v1_15_R1.EntityItemFrame; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumDirection; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -47,6 +48,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LargeFireballController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LargeFireballController.java index e01ae171b..4b7bd2bc5 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LargeFireballController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LargeFireballController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityLargeFireball; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LeashController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LeashController.java index 64ea31b47..47f98ae16 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LeashController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LeashController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityLeash; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LlamaSpitController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LlamaSpitController.java index d5994d578..025a4ede7 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LlamaSpitController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LlamaSpitController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityLlama; import net.minecraft.server.v1_15_R1.EntityLlamaSpit; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -49,6 +50,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartChestController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartChestController.java index 687e0d478..52952bffb 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartChestController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartChestController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartChest; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartCommandController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartCommandController.java index 8d18d2deb..cb4f91f60 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartCommandController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartCommandBlock; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartFurnaceController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartFurnaceController.java index 1aaab347f..133a0d654 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartFurnaceController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartFurnace; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartHopperController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartHopperController.java index 7ef17d382..77bd6d1a5 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartHopperController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartHopper; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -30,6 +31,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartRideableController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartRideableController.java index 07b02dc2e..0b6ef00e9 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartRideableController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartRideable; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartSpawnerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartSpawnerController.java index d70938ba8..97111fbec 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartSpawnerController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartMobSpawner; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -30,6 +31,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartTNTController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartTNTController.java index 3cee848d1..9433dff00 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartTNTController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartTNT; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -30,6 +31,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/PaintingController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/PaintingController.java index 732860665..d92748d37 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/PaintingController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/PaintingController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityPainting; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ShulkerBulletController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ShulkerBulletController.java index 73780258d..754ee0916 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ShulkerBulletController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityShulkerBullet; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SmallFireballController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SmallFireballController.java index a98bb4488..42152bb7c 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SmallFireballController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SmallFireballController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntitySmallFireball; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SnowballController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SnowballController.java index 3a9a46e51..3de143c72 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SnowballController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SnowballController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntitySnowball; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SpectralArrowController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SpectralArrowController.java index 9885085d8..a6847b766 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SpectralArrowController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntitySpectralArrow; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TNTPrimedController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TNTPrimedController.java index 043118626..b17dd7d37 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TNTPrimedController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityTNTPrimed; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownExpBottleController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownExpBottleController.java index 5de4b5a7e..8ff8bd685 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownExpBottleController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityThrownExpBottle; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownPotionController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownPotionController.java index 16279ada9..3288b27e8 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownPotionController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityPotion; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.Items; import net.minecraft.server.v1_15_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownTridentController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownTridentController.java index 9123fbb0c..7c52a2731 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownTridentController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownTridentController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityThrownTrident; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends EntityThrownTrident implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TippedArrowController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TippedArrowController.java index 31be8c930..64cf9c263 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TippedArrowController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TippedArrowController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityTippedArrow; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/WitherSkullController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/WitherSkullController.java index e6d2cda08..c05724226 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/WitherSkullController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/WitherSkullController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityWitherSkull; +import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.Tag; @@ -35,6 +36,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BatController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BatController.java index a45506fe0..838fde993 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BatController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BatController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.EntityBat; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; @@ -46,6 +47,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBatNPC(EntityTypes types, World world) { @@ -56,7 +62,7 @@ public class BatController extends MobEntityController { super(types, world); this.npc = (CitizensNPC) npc; if (npc != null) { - setFlying(false); + setAsleep(false); } } @@ -172,9 +178,5 @@ public class BatController extends MobEntityController { } return super.n(entity); } - - public void setFlying(boolean flying) { - setAsleep(flying); - } } } diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BeeController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BeeController.java index 2f78a53d9..e45132e43 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BeeController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BeeController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.EntityBee; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; @@ -46,6 +47,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends EntityBee implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BlazeController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BlazeController.java index dfbe2a69b..a70842281 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BlazeController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BlazeController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.EntityBlaze; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; @@ -46,6 +47,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CatController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CatController.java index a805a8ea0..322926d20 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CatController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CatController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityCat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -49,6 +50,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends EntityCat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCatNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CaveSpiderController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CaveSpiderController.java index 24a105e7c..6cb7a253a 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CaveSpiderController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CaveSpiderController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityCaveSpider; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -48,6 +49,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ChickenController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ChickenController.java index 574a5f8b4..1899ae4b0 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ChickenController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ChickenController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityChicken; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -49,6 +50,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CodController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CodController.java index c2e737c25..3ec11140c 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CodController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CodController.java @@ -28,6 +28,7 @@ import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.ItemStack; @@ -55,6 +56,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends EntityCod implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CowController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CowController.java index a8d2f2b05..b49988576 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CowController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CowController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.ItemStack; @@ -54,6 +55,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityCowNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CreeperController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CreeperController.java index cb1f4a68f..d168766b3 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CreeperController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CreeperController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityCreeper; import net.minecraft.server.v1_16_R3.EntityLightning; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -50,6 +51,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DolphinController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DolphinController.java index 28bcc246d..0109454d6 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DolphinController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DolphinController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityDolphin; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; @@ -51,6 +52,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean inProtectedTick; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DrownedController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DrownedController.java index ee76f5096..c861630aa 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DrownedController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DrownedController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityDrowned; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -48,6 +49,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EnderDragonController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EnderDragonController.java index 85de75525..9529f5d49 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EnderDragonController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EnderDragonController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityEnderDragon; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IEntitySelector; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -52,6 +53,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermanController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermanController.java index d0e573cd3..cab4fdac9 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermanController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermanController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityEnderman; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -48,6 +49,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermiteController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermiteController.java index 5367c38f5..d4da0c2c8 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermiteController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermiteController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityEndermite; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -48,6 +49,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EvokerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EvokerController.java index c6f6dbb72..1b4a6cf1b 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EvokerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EvokerController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityEvoker; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/FoxController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/FoxController.java index 97fec4d66..d3ab37713 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/FoxController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/FoxController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityFox; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -43,6 +44,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends EntityFox implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GhastController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GhastController.java index 9f2f113a8..637c4791a 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GhastController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GhastController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityGhast; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; @@ -40,6 +41,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GiantController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GiantController.java index 734eb362d..e47cf57ef 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GiantController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GiantController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityGiantZombie; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianController.java index 99aa76f09..63ef77676 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityGuardian; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianElderController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianElderController.java index b0d28c241..904c7cdfe 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianElderController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianElderController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityGuardianElder; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HoglinController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HoglinController.java index 6114e65a5..33f6351ec 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HoglinController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HoglinController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHoglin; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends EntityHoglin implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityHoglinNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseController.java index efed6b710..53a09d925 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHorse; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; @@ -53,6 +54,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseDonkeyController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseDonkeyController.java index df3cb065a..18016591f 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseDonkeyController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseDonkeyController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHorseDonkey; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; @@ -53,6 +54,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseMuleController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseMuleController.java index be095aff8..2166e1d18 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseMuleController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseMuleController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHorseMule; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; @@ -53,6 +54,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseSkeletonController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseSkeletonController.java index ada071955..213ec261f 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseSkeletonController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseSkeletonController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHorseSkeleton; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; @@ -53,6 +54,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseZombieController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseZombieController.java index f826ff7af..0e223734e 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseZombieController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseZombieController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHorseZombie; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; @@ -53,6 +54,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IllusionerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IllusionerController.java index f8624a6cf..0bd4a1dc1 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IllusionerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IllusionerController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityIllagerIllusioner; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IronGolemController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IronGolemController.java index 9357480c7..d0e1d86ad 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IronGolemController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IronGolemController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityIronGolem; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/LlamaController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/LlamaController.java index a4328f568..72cc2ba33 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/LlamaController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/LlamaController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityLlama; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; @@ -53,6 +54,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MagmaCubeController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MagmaCubeController.java index aed41db23..e85436033 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MagmaCubeController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MagmaCubeController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityMagmaCube; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -45,6 +46,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MushroomCowController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MushroomCowController.java index cd516dd21..74441e032 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MushroomCowController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MushroomCowController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityMushroomCow; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -46,6 +47,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/OcelotController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/OcelotController.java index e9b680540..0c1ea86cc 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/OcelotController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/OcelotController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityOcelot; import net.minecraft.server.v1_16_R3.EntityPose; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -44,6 +45,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PandaController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PandaController.java index bb1627980..ac9cfbc1b 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PandaController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PandaController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPanda; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -43,6 +44,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends EntityPanda implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ParrotController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ParrotController.java index 9b2c821e6..2dcf7680e 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ParrotController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ParrotController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_16_R3.EntityParrot; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; @@ -43,6 +44,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PhantomController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PhantomController.java index c0001dfa8..c38faf38e 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PhantomController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PhantomController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPhantom; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -46,6 +47,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerLook oldLookController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigController.java index 943c5aeee..cbe47a639 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_16_R3.EntityLightning; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPig; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -45,6 +46,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPigNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigZombieController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigZombieController.java index 872ab2811..76287d8eb 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigZombieController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigZombieController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPigZombie; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinBruteController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinBruteController.java index 29e5d58a1..37f7b63ea 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinBruteController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinBruteController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPiglinBrute; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends EntityPiglinBrute implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinController.java index 1801e0a23..b3c1fb97d 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPiglin; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends EntityPiglin implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPiglinNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PillagerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PillagerController.java index 7a8a58468..d3dd3a67a 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PillagerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PillagerController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPillager; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -43,6 +44,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends EntityPillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PolarBearController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PolarBearController.java index 76d100034..2bb79f670 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PolarBearController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PolarBearController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPolarBear; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; @@ -41,6 +42,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PufferFishController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PufferFishController.java index c432d5015..0469aa921 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PufferFishController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PufferFishController.java @@ -31,6 +31,7 @@ import net.minecraft.server.v1_16_R3.EntitySize; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.ItemStack; @@ -52,6 +53,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RabbitController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RabbitController.java index 38870d598..3c164d5de 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RabbitController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RabbitController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_16_R3.EntityLiving; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityRabbit; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -44,6 +45,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RavagerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RavagerController.java index d1f9ef77f..474e1acb2 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RavagerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RavagerController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityRavager; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -43,6 +44,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends EntityRavager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SalmonController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SalmonController.java index 3e1e37f92..b0c969fe6 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SalmonController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SalmonController.java @@ -28,6 +28,7 @@ import net.minecraft.server.v1_16_R3.EntitySalmon; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.ItemStack; @@ -49,6 +50,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SheepController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SheepController.java index e59c3014e..881598296 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SheepController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SheepController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntitySheep; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -43,6 +44,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ShulkerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ShulkerController.java index 222c75634..0ad54ea8d 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ShulkerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ShulkerController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityShulker; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -43,6 +44,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SilverfishController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SilverfishController.java index 0aa79b3a8..7acc7bb9e 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SilverfishController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SilverfishController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntitySilverfish; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonController.java index 985d30f38..36e716864 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntitySkeleton; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonStrayController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonStrayController.java index e8a1846fa..7ceacf3af 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonStrayController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonStrayController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntitySkeletonStray; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonWitherController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonWitherController.java index 2ae8fa0a9..4ac432893 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonWitherController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonWitherController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntitySkeletonWither; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SlimeController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SlimeController.java index 372ee0562..e3b5aa39a 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SlimeController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SlimeController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntitySlime; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -45,6 +46,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SnowmanController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SnowmanController.java index 68fa341b9..0f4817f1d 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SnowmanController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SnowmanController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntitySnowman; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SpiderController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SpiderController.java index bbb6fde55..1a13ecdee 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SpiderController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SpiderController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntitySpider; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SquidController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SquidController.java index 29d03973b..0bdc5dcb8 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SquidController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SquidController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntitySquid; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/StriderController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/StriderController.java index 7b9ba88ef..253b198eb 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/StriderController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/StriderController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityStrider; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends EntityStrider implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityStriderNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TraderLlamaController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TraderLlamaController.java index 5b7d90806..5ca178b96 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TraderLlamaController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TraderLlamaController.java @@ -28,6 +28,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityLlamaTrader; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -53,6 +54,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends EntityLlamaTrader implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TropicalFishController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TropicalFishController.java index 782d4b33d..0f903503f 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TropicalFishController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TropicalFishController.java @@ -28,6 +28,7 @@ import net.minecraft.server.v1_16_R3.EntityTropicalFish; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.ItemStack; @@ -49,6 +50,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TurtleController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TurtleController.java index ef6c15297..378fd2fab 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TurtleController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TurtleController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityInsentient; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTurtle; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -46,6 +47,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; private ControllerJump oldJumpController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VexController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VexController.java index b7216e8d4..e86cc754a 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VexController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VexController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityVex; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; @@ -40,6 +41,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityVexNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VillagerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VillagerController.java index 72f372941..e67ac59e4 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VillagerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VillagerController.java @@ -30,6 +30,7 @@ import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityVillager; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; @@ -52,6 +53,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean blockingATrade; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VindicatorController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VindicatorController.java index 56c416a7b..f34667dba 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VindicatorController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VindicatorController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityVindicator; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -43,6 +44,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WanderingTraderController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WanderingTraderController.java index 782b61b7b..10ef82c3d 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WanderingTraderController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WanderingTraderController.java @@ -31,6 +31,7 @@ import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityVillagerTrader; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.MerchantRecipe; @@ -52,6 +53,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends EntityVillagerTrader implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private boolean blockingATrade; private boolean blockTrades = true; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitchController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitchController.java index 7fe4c09d6..8f4c3d2ec 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitchController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitchController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityWitch; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitherController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitherController.java index eb42d041d..0364cd667 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitherController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitherController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityWither; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; @@ -40,6 +41,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WolfController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WolfController.java index eccbd110d..b5179b2c6 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WolfController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WolfController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.EntityLiving; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityWolf; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -45,6 +46,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZoglinController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZoglinController.java index f3b03c996..340c9dadc 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZoglinController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZoglinController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityZoglin; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends EntityZoglin implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZoglinNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieController.java index 6b14c9a79..1a375e77b 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityZombie; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieHuskController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieHuskController.java index 62117be3b..fcde2ed87 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieHuskController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieHuskController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityZombieHusk; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieVillagerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieVillagerController.java index 9dfe79c26..6fbdceb00 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieVillagerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieVillagerController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityZombieVillager; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -42,6 +43,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/AreaEffectCloudController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/AreaEffectCloudController.java index c280c95f6..3217d7575 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/AreaEffectCloudController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/AreaEffectCloudController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityAreaEffectCloud; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -41,6 +42,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/BoatController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/BoatController.java index 7db44d350..f47f6bf8a 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/BoatController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/BoatController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumMoveType; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.Fluid; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.MathHelper; @@ -47,6 +48,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private double aC; private float aD; private EnumStatus aE; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/DragonFireballController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/DragonFireballController.java index 33789447c..b1c5702cb 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/DragonFireballController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/DragonFireballController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityDragonFireball; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -41,6 +42,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EggController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EggController.java index 0ea5885e9..9d4c6b60b 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EggController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EggController.java @@ -21,6 +21,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityEgg; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -52,6 +53,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEggNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderCrystalController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderCrystalController.java index d7c078ecd..fab05a227 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderCrystalController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderCrystalController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityEnderCrystal; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -41,6 +42,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderPearlController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderPearlController.java index 7bbc3992c..49133c70d 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderPearlController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderPearlController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityEnderPearl; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -41,6 +42,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderSignalController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderSignalController.java index 73c2ac831..c97bda533 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderSignalController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderSignalController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityEnderSignal; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -41,6 +42,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EvokerFangsController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EvokerFangsController.java index 3331faaab..1b0c688de 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EvokerFangsController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EvokerFangsController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -40,6 +41,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ExperienceOrbController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ExperienceOrbController.java index bf2261d2a..2bef5606e 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ExperienceOrbController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ExperienceOrbController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityExperienceOrb; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FallingBlockController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FallingBlockController.java index 211e35339..4bef2d564 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FallingBlockController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FallingBlockController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.Block; import net.minecraft.server.v1_16_R3.EntityFallingBlock; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumMoveType; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -51,6 +52,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FireworkController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FireworkController.java index 8d7a4791d..a4268a1e1 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FireworkController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FireworkController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityFireworks; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FishingHookController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FishingHookController.java index 3aa0f3d09..bc24ee6e3 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FishingHookController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FishingHookController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityFishingHook; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.ItemStack; import net.minecraft.server.v1_16_R3.Items; @@ -48,6 +49,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemController.java index 3e286652c..53f9c98c4 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityItem; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.ItemStack; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -46,6 +47,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityItemNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemFrameController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemFrameController.java index 49d10ac49..53ca6afda 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemFrameController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemFrameController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.BlockPosition; import net.minecraft.server.v1_16_R3.EntityItemFrame; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumDirection; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -47,6 +48,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LargeFireballController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LargeFireballController.java index 1a1badd6f..1be2d545b 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LargeFireballController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LargeFireballController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityLargeFireball; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LeashController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LeashController.java index 79a62271b..af7297e14 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LeashController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LeashController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityLeash; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LlamaSpitController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LlamaSpitController.java index caf8f4c6d..1ea2c9b72 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LlamaSpitController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LlamaSpitController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityLlama; import net.minecraft.server.v1_16_R3.EntityLlamaSpit; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -49,6 +50,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartChestController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartChestController.java index 62488dcb0..d75c73064 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartChestController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartChestController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartChest; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartCommandController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartCommandController.java index 1d4be72ad..fab82adc5 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartCommandController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartCommandController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartCommandBlock; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartFurnaceController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartFurnaceController.java index 9b55bf6a4..66393b46c 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartFurnaceController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartFurnaceController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartFurnace; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartHopperController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartHopperController.java index d76414896..af350697c 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartHopperController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartHopperController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartHopper; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -30,6 +31,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartRideableController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartRideableController.java index 794034f05..682be56f4 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartRideableController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartRideableController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartRideable; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartSpawnerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartSpawnerController.java index 05a364991..57a9d52b9 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartSpawnerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartSpawnerController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartMobSpawner; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -30,6 +31,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartTNTController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartTNTController.java index fa7ed6733..d8fdc3574 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartTNTController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartTNTController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartTNT; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -30,6 +31,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/PaintingController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/PaintingController.java index 188c1c2d8..61d7b3a0c 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/PaintingController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/PaintingController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityPainting; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ShulkerBulletController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ShulkerBulletController.java index a1b0925e4..4f6655459 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ShulkerBulletController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ShulkerBulletController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityShulkerBullet; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SmallFireballController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SmallFireballController.java index e27c86cc1..49a013712 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SmallFireballController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SmallFireballController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntitySmallFireball; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SnowballController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SnowballController.java index a0bba6ad2..15a0dfb58 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SnowballController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SnowballController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntitySnowball; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SpectralArrowController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SpectralArrowController.java index 0f02bdabb..eaa6b9a77 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SpectralArrowController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SpectralArrowController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntitySpectralArrow; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TNTPrimedController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TNTPrimedController.java index ecdcc2786..b6c159421 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TNTPrimedController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TNTPrimedController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityTNTPrimed; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownExpBottleController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownExpBottleController.java index 344b05d33..3a99a4dff 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownExpBottleController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownExpBottleController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityThrownExpBottle; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownPotionController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownPotionController.java index 4b50befda..ac67f8e67 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownPotionController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownPotionController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityPotion; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.Items; import net.minecraft.server.v1_16_R3.NBTTagCompound; @@ -36,6 +37,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownTridentController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownTridentController.java index 6df0b38f7..5d44989ed 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownTridentController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownTridentController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityThrownTrident; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends EntityThrownTrident implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TippedArrowController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TippedArrowController.java index 95bc25366..c58dc5cca 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TippedArrowController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TippedArrowController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityTippedArrow; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/WitherSkullController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/WitherSkullController.java index fe5ab4598..1a7e0855c 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/WitherSkullController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/WitherSkullController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityWitherSkull; +import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.Tag; @@ -35,6 +36,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public EnumPistonReaction getPushReaction() { + return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction(); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityTypes types, World world) { 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 522e635c4..77d3e4469 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 @@ -38,6 +38,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -58,6 +59,11 @@ public class AxolotlController extends MobEntityController { } public static class EntityAxolotlNPC extends Axolotl implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 0cb2e4a3f..4257a63b3 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 @@ -25,6 +25,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBatNPC(EntityType types, Level level) { 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 38d339921..75bda2e41 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 @@ -25,6 +25,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityType types, Level level) { 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 4e06ba8c5..96cdfd0f5 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 @@ -25,6 +25,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityType types, Level level) { 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 6ef3e0019..13b4a9ba0 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityCatNPC(EntityType types, Level level) { 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 8f9427e1c..46e675c47 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityType types, Level level) { 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 5d1897d17..2d473a288 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityType types, Level level) { 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 56e997794..ab18893a5 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 @@ -34,6 +34,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 342c29141..4ea7c7b2a 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 @@ -33,6 +33,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityCowNPC(EntityType types, Level level) { 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 88ad8c94d..9d2219d6e 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean allowPowered; private final CitizensNPC npc; 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 04c8479e5..4c5a9833a 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 @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean inProtectedTick; private final CitizensNPC npc; 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 ee7ae3c72..78f516304 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityType types, Level level) { 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 a5371e50b..438ff0711 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 @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -51,6 +52,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityType types, Level level) { 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 ded2bdb77..3f0c1d49d 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 @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityType types, Level level) { 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 a0ccd965d..068fd33af 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityType types, Level level) { 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 081c3d53f..8966610f1 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityType types, Level level) { 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 c238eaaae..f20b77b2b 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityType types, Level level) { 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 055fd04c0..0c237fb51 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 @@ -25,6 +25,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -39,6 +40,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityType types, Level level) { 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 cd07df0c4..7728d47ef 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityType types, Level level) { 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 be1d82b37..7f21069bb 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGlowSquidNPC(EntityType types, Level level) { 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 073e80ba4..f0afe585c 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGoatNPC(EntityType types, Level level) { 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 c3789f556..067b823c6 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityType types, Level level) { 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 709490490..979fca0ae 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityType types, Level level) { 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 354bd9c29..a3a2d0749 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityHoglinNPC(EntityType types, Level level) { 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 e108ff287..b46a8d6d3 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 @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 a00e80060..11cc3a0a4 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 @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; 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 5f4d886e1..e5453b907 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 @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 beb11ffa9..139b26abf 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 @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 4a3c6e995..a13871d24 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 @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 28dbef84d..ee2b9766e 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityType types, Level level) { 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 4d93dc213..3c64ea234 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityType types, Level level) { 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 89789a19e..b399bafa5 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 @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; 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 586f38daa..cb54e8699 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 @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 452bfdc29..9c2561ba2 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 @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityType types, Level level) { 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 e0f6493a8..c9c21e204 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityType types, Level level) { 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 694023bc6..37b5417bf 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityType types, Level level) { 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 d31ff7a80..3d45cc365 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityType types, Level level) { 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 a7406b0e3..b07aa1b04 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 @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private LookControl oldLookController; 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 ad15b0c56..1df7d917f 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 @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPigNPC(EntityType types, Level level) { 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 3e39d18f7..2469eb12f 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityType types, Level level) { 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 8de09b33c..1753ec423 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityType types, Level level) { 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 ec417ee8f..68351a093 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPiglinNPC(EntityType types, Level level) { 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 7ad1a4a9e..e7c83ba58 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityType types, Level level) { 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 17b9fbb4a..a7dc13ea0 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 @@ -26,6 +26,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -40,6 +41,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityType types, Level level) { 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 09566c224..58738fb49 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 @@ -37,6 +37,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -51,6 +52,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 92321d7fd..e5a938919 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityType types, Level level) { 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 2bc36d125..77ab86036 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityType types, Level level) { 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 f9ffeb2ff..9462f3c8c 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 @@ -34,6 +34,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 d5545f68d..bc6456c93 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityType types, Level level) { 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 2d6dca957..e9a76908c 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityType types, Level level) { 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 c3c18d806..b9563217f 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityType types, Level level) { 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 e90837f7b..59a8d7111 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityType types, Level level) { 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 4c9f8cb6d..a7d0c017f 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityType types, Level level) { 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 dd64d8dce..0232cb08a 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityType types, Level level) { 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 f892867e6..a093ac8c7 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 @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 01e3a9c8e..acd019201 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityType types, Level level) { 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 842001395..25ce758e7 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityType types, Level level) { 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 eedb81fb7..0f44f24b2 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityType types, Level level) { 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 d92cd3a0d..8b4c81573 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityStriderNPC(EntityType types, Level level) { 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 1b8c0cbc3..74fd10876 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 @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityType types, Level level) { 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 90bb662e5..a7bf71ef6 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 @@ -34,6 +34,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 6612e331f..07b6960d9 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 @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private JumpControl oldJumpController; 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 dfeb30af7..a6c7a456c 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 @@ -25,6 +25,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -39,6 +40,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityVexNPC(EntityType types, Level level) { 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 91cc95875..2d26936f3 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 @@ -35,6 +35,7 @@ import net.minecraft.world.item.trading.MerchantOffers; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean blockingATrade; private final CitizensNPC npc; 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 5efd80282..7cb13f1b1 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityType types, Level level) { 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 00f483d84..174ecaf6f 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 @@ -34,6 +34,7 @@ import net.minecraft.world.item.trading.MerchantOffers; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean blockingATrade; private boolean blockTrades = true; 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 5636491aa..dea6df117 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityType types, Level level) { 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 6674e1c0b..01789bb66 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 @@ -25,6 +25,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -39,6 +40,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityType types, Level level) { 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 7ad58b2df..70bc15b41 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 @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityType types, Level level) { 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 1f9666812..26091d826 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZoglinNPC(EntityType types, Level level) { 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 38dd77778..eaefc592b 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityType types, Level level) { 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 0cc1c5c92..27d5e98de 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityType types, Level level) { 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 1ab693900..bcfae7e29 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityType types, Level level) { 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 f818c03e5..5cff9a275 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityType types, Level level) { 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 d6045a147..5c2663ef4 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double aC; private float aD; private Status aE; 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 2091bcaab..c5d508e2c 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.DragonFireball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityType types, Level level) { 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 fe5e949c4..d6dddae21 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownEgg; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -51,6 +52,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEggNPC(EntityType types, Level level) { 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 01909fedb..ac218fdba 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.boss.enderdragon.EndCrystal; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityType types, Level level) { 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 ff08203a5..a7698d60d 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 @@ -22,6 +22,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownEnderpearl; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityType types, Level level) { 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 8383a7470..bc837a8fa 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 @@ -22,6 +22,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.EyeOfEnder; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityType types, Level level) { 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 447b21fa1..238b73501 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 @@ -25,6 +25,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.projectile.EvokerFangs; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -39,6 +40,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityType types, Level level) { 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 f8e6b1195..9d0d21627 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.ExperienceOrb; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -35,6 +36,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityType types, Level level) { 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 579ae7a45..2c85b8fbe 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 @@ -28,6 +28,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -51,6 +52,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends FallingBlockEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityType types, Level level) { 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 31193346e..13ad7466c 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 @@ -22,6 +22,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.FireworkRocketEntity; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -36,6 +37,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityType types, Level level) { 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 c84a15b45..2f901d9b5 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 @@ -31,6 +31,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityType types, Level level) { 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 b4d97e8d7..05b0543ff 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.GlowItemFrame; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class GlowItemFrameController extends MobEntityController { } public static class EntityGlowItemFrameNPC extends GlowItemFrame implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGlowItemFrameNPC(EntityType types, Level level) { 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 6e978b688..18972df4c 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 @@ -26,6 +26,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends ItemEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityItemNPC(EntityType types, Level level) { 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 7aea81e0c..3a80796a9 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.ItemFrame; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -46,6 +47,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends ItemFrame implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityType types, Level level) { 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 867733c81..deb4ba575 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.LargeFireball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -35,6 +36,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityType types, Level level) { 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 8487d018d..687c10826 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 @@ -22,6 +22,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.LeashFenceKnotEntity; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -36,6 +37,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityType types, Level level) { 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 9189ec13d..6a1da6a48 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 @@ -25,6 +25,7 @@ import net.minecraft.world.entity.animal.horse.Llama; import net.minecraft.world.entity.projectile.LlamaSpit; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityType types, Level level) { 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 6cb311f4c..63781b5f1 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Marker; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -35,6 +36,11 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMarkerNPC(EntityType types, Level level) { 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 38a7e40a5..8dbcfe043 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 @@ -22,6 +22,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartChest; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -36,6 +37,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityType types, Level level) { 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 96cb6d28e..425f2697e 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 @@ -22,6 +22,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartCommandBlock; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -36,6 +37,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityType types, Level level) { 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 e08137efc..9e024508d 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 @@ -22,6 +22,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartFurnace; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -36,6 +37,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityType types, Level level) { 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 6ef129364..3baebafdd 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 @@ -17,6 +17,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartHopper; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -31,6 +32,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityType types, Level level) { 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 f95b1d99b..0fb24c40a 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.Minecart; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -35,6 +36,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityType types, Level level) { 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 578344a24..1a63dea98 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 @@ -17,6 +17,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartSpawner; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -31,6 +32,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityType types, Level level) { 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 f5f426d89..1469b43be 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 @@ -17,6 +17,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartTNT; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -31,6 +32,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityType types, Level level) { 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 724055fbf..7ac41f650 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.Painting; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -35,6 +36,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityType types, Level level) { 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 37572430d..73d80bc13 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ShulkerBullet; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -35,6 +36,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityType types, Level level) { 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 853eb1f37..4e1202423 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.SmallFireball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -35,6 +36,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityType types, Level level) { 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 9a36435f5..4c89cd315 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.Snowball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -35,6 +36,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityType types, Level level) { 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 819dc2f67..491e55b9d 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 @@ -22,6 +22,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.SpectralArrow; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -36,6 +37,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityType types, Level level) { 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 20d941361..99a90d5ce 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 @@ -22,6 +22,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.item.PrimedTnt; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -36,6 +37,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityType types, Level level) { 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 1ede5600f..f3a71e54c 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 @@ -22,6 +22,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownExperienceBottle; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -36,6 +37,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityType types, Level level) { 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 c14002309..648f2342e 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 @@ -22,6 +22,7 @@ import net.minecraft.world.entity.projectile.ThrownPotion; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -36,6 +37,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends ThrownPotion implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityType types, Level level) { 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 6d1bcdcea..5b5387c75 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 @@ -22,6 +22,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownTrident; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -36,6 +37,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityType types, Level level) { 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 21626f041..1756cfa98 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.Arrow; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -35,6 +36,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityType types, Level level) { 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 e4e0f1b28..4fe096d11 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 @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.WitherSkull; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -35,6 +36,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/AxolotlController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/AxolotlController.java index 504f42857..d16d6c8b9 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/AxolotlController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/AxolotlController.java @@ -38,6 +38,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -58,6 +59,11 @@ public class AxolotlController extends MobEntityController { } public static class EntityAxolotlNPC extends Axolotl implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 7d06303ca..2ebad655c 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBatNPC(EntityType types, Level level) { 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 3658d1551..4ec22c1f1 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityType types, Level level) { 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 6fff1ba0f..605bb6ffe 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityType types, Level level) { 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 99b2677f8..adedadd9c 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityCatNPC(EntityType types, Level level) { 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 8d9463490..96fe76984 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityType types, Level level) { 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 04125a5a7..8cc16906d 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityType types, Level level) { 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 bf3bfc5da..789255df5 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 @@ -35,6 +35,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -55,6 +56,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 f8ee5db2e..626e866d1 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 @@ -34,6 +34,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityCowNPC(EntityType types, Level level) { 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 d39522df3..65f62eeb9 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean allowPowered; private final CitizensNPC npc; 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 d116986d1..abadb2579 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 @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean inProtectedTick; private final CitizensNPC npc; 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 8472eaef8..81d6536da 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityType types, Level level) { 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 573c2e7a2..73010552d 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 @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityType types, Level level) { 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 d0b7b7a85..99b3c843b 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 @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -51,6 +52,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityType types, Level level) { 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 bda768c8b..d5f506818 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityType types, Level level) { 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 9ee806b3b..92da1197b 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityType types, Level level) { 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 4a465d76b..c5f842bc7 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityType types, Level level) { 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 fb8da9187..92b158da1 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityType types, Level level) { 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 03df0ee29..be648474b 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityType types, Level level) { 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 34316955d..55763aa04 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGlowSquidNPC(EntityType types, Level level) { 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 f98191a62..651458b79 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGoatNPC(EntityType types, Level level) { 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 93059aa4d..aa3aaeafb 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityType types, Level level) { 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 7bf9fec54..676d14a5b 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityType types, Level level) { 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 37c2d0c83..04a4b3a42 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityHoglinNPC(EntityType types, Level level) { 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 19573b5f2..81b756004 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 @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 4e43f93fe..4a7276e49 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 @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; 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 84dfc60e4..95585caea 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 @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 2bc43e943..f0479ab1e 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 @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 8e1335aff..26b3a3912 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 @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 7e2d80538..1de67af35 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityType types, Level level) { 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 f20046e29..a81cbd31c 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityType types, Level level) { 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 eb2290ec9..317acd244 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 @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; 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 1d96e521c..e907de850 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 @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 cf597b866..75b4dcffd 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 @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -46,6 +47,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityType types, Level level) { 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 ffddfb010..e09d99e05 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 @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityType types, Level level) { 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 0e02d8cd6..13c936b5d 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityType types, Level level) { 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 2a66396b8..40c530179 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 @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityType types, Level level) { 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 522cc23c0..59f3b5554 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 @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -46,6 +47,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private LookControl oldLookController; 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 b4a807390..9c9da5f97 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 @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPigNPC(EntityType types, Level level) { 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 22c6c9ff9..35c2d1469 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityType types, Level level) { 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 50a4f6858..96af5ad2b 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityType types, Level level) { 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 26a930dbc..bc4a460f9 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPiglinNPC(EntityType types, Level level) { 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 cf6cc24b1..231750418 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityType types, Level level) { 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 0cbc49501..66d6b20b6 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityType types, Level level) { 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 5d53521ff..088e3df97 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 @@ -38,6 +38,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 4b75f9193..3f549c57a 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 @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityType types, Level level) { 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 baf796240..350517ac9 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityType types, Level level) { 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 848f19ed7..4013809dd 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 @@ -35,6 +35,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 bce85194d..5b2c9681d 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityType types, Level level) { 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 525b8228b..48ed34b8f 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityType types, Level level) { 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 0cb3dbb59..617435b63 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityType types, Level level) { 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 54ede3b00..7944a312d 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityType types, Level level) { 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 c3d219785..5028fd92e 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityType types, Level level) { 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 d3daea0ca..4ae08dbc0 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityType types, Level level) { 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 cac0ab944..780b045f8 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 @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 38c468c0f..d30efae87 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityType types, Level level) { 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 c8c487d7f..79b960e48 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityType types, Level level) { 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 67a1d9c14..a390cfbc5 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityType types, Level level) { 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 17c436329..580d4d87d 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityStriderNPC(EntityType types, Level level) { 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 43769f559..2b20cbeaa 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 @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -51,6 +52,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityType types, Level level) { 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 45b6bf57c..44d2c232f 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 @@ -35,6 +35,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 d0d7bc488..55ac80057 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 @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -46,6 +47,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private JumpControl oldJumpController; 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 e8009d1ad..1f4a01905 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityVexNPC(EntityType types, Level level) { 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 7e5d5a36d..5bba80189 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 @@ -35,6 +35,7 @@ import net.minecraft.world.item.trading.MerchantOffers; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean blockingATrade; private final CitizensNPC npc; 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 8f0bf811d..abe64e0e3 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityType types, Level level) { 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 2453bd35d..abfeb864f 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 @@ -34,6 +34,7 @@ import net.minecraft.world.item.trading.MerchantOffers; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean blockingATrade; private boolean blockTrades = true; 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 985948c0f..ff65474a6 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityType types, Level level) { 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 d1fa4f523..3f7738513 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityType types, Level level) { 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 09e1a7efa..869941fb7 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 @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityType types, Level level) { 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 eaff6dc81..8dda021d6 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZoglinNPC(EntityType types, Level level) { 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 bde44e566..e99395468 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityType types, Level level) { 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 5c80c2250..b5190b22e 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityType types, Level level) { 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 f9d2eddfe..2430c3f1c 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityType types, Level level) { 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 7714b4c41..d7050e6c0 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityType types, Level level) { 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 e2fa4d70f..d04a3f103 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double aC; private float aD; private Status aE; 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 d72fdff1a..fab262a6c 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.DragonFireball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityType types, Level level) { 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 aeedab212..afade4134 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 @@ -25,6 +25,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownEgg; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEggNPC(EntityType types, Level level) { 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 ae0e39ad9..75c342b63 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.boss.enderdragon.EndCrystal; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityType types, Level level) { 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 b9c4a3c31..867e2e2a3 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownEnderpearl; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityType types, Level level) { 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 296b9952f..82c642f9a 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.EyeOfEnder; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityType types, Level level) { 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 dd355581c..c6e0f6410 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 @@ -27,6 +27,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.projectile.EvokerFangs; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityType types, Level level) { 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 48fbad098..02f768e6f 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.ExperienceOrb; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityType types, Level level) { 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 2f1bf61ae..038057760 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 @@ -29,6 +29,7 @@ import net.minecraft.world.entity.item.FallingBlockEntity; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends FallingBlockEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityType types, Level level) { 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 f139f9237..bfa8cd8bc 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.FireworkRocketEntity; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityType types, Level level) { 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 a14abda5d..4acbe94ba 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 @@ -32,6 +32,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -46,6 +47,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityType types, Level level) { 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 1b685bedb..bbf240255 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 @@ -25,6 +25,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.GlowItemFrame; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class GlowItemFrameController extends MobEntityController { } public static class EntityGlowItemFrameNPC extends GlowItemFrame implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGlowItemFrameNPC(EntityType types, Level level) { 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 f50931af4..71adb0c51 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 @@ -28,6 +28,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends ItemEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityItemNPC(EntityType types, Level level) { 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 eb316eed8..f708bdbc7 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.ItemFrame; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends ItemFrame implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityType types, Level level) { 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 13be6844b..ed8ee35a2 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.LargeFireball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityType types, Level level) { 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 6af095453..d6b66b410 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.LeashFenceKnotEntity; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityType types, Level level) { 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 495a846b6..7e9220150 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 @@ -26,6 +26,7 @@ import net.minecraft.world.entity.animal.horse.Llama; import net.minecraft.world.entity.projectile.LlamaSpit; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityType types, Level level) { 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 9c17a1b4d..f217664ac 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Marker; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMarkerNPC(EntityType types, Level level) { 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 df4c364c5..12f12940c 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartChest; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityType types, Level level) { 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 271f0b510..a4a25f9b9 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartCommandBlock; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityType types, Level level) { 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 9f1c6a2b8..f8f738472 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartFurnace; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityType types, Level level) { 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 1789beafa..2ae99994b 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 @@ -19,6 +19,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartHopper; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -33,6 +34,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityType types, Level level) { 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 5215dd027..8cccbabdf 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.Minecart; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityType types, Level level) { 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 45cbab7c7..769a9eaf0 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 @@ -19,6 +19,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartSpawner; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -33,6 +34,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityType types, Level level) { 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 672190182..ddea42e0b 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 @@ -19,6 +19,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartTNT; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -33,6 +34,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityType types, Level level) { 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 b920d023e..35a1a307c 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.Painting; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityType types, Level level) { 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 c3cbcc119..4e4da6f6f 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ShulkerBullet; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityType types, Level level) { 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 a3597a0d1..efe3f210b 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.SmallFireball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityType types, Level level) { 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 5fc4c365a..48b2a407f 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.Snowball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityType types, Level level) { 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 171b056cd..eab1c6b4a 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.SpectralArrow; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityType types, Level level) { 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 0ca33ce2d..368e29e77 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.item.PrimedTnt; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityType types, Level level) { 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 f269deabe..67fae200a 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownExperienceBottle; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityType types, Level level) { 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 3644e60a7..c311e2b6a 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.projectile.ThrownPotion; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends ThrownPotion implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityType types, Level level) { 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 edfeb74e9..2d3647208 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 @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownTrident; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityType types, Level level) { 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 8f4da33ef..8a54b93e9 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.Arrow; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityType types, Level level) { 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 a954555d5..bf498e032 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 @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.WitherSkull; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityNavigation.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityNavigation.java index c3eab4bb8..dbd26dc0c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityNavigation.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityNavigation.java @@ -156,7 +156,7 @@ public class EntityNavigation extends PathNavigation { } return true; } - + private boolean canWalkOn(int var0, int var1, int var2, int var3, int var4, int var5, Vec3 var6, double var7, double var9) { int var11 = var0 - var3 / 2; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AllayController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AllayController.java index 0593b4798..9c9ce3657 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AllayController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AllayController.java @@ -38,6 +38,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -58,6 +59,11 @@ public class AllayController extends MobEntityController { } public static class EntityAllayNPC extends Allay implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private int taskId = -1; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AxolotlController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AxolotlController.java index c2729b7c7..bfd2f0893 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AxolotlController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AxolotlController.java @@ -39,6 +39,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -59,6 +60,11 @@ public class AxolotlController extends MobEntityController { } public static class EntityAxolotlNPC extends Axolotl implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BatController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BatController.java index 6540bfc79..a3a76a56a 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BatController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BatController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBatNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BeeController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BeeController.java index 03a781ee8..bba6ecd55 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BeeController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BeeController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BlazeController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BlazeController.java index 4d55200b3..d0d7fc9ad 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BlazeController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BlazeController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CamelController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CamelController.java index 750d4cb56..b5440117f 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CamelController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CamelController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -60,6 +61,11 @@ public class CamelController extends MobEntityController { } public static class EntityCamelNPC extends Camel implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CatController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CatController.java index 7635214cf..3a77e7019 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CatController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CatController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityCatNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CaveSpiderController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CaveSpiderController.java index f8764c248..05f708d07 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CaveSpiderController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CaveSpiderController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ChickenController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ChickenController.java index e522d76bd..ba6d6c1b2 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ChickenController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ChickenController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CodController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CodController.java index b3f2c8180..ed33bfe63 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CodController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CodController.java @@ -36,6 +36,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -56,6 +57,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CowController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CowController.java index 3972c6e3c..317eb31a8 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CowController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CowController.java @@ -35,6 +35,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -55,6 +56,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityCowNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CreeperController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CreeperController.java index d361f1cfb..b5cacbbf5 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CreeperController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CreeperController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DolphinController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DolphinController.java index 86915201c..99b8a4589 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DolphinController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DolphinController.java @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -51,6 +52,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean inProtectedTick; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DrownedController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DrownedController.java index 278b3eb8f..3269fcd7b 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DrownedController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DrownedController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EnderDragonController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EnderDragonController.java index ef53fd794..909c81913 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EnderDragonController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EnderDragonController.java @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermanController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermanController.java index 165b36023..71d194653 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermanController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermanController.java @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermiteController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermiteController.java index 0505eae05..aed28d0f8 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermiteController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermiteController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EvokerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EvokerController.java index 611fce96e..c0b3c9d08 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EvokerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EvokerController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FoxController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FoxController.java index dd9677b5e..1f9476c99 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FoxController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FoxController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FrogController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FrogController.java index 68bea53ac..cdbc94f86 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FrogController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FrogController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class FrogController extends MobEntityController { } public static class EntityFrogNPC extends Frog implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFrogNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GhastController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GhastController.java index f3a2f7aa5..8b085ac06 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GhastController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GhastController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GiantController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GiantController.java index 1e2c260b2..445a98cab 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GiantController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GiantController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GlowSquidController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GlowSquidController.java index 27aae980c..9db51c48c 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GlowSquidController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GlowSquidController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGlowSquidNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GoatController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GoatController.java index 4e6ecd482..fca6ab4f8 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GoatController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GoatController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGoatNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianController.java index 4b515a0fa..36059e711 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianElderController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianElderController.java index 452dfddc6..ee9f443f0 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianElderController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianElderController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HoglinController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HoglinController.java index c76a1b1ee..8306e5263 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HoglinController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HoglinController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityHoglinNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseController.java index 87f266d89..514676b09 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseDonkeyController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseDonkeyController.java index 08051079e..a01cb351c 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseDonkeyController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseDonkeyController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseMuleController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseMuleController.java index 944e9aebc..2485ac4a5 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseMuleController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseMuleController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseSkeletonController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseSkeletonController.java index de6bfdbe4..45d296937 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseSkeletonController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseSkeletonController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseZombieController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseZombieController.java index 0e87938be..9108c148a 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseZombieController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseZombieController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IllusionerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IllusionerController.java index c1b30622d..4fc53f2c9 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IllusionerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IllusionerController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IronGolemController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IronGolemController.java index d1b51aea6..1de11603b 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IronGolemController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IronGolemController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/LlamaController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/LlamaController.java index b877e8299..2767dfbfd 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/LlamaController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/LlamaController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MagmaCubeController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MagmaCubeController.java index ab218e8ed..ef08a4215 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MagmaCubeController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MagmaCubeController.java @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -46,6 +47,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MushroomCowController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MushroomCowController.java index 238adf4ef..0744c3375 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MushroomCowController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MushroomCowController.java @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/OcelotController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/OcelotController.java index 07ec38810..5da01dcee 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/OcelotController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/OcelotController.java @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PandaController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PandaController.java index 5b3e37c57..7644406e2 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PandaController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PandaController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ParrotController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ParrotController.java index 5a261725e..eb60b9492 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ParrotController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ParrotController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PhantomController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PhantomController.java index dcdd015b2..a8a5bebb4 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PhantomController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PhantomController.java @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private LookControl oldLookController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigController.java index a62003188..c13e191ef 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigController.java @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPigNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigZombieController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigZombieController.java index ff630bd76..9e32d8a57 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigZombieController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigZombieController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinBruteController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinBruteController.java index bb8994c33..bf328d20e 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinBruteController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinBruteController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinController.java index 921bd3189..2ff5b9b85 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPiglinNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PillagerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PillagerController.java index 8134d2748..3ac663f03 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PillagerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PillagerController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PolarBearController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PolarBearController.java index 2e87ab6a5..49f84e7d1 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PolarBearController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PolarBearController.java @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PufferFishController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PufferFishController.java index a09ecfbab..6317d5c55 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PufferFishController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PufferFishController.java @@ -39,6 +39,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RabbitController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RabbitController.java index 0c1a87c03..5a3f3084e 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RabbitController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RabbitController.java @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RavagerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RavagerController.java index 6a3cf589f..0c7b3dd22 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RavagerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RavagerController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SalmonController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SalmonController.java index 97be48a5e..6fdf1aa93 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SalmonController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SalmonController.java @@ -36,6 +36,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SheepController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SheepController.java index 9080c694c..cc8087cda 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SheepController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SheepController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ShulkerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ShulkerController.java index d36a2c142..70f3db5a3 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ShulkerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ShulkerController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SilverfishController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SilverfishController.java index 1ba031c5a..91d161df3 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SilverfishController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SilverfishController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonController.java index 41ddcc731..ea8d37314 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonStrayController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonStrayController.java index c08661157..779ac173f 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonStrayController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonStrayController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonWitherController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonWitherController.java index 71b039c5d..ce240396b 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonWitherController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonWitherController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SlimeController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SlimeController.java index 08cfb719f..a2689db4f 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SlimeController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SlimeController.java @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -46,6 +47,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnifferController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnifferController.java index 0df69c33f..451f0bc82 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnifferController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnifferController.java @@ -35,6 +35,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class SnifferController extends MobEntityController { } public static class EntitySnifferNPC extends Sniffer implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySnifferNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnowmanController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnowmanController.java index e1d48ecbe..fae634184 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnowmanController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnowmanController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SpiderController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SpiderController.java index d8c5d26f6..dc46976df 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SpiderController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SpiderController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SquidController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SquidController.java index 9eb7a0e44..5f1bd35a7 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SquidController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SquidController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/StriderController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/StriderController.java index 46d1e7f4c..0dca46c9b 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/StriderController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/StriderController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityStriderNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TadpoleController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TadpoleController.java index afde37538..dabae963f 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TadpoleController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TadpoleController.java @@ -37,6 +37,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -51,6 +52,11 @@ public class TadpoleController extends MobEntityController { } public static class EntityTadpoleNPC extends Tadpole implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TraderLlamaController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TraderLlamaController.java index b5ec1919d..8928d249a 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TraderLlamaController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TraderLlamaController.java @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TropicalFishController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TropicalFishController.java index b020022ea..68f61acaf 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TropicalFishController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TropicalFishController.java @@ -36,6 +36,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TurtleController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TurtleController.java index a25742f5d..d7bc232a0 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TurtleController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TurtleController.java @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private JumpControl oldJumpController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VexController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VexController.java index 6c6091f7c..c13a55ee9 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VexController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VexController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityVexNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VillagerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VillagerController.java index 43c1ee329..dbe35d08d 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VillagerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VillagerController.java @@ -36,6 +36,7 @@ import net.minecraft.world.item.trading.MerchantOffers; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean blockingATrade; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VindicatorController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VindicatorController.java index abe47de2f..d291f1987 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VindicatorController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VindicatorController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WanderingTraderController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WanderingTraderController.java index baedc8b0d..71a2c1ec0 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WanderingTraderController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WanderingTraderController.java @@ -35,6 +35,7 @@ import net.minecraft.world.item.trading.MerchantOffers; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean blockingATrade; private boolean blockTrades = true; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WardenController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WardenController.java index c708c6408..c37b3c82d 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WardenController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WardenController.java @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class WardenController extends MobEntityController { } public static class EntityWardenNPC extends Warden implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWardenNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitchController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitchController.java index 7539a585f..c641d6f76 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitchController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitchController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitherController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitherController.java index f0d37aa43..fb4cf83ff 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitherController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitherController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WolfController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WolfController.java index 39810a665..8ef39f135 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WolfController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WolfController.java @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -46,6 +47,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZoglinController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZoglinController.java index f8a15dc00..379d7b457 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZoglinController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZoglinController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZoglinNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieController.java index 1f475c6ce..f918794d9 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieHuskController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieHuskController.java index c01e51b86..5b944eb21 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieHuskController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieHuskController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieVillagerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieVillagerController.java index e50d57cc1..05ba7a287 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieVillagerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieVillagerController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/AreaEffectCloudController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/AreaEffectCloudController.java index 5d4ee62ad..7c078ef86 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/AreaEffectCloudController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/AreaEffectCloudController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BlockDisplayController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BlockDisplayController.java index 230c75992..647631b5f 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BlockDisplayController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BlockDisplayController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class BlockDisplayController extends MobEntityController { } public static class EntityBlockDisplayNPC extends BlockDisplay implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBlockDisplayNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BoatController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BoatController.java index b024f442c..0fb631100 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BoatController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BoatController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double aC; private float aD; private Status aE; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ChestBoatController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ChestBoatController.java index dc14ed9df..6f210518a 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ChestBoatController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ChestBoatController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.ChestBoat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class ChestBoatController extends MobEntityController { } public static class EntityChestBoatNPC extends ChestBoat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double aC; private float aD; private Status aE; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/DragonFireballController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/DragonFireballController.java index 112435da6..e235a6fd4 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/DragonFireballController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/DragonFireballController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.DragonFireball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EggController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EggController.java index 7af296542..ccb298731 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EggController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EggController.java @@ -25,6 +25,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownEgg; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEggNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderCrystalController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderCrystalController.java index ed0f3ef1c..b6a8f0588 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderCrystalController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderCrystalController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.boss.enderdragon.EndCrystal; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderPearlController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderPearlController.java index a2abef946..e669ef0a5 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderPearlController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderPearlController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownEnderpearl; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderSignalController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderSignalController.java index eac76c4ca..89b63e8a0 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderSignalController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderSignalController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.EyeOfEnder; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EvokerFangsController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EvokerFangsController.java index 810cee7e5..c5c43aa37 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EvokerFangsController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EvokerFangsController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.projectile.EvokerFangs; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ExperienceOrbController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ExperienceOrbController.java index f58a8bfd7..2a7c8b084 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ExperienceOrbController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ExperienceOrbController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.ExperienceOrb; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FallingBlockController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FallingBlockController.java index 4e7f54d65..b68bb0e87 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FallingBlockController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FallingBlockController.java @@ -28,6 +28,7 @@ import net.minecraft.world.entity.item.FallingBlockEntity; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends FallingBlockEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FireworkController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FireworkController.java index 7754b6525..d1b23c2d6 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FireworkController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FireworkController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.FireworkRocketEntity; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FishingHookController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FishingHookController.java index 35f8b6339..15b350c21 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FishingHookController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FishingHookController.java @@ -33,6 +33,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -62,6 +63,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/GlowItemFrameController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/GlowItemFrameController.java index 10e7690d6..83bff76a2 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/GlowItemFrameController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/GlowItemFrameController.java @@ -26,6 +26,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.GlowItemFrame; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class GlowItemFrameController extends MobEntityController { } public static class EntityGlowItemFrameNPC extends GlowItemFrame implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGlowItemFrameNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/InteractionController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/InteractionController.java index cd0a0579a..7662f195d 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/InteractionController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/InteractionController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Interaction; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class InteractionController extends MobEntityController { } public static class EntityInteractionNPC extends Interaction implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityInteractionNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemController.java index 3ecbdb50a..04cd457f7 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemController.java @@ -28,6 +28,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends ItemEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityItemNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemDisplayController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemDisplayController.java index 29a8ac1a7..9dd558f26 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemDisplayController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemDisplayController.java @@ -26,6 +26,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class ItemDisplayController extends MobEntityController { } public static class EntityItemDisplayNPC extends ItemDisplay implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityItemDisplayNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemFrameController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemFrameController.java index 0ae629ed2..189474b90 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemFrameController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemFrameController.java @@ -25,6 +25,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.ItemFrame; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends ItemFrame implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LargeFireballController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LargeFireballController.java index 56c190e33..485b0de0a 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LargeFireballController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LargeFireballController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.LargeFireball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LeashController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LeashController.java index 2a442c355..16a47718a 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LeashController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LeashController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.LeashFenceKnotEntity; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LlamaSpitController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LlamaSpitController.java index bb43ee324..cd01fdf9b 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LlamaSpitController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LlamaSpitController.java @@ -26,6 +26,7 @@ import net.minecraft.world.entity.animal.horse.Llama; import net.minecraft.world.entity.projectile.LlamaSpit; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MarkerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MarkerController.java index 622582cea..3e777a115 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MarkerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MarkerController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Marker; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMarkerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartChestController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartChestController.java index 3c591aa82..15c60ebbd 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartChestController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartChestController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartChest; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartCommandController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartCommandController.java index 05922b580..24936cb36 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartCommandController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartCommandController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartCommandBlock; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartFurnaceController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartFurnaceController.java index 1b7e8d288..c408c1d68 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartFurnaceController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartFurnaceController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartFurnace; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartHopperController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartHopperController.java index 9201e127e..0392cdb04 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartHopperController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartHopperController.java @@ -19,6 +19,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartHopper; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -33,6 +34,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartRideableController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartRideableController.java index c00999709..4a68cfd06 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartRideableController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartRideableController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.Minecart; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartSpawnerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartSpawnerController.java index 207eadb5a..dbe56db1d 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartSpawnerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartSpawnerController.java @@ -19,6 +19,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartSpawner; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -33,6 +34,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartTNTController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartTNTController.java index 6c2e10b0b..a17d4f551 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartTNTController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartTNTController.java @@ -19,6 +19,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartTNT; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -33,6 +34,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/PaintingController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/PaintingController.java index 421a3bac2..65a62f7ec 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/PaintingController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/PaintingController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.Painting; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ShulkerBulletController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ShulkerBulletController.java index ac98128cb..93700d6e3 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ShulkerBulletController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ShulkerBulletController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ShulkerBullet; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SmallFireballController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SmallFireballController.java index 64f1a297f..bb29dffa2 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SmallFireballController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SmallFireballController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.SmallFireball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SnowballController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SnowballController.java index 0ccef6902..7798e2012 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SnowballController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SnowballController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.Snowball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SpectralArrowController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SpectralArrowController.java index f4bff5e23..5a57f7ea6 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SpectralArrowController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SpectralArrowController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.SpectralArrow; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TNTPrimedController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TNTPrimedController.java index 6708e749e..d2ec67b64 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TNTPrimedController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TNTPrimedController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.item.PrimedTnt; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TextDisplayController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TextDisplayController.java index 7872931ee..c3f8af616 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TextDisplayController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TextDisplayController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class TextDisplayController extends MobEntityController { } public static class EntityTextDisplayNPC extends TextDisplay implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTextDisplayNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownExpBottleController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownExpBottleController.java index fbaa0c6bd..e34164e8c 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownExpBottleController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownExpBottleController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownExperienceBottle; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownPotionController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownPotionController.java index c7839fc0b..2e07e17b6 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownPotionController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownPotionController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.projectile.ThrownPotion; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends ThrownPotion implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownTridentController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownTridentController.java index f427ed435..bc8160084 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownTridentController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownTridentController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownTrident; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TippedArrowController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TippedArrowController.java index 67894e344..f2c26d111 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TippedArrowController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TippedArrowController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.Arrow; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/WitherSkullController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/WitherSkullController.java index eb8ca7ddc..0a5d2144b 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/WitherSkullController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/WitherSkullController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.WitherSkull; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNavigation.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNavigation.java index 288f3705e..16f6843de 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNavigation.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNavigation.java @@ -154,7 +154,7 @@ public class EntityNavigation extends PathNavigation { } return true; } - + private boolean canWalkOn(int var0, int var1, int var2, int var3, int var4, int var5, Vec3 var6, double var7, double var9) { int var11 = var0 - var3 / 2; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/AllayController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/AllayController.java index 1e38a8fd2..5da85a3c1 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/AllayController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/AllayController.java @@ -38,6 +38,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -58,6 +59,11 @@ public class AllayController extends MobEntityController { } public static class EntityAllayNPC extends Allay implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private int taskId = -1; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/AxolotlController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/AxolotlController.java index e598bd671..d736c6e7d 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/AxolotlController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/AxolotlController.java @@ -39,6 +39,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -59,6 +60,11 @@ public class AxolotlController extends MobEntityController { } public static class EntityAxolotlNPC extends Axolotl implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/BatController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/BatController.java index effbccc53..e02c00da6 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/BatController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/BatController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBatNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/BeeController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/BeeController.java index 297b42c60..c5bc3a2d2 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/BeeController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/BeeController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/BlazeController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/BlazeController.java index 69ed9c9b3..8642bb7c7 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/BlazeController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/BlazeController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CamelController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CamelController.java index bbd72efd9..b37c51fd9 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CamelController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CamelController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -60,6 +61,11 @@ public class CamelController extends MobEntityController { } public static class EntityCamelNPC extends Camel implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CatController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CatController.java index a86c309d8..4d5f5da70 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CatController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CatController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityCatNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CaveSpiderController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CaveSpiderController.java index 4d0c48293..e30b26243 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CaveSpiderController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CaveSpiderController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ChickenController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ChickenController.java index 9b14ca49b..bbb71155c 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ChickenController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ChickenController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CodController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CodController.java index e67bb7284..df0fe4af8 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CodController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CodController.java @@ -36,6 +36,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -56,6 +57,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CowController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CowController.java index 956c7b461..1df861a5a 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CowController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CowController.java @@ -35,6 +35,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -55,6 +56,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityCowNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CreeperController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CreeperController.java index 2faa5fbb0..010bb94cc 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CreeperController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/CreeperController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -51,7 +52,6 @@ public class CreeperController extends MobEntityController { public static class EntityCreeperNPC extends Creeper implements NPCHolder { private boolean allowPowered; - private final CitizensNPC npc; public EntityCreeperNPC(EntityType types, Level level) { @@ -135,6 +135,11 @@ public class CreeperController extends MobEntityController { return npc; } + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + @Override public void ignite() { if (npc == null || !npc.isProtected()) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/DolphinController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/DolphinController.java index 75c3cf340..70eadd433 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/DolphinController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/DolphinController.java @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -51,6 +52,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean inProtectedTick; private final CitizensNPC npc; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/DrownedController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/DrownedController.java index 720ca2c0c..044e939fa 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/DrownedController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/DrownedController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EnderDragonController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EnderDragonController.java index 26608d555..50f26ecaa 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EnderDragonController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EnderDragonController.java @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EndermanController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EndermanController.java index 836b056c3..fada8ac1e 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EndermanController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EndermanController.java @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EndermiteController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EndermiteController.java index 19c971d31..4153a5033 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EndermiteController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EndermiteController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EvokerController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EvokerController.java index 11f383a72..153d5f31a 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EvokerController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/EvokerController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/FoxController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/FoxController.java index d7aa5e15a..938a1daea 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/FoxController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/FoxController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/FrogController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/FrogController.java index 1a88bbf65..37c538eae 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/FrogController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/FrogController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class FrogController extends MobEntityController { } public static class EntityFrogNPC extends Frog implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFrogNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GhastController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GhastController.java index 62979018b..506780637 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GhastController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GhastController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GiantController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GiantController.java index 24b478062..08b1f1b7e 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GiantController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GiantController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GlowSquidController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GlowSquidController.java index 1503694a6..f91f5864b 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GlowSquidController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GlowSquidController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGlowSquidNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GoatController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GoatController.java index 0357907ec..31dee97a6 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GoatController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GoatController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGoatNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GuardianController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GuardianController.java index f49317987..46db921d3 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GuardianController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GuardianController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GuardianElderController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GuardianElderController.java index 787240fbc..4b2f48150 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GuardianElderController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/GuardianElderController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HoglinController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HoglinController.java index 6da957667..afbec56fb 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HoglinController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HoglinController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityHoglinNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseController.java index 405d0e772..d98bfdcb2 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseDonkeyController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseDonkeyController.java index 8da349eaf..b380c5130 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseDonkeyController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseDonkeyController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseMuleController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseMuleController.java index e5ab9ca95..5914f99f5 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseMuleController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseMuleController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseSkeletonController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseSkeletonController.java index 97d1c64dc..8765f5c94 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseSkeletonController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseSkeletonController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseZombieController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseZombieController.java index 2c0ff2ba2..afd27cc6b 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseZombieController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/HorseZombieController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/IllusionerController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/IllusionerController.java index f56d9b7af..2814db40d 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/IllusionerController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/IllusionerController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/IronGolemController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/IronGolemController.java index 6ec8ef0e0..e1c8b2c82 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/IronGolemController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/IronGolemController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/LlamaController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/LlamaController.java index 533b95b81..f04f8b985 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/LlamaController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/LlamaController.java @@ -34,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -54,6 +55,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/MagmaCubeController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/MagmaCubeController.java index 5c3a3caba..53b4b4b57 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/MagmaCubeController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/MagmaCubeController.java @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -46,6 +47,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/MushroomCowController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/MushroomCowController.java index c041e8d02..a5a4692a0 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/MushroomCowController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/MushroomCowController.java @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/OcelotController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/OcelotController.java index 2931ae8f5..79cbee6bd 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/OcelotController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/OcelotController.java @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PandaController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PandaController.java index ffc23887d..e1fe528d0 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PandaController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PandaController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ParrotController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ParrotController.java index fe0a50259..80a1d86ff 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ParrotController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ParrotController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PhantomController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PhantomController.java index 41d5d4c96..6ea957bcb 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PhantomController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PhantomController.java @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private LookControl oldLookController; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PigController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PigController.java index 6efecea94..cd8b4b489 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PigController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PigController.java @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPigNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PigZombieController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PigZombieController.java index 9d44fa6a8..0ce4fc623 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PigZombieController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PigZombieController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PiglinBruteController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PiglinBruteController.java index e59c00713..d1152e3c1 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PiglinBruteController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PiglinBruteController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PiglinController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PiglinController.java index 9729ed244..ecfb2d098 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PiglinController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PiglinController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPiglinNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PillagerController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PillagerController.java index d7d3bb3be..719e6c1b5 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PillagerController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PillagerController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PolarBearController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PolarBearController.java index a2c0d04f0..0d4420361 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PolarBearController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PolarBearController.java @@ -28,6 +28,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -42,6 +43,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PufferFishController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PufferFishController.java index 29a7c7438..5920d1c4d 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PufferFishController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/PufferFishController.java @@ -39,6 +39,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/RabbitController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/RabbitController.java index 3fab9b439..555b4f26f 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/RabbitController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/RabbitController.java @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/RavagerController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/RavagerController.java index 72cb59ce0..00ee5a732 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/RavagerController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/RavagerController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SalmonController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SalmonController.java index e27fc64d3..8cdd24425 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SalmonController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SalmonController.java @@ -36,6 +36,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SheepController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SheepController.java index 4e3af7ccc..0e8f9ccfb 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SheepController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SheepController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ShulkerController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ShulkerController.java index ffda08650..e77dcd8ac 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ShulkerController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ShulkerController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SilverfishController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SilverfishController.java index 7d63e4876..5e70cf593 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SilverfishController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SilverfishController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SkeletonController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SkeletonController.java index fc69ae38b..7e347ecdd 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SkeletonController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SkeletonController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SkeletonStrayController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SkeletonStrayController.java index f318c1e0e..acb2f8d48 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SkeletonStrayController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SkeletonStrayController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SkeletonWitherController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SkeletonWitherController.java index 001b5997b..986629970 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SkeletonWitherController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SkeletonWitherController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SlimeController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SlimeController.java index 013fb4ee5..59a985106 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SlimeController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SlimeController.java @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -46,6 +47,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SnifferController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SnifferController.java index 6169137ee..6239c838a 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SnifferController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SnifferController.java @@ -35,6 +35,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class SnifferController extends MobEntityController { } public static class EntitySnifferNPC extends Sniffer implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySnifferNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SnowmanController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SnowmanController.java index ec858d476..09fd67a50 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SnowmanController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SnowmanController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SpiderController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SpiderController.java index 84423b9b2..8e0e7acd7 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SpiderController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SpiderController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SquidController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SquidController.java index 9036483b5..659c0cad5 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SquidController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/SquidController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/StriderController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/StriderController.java index 67cffea8f..872415275 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/StriderController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/StriderController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityStriderNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TadpoleController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TadpoleController.java index 6bc71641a..a52e11535 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TadpoleController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TadpoleController.java @@ -37,6 +37,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -51,6 +52,11 @@ public class TadpoleController extends MobEntityController { } public static class EntityTadpoleNPC extends Tadpole implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TraderLlamaController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TraderLlamaController.java index 398cfc2b3..46107358e 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TraderLlamaController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TraderLlamaController.java @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TropicalFishController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TropicalFishController.java index 57535d669..51a0fd5aa 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TropicalFishController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TropicalFishController.java @@ -36,6 +36,7 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TurtleController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TurtleController.java index fb1d46310..84ea3acae 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TurtleController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/TurtleController.java @@ -33,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -47,6 +48,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; private JumpControl oldJumpController; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/VexController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/VexController.java index 174520442..3b910d77d 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/VexController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/VexController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityVexNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/VillagerController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/VillagerController.java index 9256676c4..c20a5d35e 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/VillagerController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/VillagerController.java @@ -36,6 +36,7 @@ import net.minecraft.world.item.trading.MerchantOffers; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean blockingATrade; private final CitizensNPC npc; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/VindicatorController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/VindicatorController.java index 415499893..2d7ad6af9 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/VindicatorController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/VindicatorController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WanderingTraderController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WanderingTraderController.java index a22fb1672..a4c144dd1 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WanderingTraderController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WanderingTraderController.java @@ -35,6 +35,7 @@ import net.minecraft.world.item.trading.MerchantOffers; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private boolean blockingATrade; private boolean blockTrades = true; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WardenController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WardenController.java index 99a128d5c..8ba93085a 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WardenController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WardenController.java @@ -31,6 +31,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +46,11 @@ public class WardenController extends MobEntityController { } public static class EntityWardenNPC extends Warden implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWardenNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WitchController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WitchController.java index 903358c9c..ca3f9ebc0 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WitchController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WitchController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WitherController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WitherController.java index 23b5209e0..9dc0fa955 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WitherController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WitherController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WolfController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WolfController.java index 929379372..75538ece5 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WolfController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/WolfController.java @@ -32,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -46,6 +47,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZoglinController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZoglinController.java index 91b946147..396573e17 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZoglinController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZoglinController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZoglinNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZombieController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZombieController.java index d8cf1d8d3..c8c4d6710 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZombieController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZombieController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZombieHuskController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZombieHuskController.java index a08b5fcd9..9d06c2fc9 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZombieHuskController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZombieHuskController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZombieVillagerController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZombieVillagerController.java index 99ff98e48..57fb43380 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZombieVillagerController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/ZombieVillagerController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/AreaEffectCloudController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/AreaEffectCloudController.java index bbdd2c128..fe270cb6e 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/AreaEffectCloudController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/BlockDisplayController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/BlockDisplayController.java index 4aae3417d..ba96138c2 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/BlockDisplayController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/BlockDisplayController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class BlockDisplayController extends MobEntityController { } public static class EntityBlockDisplayNPC extends BlockDisplay implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityBlockDisplayNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/BoatController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/BoatController.java index 857441589..a0ca6126c 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/BoatController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/BoatController.java @@ -29,6 +29,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double aC; private float aD; private Status aE; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ChestBoatController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ChestBoatController.java index 7337c9e5c..c4fd168ea 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ChestBoatController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ChestBoatController.java @@ -30,6 +30,7 @@ import net.minecraft.world.entity.vehicle.ChestBoat; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class ChestBoatController extends MobEntityController { } public static class EntityChestBoatNPC extends ChestBoat implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private double aC; private float aD; private Status aE; diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/DragonFireballController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/DragonFireballController.java index 65bab13a1..ad4f6c623 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/DragonFireballController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/DragonFireballController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.DragonFireball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EggController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EggController.java index 1b9d23d91..894715b79 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EggController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EggController.java @@ -25,6 +25,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownEgg; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -52,6 +53,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEggNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EnderCrystalController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EnderCrystalController.java index edd5a3796..3dcc7ecca 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EnderCrystalController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.boss.enderdragon.EndCrystal; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -43,6 +44,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EnderPearlController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EnderPearlController.java index be98c1d59..72f07a1d7 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EnderPearlController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EnderPearlController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownEnderpearl; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EnderSignalController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EnderSignalController.java index 013ba429f..5d4aed230 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EnderSignalController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EnderSignalController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.EyeOfEnder; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +45,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EvokerFangsController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EvokerFangsController.java index 2ee1683fe..c0fcb0924 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EvokerFangsController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/EvokerFangsController.java @@ -27,6 +27,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.projectile.EvokerFangs; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -41,6 +42,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ExperienceOrbController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ExperienceOrbController.java index f88fa1021..eccfd11de 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ExperienceOrbController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.ExperienceOrb; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/FallingBlockController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/FallingBlockController.java index fde7d6ea5..9eec108e2 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/FallingBlockController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/FallingBlockController.java @@ -28,6 +28,7 @@ import net.minecraft.world.entity.item.FallingBlockEntity; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -53,6 +54,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends FallingBlockEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/FireworkController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/FireworkController.java index 40ee4ffb4..68aa674ed 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/FireworkController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/FireworkController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.FireworkRocketEntity; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/FishingHookController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/FishingHookController.java index 7f10b9210..63fcc7147 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/FishingHookController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/FishingHookController.java @@ -33,6 +33,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -62,6 +63,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/GlowItemFrameController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/GlowItemFrameController.java index e140a9915..4e42192e0 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/GlowItemFrameController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/GlowItemFrameController.java @@ -26,6 +26,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.GlowItemFrame; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class GlowItemFrameController extends MobEntityController { } public static class EntityGlowItemFrameNPC extends GlowItemFrame implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityGlowItemFrameNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/InteractionController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/InteractionController.java index e57654454..b17342d37 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/InteractionController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/InteractionController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Interaction; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class InteractionController extends MobEntityController { } public static class EntityInteractionNPC extends Interaction implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityInteractionNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ItemController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ItemController.java index 299b63fff..1884b6807 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ItemController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ItemController.java @@ -28,6 +28,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends ItemEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityItemNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ItemDisplayController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ItemDisplayController.java index 62f8fb693..8bb7890b6 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ItemDisplayController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ItemDisplayController.java @@ -26,6 +26,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -50,6 +51,11 @@ public class ItemDisplayController extends MobEntityController { } public static class EntityItemDisplayNPC extends ItemDisplay implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityItemDisplayNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ItemFrameController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ItemFrameController.java index 55e5c2971..268511169 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ItemFrameController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ItemFrameController.java @@ -25,6 +25,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.ItemFrame; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -48,6 +49,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends ItemFrame implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/LargeFireballController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/LargeFireballController.java index c4d24f4b1..2e9ecf5af 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/LargeFireballController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/LargeFireballController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.LargeFireball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/LeashController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/LeashController.java index 7fd016d05..8c14745ca 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/LeashController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/LeashController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.LeashFenceKnotEntity; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/LlamaSpitController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/LlamaSpitController.java index 585e83106..1b1443f77 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/LlamaSpitController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/LlamaSpitController.java @@ -26,6 +26,7 @@ import net.minecraft.world.entity.animal.horse.Llama; import net.minecraft.world.entity.projectile.LlamaSpit; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -49,6 +50,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MarkerController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MarkerController.java index a1ad86f7c..053f8401c 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MarkerController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MarkerController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Marker; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMarkerNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartChestController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartChestController.java index b48d82f04..49d4df7ea 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartChestController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartChestController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartChest; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartCommandController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartCommandController.java index f686bb03c..ea17a3167 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartCommandController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartCommandBlock; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartFurnaceController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartFurnaceController.java index a43d23721..88b8ee790 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartFurnaceController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartFurnace; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartHopperController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartHopperController.java index db91c7dd6..f8255728b 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartHopperController.java @@ -19,6 +19,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartHopper; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -33,6 +34,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartRideableController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartRideableController.java index a7844e81c..ca21380e7 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartRideableController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.Minecart; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartSpawnerController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartSpawnerController.java index 0551cbdf8..0198d4d9f 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartSpawnerController.java @@ -19,6 +19,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartSpawner; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -33,6 +34,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartTNTController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartTNTController.java index 577a70dd1..80fed1d7d 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/MinecartTNTController.java @@ -19,6 +19,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.vehicle.MinecartTNT; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -33,6 +34,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/PaintingController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/PaintingController.java index c6ef3e927..263436880 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/PaintingController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/PaintingController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.Painting; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ShulkerBulletController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ShulkerBulletController.java index 32bf82ac0..4d612a3f9 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ShulkerBulletController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ShulkerBullet; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/SmallFireballController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/SmallFireballController.java index f666578aa..6c193d9e5 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/SmallFireballController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/SmallFireballController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.SmallFireball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/SnowballController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/SnowballController.java index 4877ec39b..8dca2f3cb 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/SnowballController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/SnowballController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.Snowball; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/SpectralArrowController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/SpectralArrowController.java index dd0c2bc35..4ede097ad 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/SpectralArrowController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.SpectralArrow; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/TNTPrimedController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/TNTPrimedController.java index 2d040fbb0..a45aa62f0 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/TNTPrimedController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.item.PrimedTnt; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/TextDisplayController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/TextDisplayController.java index 9ee96dc3c..24ce9dab4 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/TextDisplayController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/TextDisplayController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class TextDisplayController extends MobEntityController { } public static class EntityTextDisplayNPC extends TextDisplay implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTextDisplayNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ThrownExpBottleController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ThrownExpBottleController.java index de6cbecaa..9d85a00c0 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ThrownExpBottleController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownExperienceBottle; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ThrownPotionController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ThrownPotionController.java index eb1116311..0e0c8900d 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ThrownPotionController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.projectile.ThrownPotion; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends ThrownPotion implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ThrownTridentController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ThrownTridentController.java index 27b4d532c..1c8a4c0b9 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ThrownTridentController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/ThrownTridentController.java @@ -24,6 +24,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.ThrownTrident; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -38,6 +39,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/TippedArrowController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/TippedArrowController.java index ca2939f86..d2bb44e12 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/TippedArrowController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/TippedArrowController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.Arrow; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityType types, Level level) { diff --git a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/WitherSkullController.java b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/WitherSkullController.java index cd5e6ab65..a811a1980 100644 --- a/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/WitherSkullController.java +++ b/v1_20_R1/src/main/java/net/citizensnpcs/nms/v1_20_R1/entity/nonliving/WitherSkullController.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.WitherSkull; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -37,6 +38,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { + @Override + public PushReaction getPistonPushReaction() { + return Util.callPistonPushEvent(npc) ? PushReaction.IGNORE : super.getPistonPushReaction(); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/BatController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/BatController.java index 8c8b6e0fa..27e7d6cb3 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/BatController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/BatController.java @@ -55,7 +55,7 @@ public class BatController extends MobEntityController { super(world); this.npc = (CitizensNPC) npc; if (npc != null) { - setFlying(false); + setAsleep(false); } } @@ -122,8 +122,6 @@ public class BatController extends MobEntityController { } } - - @Override public void g(double x, double y, double z) { Vector vector = Util.callPushEvent(npc, x, y, z); @@ -144,10 +142,6 @@ public class BatController extends MobEntityController { return npc; } - public void setFlying(boolean flying) { - setAsleep(flying); - } - @Override protected String z() { return NMSImpl.getSoundEffect(npc, super.z(), NPC.Metadata.AMBIENT_SOUND);