From da19c909fe12084fba728167ff36c47f4222648c Mon Sep 17 00:00:00 2001 From: fullwall Date: Sun, 13 Nov 2022 20:54:06 +0800 Subject: [PATCH] Implement isPushableByFluid metadata up to 1.13.2 --- .../nms/v1_13_R2/entity/BatController.java | 16 ++++++ .../nms/v1_13_R2/entity/BlazeController.java | 8 +++ .../v1_13_R2/entity/CaveSpiderController.java | 8 +++ .../v1_13_R2/entity/ChickenController.java | 8 +++ .../nms/v1_13_R2/entity/CodController.java | 8 +++ .../nms/v1_13_R2/entity/CowController.java | 8 +++ .../v1_13_R2/entity/CreeperController.java | 8 +++ .../v1_13_R2/entity/DolphinController.java | 8 +++ .../v1_13_R2/entity/DrownedController.java | 8 +++ .../entity/EnderDragonController.java | 8 +++ .../v1_13_R2/entity/EndermanController.java | 8 +++ .../v1_13_R2/entity/EndermiteController.java | 8 +++ .../nms/v1_13_R2/entity/EntityHumanNPC.java | 3 ++ .../nms/v1_13_R2/entity/EvokerController.java | 8 +++ .../nms/v1_13_R2/entity/GhastController.java | 8 +++ .../nms/v1_13_R2/entity/GiantController.java | 8 +++ .../v1_13_R2/entity/GuardianController.java | 8 +++ .../entity/GuardianElderController.java | 8 +++ .../nms/v1_13_R2/entity/HorseController.java | 8 +++ .../entity/HorseDonkeyController.java | 8 +++ .../v1_13_R2/entity/HorseMuleController.java | 8 +++ .../entity/HorseSkeletonController.java | 8 +++ .../entity/HorseZombieController.java | 8 +++ .../nms/v1_13_R2/entity/HumanController.java | 3 ++ .../v1_13_R2/entity/IllusionerController.java | 8 +++ .../v1_13_R2/entity/IronGolemController.java | 8 +++ .../nms/v1_13_R2/entity/LlamaController.java | 8 +++ .../v1_13_R2/entity/MagmaCubeController.java | 8 +++ .../v1_13_R2/entity/MobEntityController.java | 3 ++ .../entity/MushroomCowController.java | 8 +++ .../nms/v1_13_R2/entity/OcelotController.java | 8 +++ .../nms/v1_13_R2/entity/ParrotController.java | 8 +++ .../v1_13_R2/entity/PhantomController.java | 8 +++ .../nms/v1_13_R2/entity/PigController.java | 8 +++ .../v1_13_R2/entity/PigZombieController.java | 8 +++ .../v1_13_R2/entity/PolarBearController.java | 8 +++ .../v1_13_R2/entity/PufferFishController.java | 8 +++ .../nms/v1_13_R2/entity/RabbitController.java | 8 +++ .../nms/v1_13_R2/entity/SalmonController.java | 8 +++ .../nms/v1_13_R2/entity/SheepController.java | 8 +++ .../v1_13_R2/entity/ShulkerController.java | 8 +++ .../v1_13_R2/entity/SilverfishController.java | 8 +++ .../v1_13_R2/entity/SkeletonController.java | 8 +++ .../entity/SkeletonStrayController.java | 8 +++ .../entity/SkeletonWitherController.java | 8 +++ .../nms/v1_13_R2/entity/SlimeController.java | 8 +++ .../v1_13_R2/entity/SnowmanController.java | 8 +++ .../nms/v1_13_R2/entity/SpiderController.java | 8 +++ .../nms/v1_13_R2/entity/SquidController.java | 8 +++ .../entity/TropicalFishController.java | 8 +++ .../nms/v1_13_R2/entity/TurtleController.java | 8 +++ .../nms/v1_13_R2/entity/VexController.java | 8 +++ .../v1_13_R2/entity/VillagerController.java | 8 +++ .../v1_13_R2/entity/VindicatorController.java | 8 +++ .../nms/v1_13_R2/entity/WitchController.java | 8 +++ .../nms/v1_13_R2/entity/WitherController.java | 8 +++ .../nms/v1_13_R2/entity/WolfController.java | 8 +++ .../nms/v1_13_R2/entity/ZombieController.java | 8 +++ .../v1_13_R2/entity/ZombieHuskController.java | 8 +++ .../entity/ZombieVillagerController.java | 8 +++ .../nonliving/AreaEffectCloudController.java | 8 +++ .../nonliving/ArmorStandController.java | 8 +++ .../entity/nonliving/BoatController.java | 8 +++ .../nonliving/DragonFireballController.java | 8 +++ .../entity/nonliving/EggController.java | 8 +++ .../nonliving/EnderCrystalController.java | 8 +++ .../nonliving/EnderPearlController.java | 8 +++ .../nonliving/EnderSignalController.java | 8 +++ .../nonliving/EvokerFangsController.java | 8 +++ .../nonliving/ExperienceOrbController.java | 8 +++ .../nonliving/FallingBlockController.java | 8 +++ .../entity/nonliving/FireworkController.java | 8 +++ .../nonliving/FishingHookController.java | 8 +++ .../entity/nonliving/ItemController.java | 8 +++ .../entity/nonliving/ItemFrameController.java | 8 +++ .../nonliving/LargeFireballController.java | 8 +++ .../entity/nonliving/LeashController.java | 8 +++ .../entity/nonliving/LlamaSpitController.java | 8 +++ .../nonliving/MinecartChestController.java | 8 +++ .../nonliving/MinecartCommandController.java | 8 +++ .../nonliving/MinecartFurnaceController.java | 8 +++ .../nonliving/MinecartHopperController.java | 8 +++ .../nonliving/MinecartRideableController.java | 8 +++ .../nonliving/MinecartSpawnerController.java | 8 +++ .../nonliving/MinecartTNTController.java | 8 +++ .../entity/nonliving/PaintingController.java | 8 +++ .../nonliving/ShulkerBulletController.java | 8 +++ .../nonliving/SmallFireballController.java | 8 +++ .../entity/nonliving/SnowballController.java | 8 +++ .../nonliving/SpectralArrowController.java | 8 +++ .../entity/nonliving/TNTPrimedController.java | 8 +++ .../nonliving/ThrownExpBottleController.java | 8 +++ .../nonliving/ThrownPotionController.java | 8 +++ .../nonliving/ThrownTridentController.java | 8 +++ .../nonliving/TippedArrowController.java | 8 +++ .../nonliving/WitherSkullController.java | 8 +++ .../nms/v1_14_R1/entity/BatController.java | 10 +++- .../nms/v1_14_R1/entity/BlazeController.java | 10 +++- .../nms/v1_14_R1/entity/CatController.java | 10 +++- .../v1_14_R1/entity/CaveSpiderController.java | 10 +++- .../v1_14_R1/entity/ChickenController.java | 10 +++- .../nms/v1_14_R1/entity/CodController.java | 10 +++- .../nms/v1_14_R1/entity/CowController.java | 10 +++- .../v1_14_R1/entity/CreeperController.java | 10 +++- .../v1_14_R1/entity/DolphinController.java | 10 +++- .../v1_14_R1/entity/DrownedController.java | 10 +++- .../entity/EnderDragonController.java | 10 +++- .../v1_14_R1/entity/EndermanController.java | 10 +++- .../v1_14_R1/entity/EndermiteController.java | 10 +++- .../nms/v1_14_R1/entity/EntityHumanNPC.java | 5 +- .../nms/v1_14_R1/entity/EvokerController.java | 10 +++- .../nms/v1_14_R1/entity/FoxController.java | 10 +++- .../nms/v1_14_R1/entity/GhastController.java | 10 +++- .../nms/v1_14_R1/entity/GiantController.java | 10 +++- .../v1_14_R1/entity/GuardianController.java | 10 +++- .../entity/GuardianElderController.java | 10 +++- .../nms/v1_14_R1/entity/HorseController.java | 10 +++- .../entity/HorseDonkeyController.java | 10 +++- .../v1_14_R1/entity/HorseMuleController.java | 10 +++- .../entity/HorseSkeletonController.java | 10 +++- .../entity/HorseZombieController.java | 10 +++- .../nms/v1_14_R1/entity/HumanController.java | 5 +- .../v1_14_R1/entity/IllusionerController.java | 10 +++- .../v1_14_R1/entity/IronGolemController.java | 10 +++- .../nms/v1_14_R1/entity/LlamaController.java | 10 +++- .../v1_14_R1/entity/MagmaCubeController.java | 10 +++- .../v1_14_R1/entity/MobEntityController.java | 5 +- .../entity/MushroomCowController.java | 10 +++- .../nms/v1_14_R1/entity/OcelotController.java | 10 +++- .../nms/v1_14_R1/entity/PandaController.java | 10 +++- .../nms/v1_14_R1/entity/ParrotController.java | 10 +++- .../v1_14_R1/entity/PhantomController.java | 10 +++- .../nms/v1_14_R1/entity/PigController.java | 10 +++- .../v1_14_R1/entity/PigZombieController.java | 10 +++- .../v1_14_R1/entity/PillagerController.java | 10 +++- .../v1_14_R1/entity/PolarBearController.java | 10 +++- .../v1_14_R1/entity/PufferFishController.java | 10 +++- .../nms/v1_14_R1/entity/RabbitController.java | 10 +++- .../v1_14_R1/entity/RavagerController.java | 10 +++- .../nms/v1_14_R1/entity/SalmonController.java | 10 +++- .../nms/v1_14_R1/entity/SheepController.java | 10 +++- .../v1_14_R1/entity/ShulkerController.java | 10 +++- .../v1_14_R1/entity/SilverfishController.java | 10 +++- .../v1_14_R1/entity/SkeletonController.java | 10 +++- .../entity/SkeletonStrayController.java | 10 +++- .../entity/SkeletonWitherController.java | 10 +++- .../nms/v1_14_R1/entity/SlimeController.java | 10 +++- .../v1_14_R1/entity/SnowmanController.java | 10 +++- .../nms/v1_14_R1/entity/SpiderController.java | 10 +++- .../nms/v1_14_R1/entity/SquidController.java | 10 +++- .../entity/TraderLlamaController.java | 10 +++- .../entity/TropicalFishController.java | 10 +++- .../nms/v1_14_R1/entity/TurtleController.java | 10 +++- .../nms/v1_14_R1/entity/VexController.java | 10 +++- .../v1_14_R1/entity/VillagerController.java | 10 +++- .../v1_14_R1/entity/VindicatorController.java | 10 +++- .../entity/WanderingTraderController.java | 10 +++- .../nms/v1_14_R1/entity/WitchController.java | 10 +++- .../nms/v1_14_R1/entity/WitherController.java | 10 +++- .../nms/v1_14_R1/entity/WolfController.java | 10 +++- .../nms/v1_14_R1/entity/ZombieController.java | 10 +++- .../v1_14_R1/entity/ZombieHuskController.java | 10 +++- .../entity/ZombieVillagerController.java | 10 +++- .../nonliving/AreaEffectCloudController.java | 10 +++- .../nonliving/ArmorStandController.java | 10 +++- .../entity/nonliving/BoatController.java | 10 +++- .../nonliving/DragonFireballController.java | 10 +++- .../entity/nonliving/EggController.java | 10 +++- .../nonliving/EnderCrystalController.java | 10 +++- .../nonliving/EnderPearlController.java | 10 +++- .../nonliving/EnderSignalController.java | 10 +++- .../nonliving/EvokerFangsController.java | 10 +++- .../nonliving/ExperienceOrbController.java | 10 +++- .../nonliving/FallingBlockController.java | 10 +++- .../entity/nonliving/FireworkController.java | 10 +++- .../nonliving/FishingHookController.java | 10 +++- .../entity/nonliving/ItemController.java | 10 +++- .../entity/nonliving/ItemFrameController.java | 10 +++- .../nonliving/LargeFireballController.java | 10 +++- .../entity/nonliving/LeashController.java | 10 +++- .../entity/nonliving/LlamaSpitController.java | 10 +++- .../nonliving/MinecartChestController.java | 10 +++- .../nonliving/MinecartCommandController.java | 10 +++- .../nonliving/MinecartFurnaceController.java | 10 +++- .../nonliving/MinecartHopperController.java | 10 +++- .../nonliving/MinecartRideableController.java | 10 +++- .../nonliving/MinecartSpawnerController.java | 10 +++- .../nonliving/MinecartTNTController.java | 10 +++- .../entity/nonliving/PaintingController.java | 10 +++- .../nonliving/ShulkerBulletController.java | 10 +++- .../nonliving/SmallFireballController.java | 10 +++- .../entity/nonliving/SnowballController.java | 10 +++- .../nonliving/SpectralArrowController.java | 10 +++- .../entity/nonliving/TNTPrimedController.java | 10 +++- .../nonliving/ThrownExpBottleController.java | 10 +++- .../nonliving/ThrownPotionController.java | 10 +++- .../nonliving/ThrownTridentController.java | 10 +++- .../nonliving/TippedArrowController.java | 10 +++- .../nonliving/WitherSkullController.java | 10 +++- .../nms/v1_15_R1/entity/BatController.java | 4 +- .../nms/v1_15_R1/entity/BeeController.java | 4 +- .../nms/v1_15_R1/entity/BlazeController.java | 4 +- .../nms/v1_15_R1/entity/CatController.java | 4 +- .../v1_15_R1/entity/CaveSpiderController.java | 4 +- .../v1_15_R1/entity/ChickenController.java | 4 +- .../nms/v1_15_R1/entity/CodController.java | 4 +- .../nms/v1_15_R1/entity/CowController.java | 4 +- .../v1_15_R1/entity/CreeperController.java | 4 +- .../v1_15_R1/entity/DolphinController.java | 4 +- .../v1_15_R1/entity/DrownedController.java | 4 +- .../entity/EnderDragonController.java | 4 +- .../v1_15_R1/entity/EndermanController.java | 4 +- .../v1_15_R1/entity/EndermiteController.java | 4 +- .../nms/v1_15_R1/entity/EntityHumanNPC.java | 2 +- .../nms/v1_15_R1/entity/EvokerController.java | 4 +- .../nms/v1_15_R1/entity/FoxController.java | 4 +- .../nms/v1_15_R1/entity/GhastController.java | 4 +- .../nms/v1_15_R1/entity/GiantController.java | 4 +- .../v1_15_R1/entity/GuardianController.java | 4 +- .../entity/GuardianElderController.java | 4 +- .../nms/v1_15_R1/entity/HorseController.java | 4 +- .../entity/HorseDonkeyController.java | 4 +- .../v1_15_R1/entity/HorseMuleController.java | 4 +- .../entity/HorseSkeletonController.java | 4 +- .../entity/HorseZombieController.java | 4 +- .../nms/v1_15_R1/entity/HumanController.java | 2 +- .../v1_15_R1/entity/IllusionerController.java | 4 +- .../v1_15_R1/entity/IronGolemController.java | 4 +- .../nms/v1_15_R1/entity/LlamaController.java | 4 +- .../v1_15_R1/entity/MagmaCubeController.java | 4 +- .../v1_15_R1/entity/MobEntityController.java | 2 +- .../entity/MushroomCowController.java | 4 +- .../nms/v1_15_R1/entity/OcelotController.java | 4 +- .../nms/v1_15_R1/entity/PandaController.java | 4 +- .../nms/v1_15_R1/entity/ParrotController.java | 4 +- .../v1_15_R1/entity/PhantomController.java | 4 +- .../nms/v1_15_R1/entity/PigController.java | 4 +- .../v1_15_R1/entity/PigZombieController.java | 4 +- .../v1_15_R1/entity/PillagerController.java | 4 +- .../v1_15_R1/entity/PolarBearController.java | 4 +- .../v1_15_R1/entity/PufferFishController.java | 4 +- .../nms/v1_15_R1/entity/RabbitController.java | 4 +- .../v1_15_R1/entity/RavagerController.java | 4 +- .../nms/v1_15_R1/entity/SalmonController.java | 4 +- .../nms/v1_15_R1/entity/SheepController.java | 4 +- .../v1_15_R1/entity/ShulkerController.java | 4 +- .../v1_15_R1/entity/SilverfishController.java | 4 +- .../v1_15_R1/entity/SkeletonController.java | 4 +- .../entity/SkeletonStrayController.java | 4 +- .../entity/SkeletonWitherController.java | 4 +- .../nms/v1_15_R1/entity/SlimeController.java | 4 +- .../v1_15_R1/entity/SnowmanController.java | 4 +- .../nms/v1_15_R1/entity/SpiderController.java | 4 +- .../nms/v1_15_R1/entity/SquidController.java | 4 +- .../entity/TraderLlamaController.java | 4 +- .../entity/TropicalFishController.java | 4 +- .../nms/v1_15_R1/entity/TurtleController.java | 4 +- .../nms/v1_15_R1/entity/VexController.java | 4 +- .../v1_15_R1/entity/VillagerController.java | 4 +- .../v1_15_R1/entity/VindicatorController.java | 4 +- .../entity/WanderingTraderController.java | 4 +- .../nms/v1_15_R1/entity/WitchController.java | 4 +- .../nms/v1_15_R1/entity/WitherController.java | 4 +- .../nms/v1_15_R1/entity/WolfController.java | 4 +- .../nms/v1_15_R1/entity/ZombieController.java | 4 +- .../v1_15_R1/entity/ZombieHuskController.java | 4 +- .../entity/ZombieVillagerController.java | 4 +- .../nonliving/AreaEffectCloudController.java | 40 ++++++++------- .../nonliving/ArmorStandController.java | 36 ++++++------- .../entity/nonliving/BoatController.java | 20 ++++---- .../nonliving/DragonFireballController.java | 46 ++++++++--------- .../entity/nonliving/EggController.java | 36 ++++++------- .../nonliving/EnderCrystalController.java | 36 ++++++------- .../nonliving/EnderPearlController.java | 36 ++++++------- .../nonliving/EnderSignalController.java | 36 ++++++------- .../nonliving/EvokerFangsController.java | 36 ++++++------- .../nonliving/ExperienceOrbController.java | 36 ++++++------- .../nonliving/FallingBlockController.java | 25 ++++++---- .../entity/nonliving/FireworkController.java | 36 ++++++------- .../nonliving/FishingHookController.java | 36 ++++++------- .../entity/nonliving/ItemController.java | 9 +++- .../entity/nonliving/ItemFrameController.java | 9 +++- .../nonliving/LargeFireballController.java | 50 +++++++++---------- .../entity/nonliving/LeashController.java | 36 ++++++------- .../entity/nonliving/LlamaSpitController.java | 36 ++++++------- .../nonliving/MinecartChestController.java | 20 ++++---- .../nonliving/MinecartCommandController.java | 20 ++++---- .../nonliving/MinecartFurnaceController.java | 20 ++++---- .../nonliving/MinecartHopperController.java | 4 +- .../nonliving/MinecartRideableController.java | 20 ++++---- .../nonliving/MinecartSpawnerController.java | 4 +- .../nonliving/MinecartTNTController.java | 4 +- .../entity/nonliving/PaintingController.java | 36 ++++++------- .../nonliving/ShulkerBulletController.java | 36 ++++++------- .../nonliving/SmallFireballController.java | 36 ++++++------- .../entity/nonliving/SnowballController.java | 36 ++++++------- .../nonliving/SpectralArrowController.java | 36 ++++++------- .../entity/nonliving/TNTPrimedController.java | 36 ++++++------- .../nonliving/ThrownExpBottleController.java | 36 ++++++------- .../nonliving/ThrownPotionController.java | 46 +++++++---------- .../nonliving/ThrownTridentController.java | 36 ++++++------- .../nonliving/TippedArrowController.java | 20 ++++---- .../nonliving/WitherSkullController.java | 36 ++++++------- .../nms/v1_16_R3/entity/BatController.java | 14 ++++++ .../nms/v1_16_R3/entity/BeeController.java | 14 ++++++ .../nms/v1_16_R3/entity/BlazeController.java | 14 ++++++ .../nms/v1_16_R3/entity/CatController.java | 15 ++++++ .../v1_16_R3/entity/CaveSpiderController.java | 14 ++++++ .../v1_16_R3/entity/ChickenController.java | 15 ++++++ .../nms/v1_16_R3/entity/CodController.java | 14 ++++++ .../nms/v1_16_R3/entity/CowController.java | 15 ++++++ .../v1_16_R3/entity/CreeperController.java | 14 ++++++ .../v1_16_R3/entity/DolphinController.java | 15 ++++++ .../v1_16_R3/entity/DrownedController.java | 14 ++++++ .../entity/EnderDragonController.java | 14 ++++++ .../v1_16_R3/entity/EndermanController.java | 14 ++++++ .../v1_16_R3/entity/EndermiteController.java | 14 ++++++ .../nms/v1_16_R3/entity/EntityHumanNPC.java | 2 + .../nms/v1_16_R3/entity/EvokerController.java | 14 ++++++ .../nms/v1_16_R3/entity/FoxController.java | 15 ++++++ .../nms/v1_16_R3/entity/GhastController.java | 14 ++++++ .../nms/v1_16_R3/entity/GiantController.java | 14 ++++++ .../v1_16_R3/entity/GuardianController.java | 14 ++++++ .../entity/GuardianElderController.java | 14 ++++++ .../nms/v1_16_R3/entity/HoglinController.java | 14 ++++++ .../nms/v1_16_R3/entity/HorseController.java | 14 ++++++ .../entity/HorseDonkeyController.java | 14 ++++++ .../v1_16_R3/entity/HorseMuleController.java | 14 ++++++ .../entity/HorseSkeletonController.java | 14 ++++++ .../entity/HorseZombieController.java | 14 ++++++ .../nms/v1_16_R3/entity/HumanController.java | 2 + .../v1_16_R3/entity/IllusionerController.java | 14 ++++++ .../v1_16_R3/entity/IronGolemController.java | 14 ++++++ .../nms/v1_16_R3/entity/LlamaController.java | 15 ++++++ .../v1_16_R3/entity/MagmaCubeController.java | 14 ++++++ .../v1_16_R3/entity/MobEntityController.java | 2 + .../entity/MushroomCowController.java | 15 ++++++ .../nms/v1_16_R3/entity/OcelotController.java | 15 ++++++ .../nms/v1_16_R3/entity/PandaController.java | 15 ++++++ .../nms/v1_16_R3/entity/ParrotController.java | 14 ++++++ .../v1_16_R3/entity/PhantomController.java | 15 ++++++ .../nms/v1_16_R3/entity/PigController.java | 15 ++++++ .../v1_16_R3/entity/PigZombieController.java | 14 ++++++ .../entity/PiglinBruteController.java | 14 ++++++ .../nms/v1_16_R3/entity/PiglinController.java | 14 ++++++ .../v1_16_R3/entity/PillagerController.java | 15 ++++++ .../v1_16_R3/entity/PolarBearController.java | 14 ++++++ .../v1_16_R3/entity/PufferFishController.java | 14 ++++++ .../nms/v1_16_R3/entity/RabbitController.java | 14 ++++++ .../v1_16_R3/entity/RavagerController.java | 15 ++++++ .../nms/v1_16_R3/entity/SalmonController.java | 14 ++++++ .../nms/v1_16_R3/entity/SheepController.java | 14 ++++++ .../v1_16_R3/entity/ShulkerController.java | 14 ++++++ .../v1_16_R3/entity/SilverfishController.java | 14 ++++++ .../v1_16_R3/entity/SkeletonController.java | 14 ++++++ .../entity/SkeletonStrayController.java | 14 ++++++ .../entity/SkeletonWitherController.java | 14 ++++++ .../nms/v1_16_R3/entity/SlimeController.java | 14 ++++++ .../v1_16_R3/entity/SnowmanController.java | 14 ++++++ .../nms/v1_16_R3/entity/SpiderController.java | 14 ++++++ .../nms/v1_16_R3/entity/SquidController.java | 14 ++++++ .../v1_16_R3/entity/StriderController.java | 14 ++++++ .../entity/TraderLlamaController.java | 15 ++++++ .../entity/TropicalFishController.java | 14 ++++++ .../nms/v1_16_R3/entity/TurtleController.java | 14 ++++++ .../nms/v1_16_R3/entity/VexController.java | 14 ++++++ .../v1_16_R3/entity/VillagerController.java | 14 ++++++ .../v1_16_R3/entity/VindicatorController.java | 14 ++++++ .../entity/WanderingTraderController.java | 14 ++++++ .../nms/v1_16_R3/entity/WitchController.java | 14 ++++++ .../nms/v1_16_R3/entity/WitherController.java | 14 ++++++ .../nms/v1_16_R3/entity/WolfController.java | 14 ++++++ .../nms/v1_16_R3/entity/ZoglinController.java | 14 ++++++ .../nms/v1_16_R3/entity/ZombieController.java | 14 ++++++ .../v1_16_R3/entity/ZombieHuskController.java | 14 ++++++ .../entity/ZombieVillagerController.java | 14 ++++++ .../nonliving/AreaEffectCloudController.java | 14 ++++++ .../nonliving/ArmorStandController.java | 14 ++++++ .../entity/nonliving/BoatController.java | 14 ++++++ .../nonliving/DragonFireballController.java | 14 ++++++ .../entity/nonliving/EggController.java | 14 ++++++ .../nonliving/EnderCrystalController.java | 14 ++++++ .../nonliving/EnderPearlController.java | 14 ++++++ .../nonliving/EnderSignalController.java | 14 ++++++ .../nonliving/EvokerFangsController.java | 14 ++++++ .../nonliving/ExperienceOrbController.java | 14 ++++++ .../nonliving/FallingBlockController.java | 14 ++++++ .../entity/nonliving/FireworkController.java | 14 ++++++ .../nonliving/FishingHookController.java | 15 ++++++ .../entity/nonliving/ItemController.java | 14 ++++++ .../entity/nonliving/ItemFrameController.java | 14 ++++++ .../nonliving/LargeFireballController.java | 14 ++++++ .../entity/nonliving/LeashController.java | 14 ++++++ .../entity/nonliving/LlamaSpitController.java | 14 ++++++ .../nonliving/MinecartChestController.java | 14 ++++++ .../nonliving/MinecartCommandController.java | 14 ++++++ .../nonliving/MinecartFurnaceController.java | 14 ++++++ .../nonliving/MinecartHopperController.java | 14 ++++++ .../nonliving/MinecartRideableController.java | 14 ++++++ .../nonliving/MinecartSpawnerController.java | 14 ++++++ .../nonliving/MinecartTNTController.java | 14 ++++++ .../entity/nonliving/PaintingController.java | 14 ++++++ .../nonliving/ShulkerBulletController.java | 14 ++++++ .../nonliving/SmallFireballController.java | 14 ++++++ .../entity/nonliving/SnowballController.java | 14 ++++++ .../nonliving/SpectralArrowController.java | 14 ++++++ .../entity/nonliving/TNTPrimedController.java | 14 ++++++ .../nonliving/ThrownExpBottleController.java | 14 ++++++ .../nonliving/ThrownPotionController.java | 14 ++++++ .../nonliving/ThrownTridentController.java | 14 ++++++ .../nonliving/TippedArrowController.java | 14 ++++++ .../nonliving/WitherSkullController.java | 14 ++++++ .../v1_17_R1/entity/AxolotlController.java | 12 +++++ .../nms/v1_17_R1/entity/BatController.java | 13 +++++ .../nms/v1_17_R1/entity/BeeController.java | 13 +++++ .../nms/v1_17_R1/entity/BlazeController.java | 13 +++++ .../nms/v1_17_R1/entity/CatController.java | 12 +++++ .../v1_17_R1/entity/CaveSpiderController.java | 12 +++++ .../v1_17_R1/entity/ChickenController.java | 12 +++++ .../nms/v1_17_R1/entity/CodController.java | 12 +++++ .../nms/v1_17_R1/entity/CowController.java | 12 +++++ .../v1_17_R1/entity/CreeperController.java | 12 +++++ .../v1_17_R1/entity/DolphinController.java | 12 +++++ .../v1_17_R1/entity/DrownedController.java | 12 +++++ .../entity/EnderDragonController.java | 12 +++++ .../v1_17_R1/entity/EndermanController.java | 12 +++++ .../v1_17_R1/entity/EndermiteController.java | 12 +++++ .../nms/v1_17_R1/entity/EvokerController.java | 12 +++++ .../nms/v1_17_R1/entity/FoxController.java | 12 +++++ .../nms/v1_17_R1/entity/GhastController.java | 13 +++++ .../nms/v1_17_R1/entity/GiantController.java | 12 +++++ .../v1_17_R1/entity/GlowSquidController.java | 12 +++++ .../nms/v1_17_R1/entity/GoatController.java | 12 +++++ .../v1_17_R1/entity/GuardianController.java | 12 +++++ .../entity/GuardianElderController.java | 12 +++++ .../nms/v1_17_R1/entity/HoglinController.java | 12 +++++ .../nms/v1_17_R1/entity/HorseController.java | 12 +++++ .../entity/HorseDonkeyController.java | 12 +++++ .../v1_17_R1/entity/HorseMuleController.java | 12 +++++ .../entity/HorseSkeletonController.java | 12 +++++ .../entity/HorseZombieController.java | 12 +++++ .../v1_17_R1/entity/IllusionerController.java | 12 +++++ .../v1_17_R1/entity/IronGolemController.java | 12 +++++ .../nms/v1_17_R1/entity/LlamaController.java | 12 +++++ .../v1_17_R1/entity/MagmaCubeController.java | 12 +++++ .../entity/MushroomCowController.java | 12 +++++ .../nms/v1_17_R1/entity/OcelotController.java | 12 +++++ .../nms/v1_17_R1/entity/PandaController.java | 12 +++++ .../nms/v1_17_R1/entity/ParrotController.java | 13 +++++ .../v1_17_R1/entity/PhantomController.java | 12 +++++ .../nms/v1_17_R1/entity/PigController.java | 12 +++++ .../v1_17_R1/entity/PigZombieController.java | 12 +++++ .../entity/PiglinBruteController.java | 12 +++++ .../nms/v1_17_R1/entity/PiglinController.java | 12 +++++ .../v1_17_R1/entity/PillagerController.java | 12 +++++ .../v1_17_R1/entity/PolarBearController.java | 13 +++++ .../v1_17_R1/entity/PufferFishController.java | 12 +++++ .../nms/v1_17_R1/entity/RabbitController.java | 12 +++++ .../v1_17_R1/entity/RavagerController.java | 12 +++++ .../nms/v1_17_R1/entity/SalmonController.java | 12 +++++ .../nms/v1_17_R1/entity/SheepController.java | 12 +++++ .../v1_17_R1/entity/ShulkerController.java | 12 +++++ .../v1_17_R1/entity/SilverfishController.java | 12 +++++ .../v1_17_R1/entity/SkeletonController.java | 12 +++++ .../entity/SkeletonStrayController.java | 12 +++++ .../entity/SkeletonWitherController.java | 12 +++++ .../nms/v1_17_R1/entity/SlimeController.java | 12 +++++ .../v1_17_R1/entity/SnowmanController.java | 12 +++++ .../nms/v1_17_R1/entity/SpiderController.java | 12 +++++ .../nms/v1_17_R1/entity/SquidController.java | 12 +++++ .../v1_17_R1/entity/StriderController.java | 12 +++++ .../entity/TraderLlamaController.java | 12 +++++ .../entity/TropicalFishController.java | 12 +++++ .../nms/v1_17_R1/entity/TurtleController.java | 12 +++++ .../nms/v1_17_R1/entity/VexController.java | 13 +++++ .../v1_17_R1/entity/VillagerController.java | 12 +++++ .../v1_17_R1/entity/VindicatorController.java | 12 +++++ .../entity/WanderingTraderController.java | 12 +++++ .../nms/v1_17_R1/entity/WitchController.java | 12 +++++ .../nms/v1_17_R1/entity/WitherController.java | 13 +++++ .../nms/v1_17_R1/entity/WolfController.java | 12 +++++ .../nms/v1_17_R1/entity/ZoglinController.java | 12 +++++ .../nms/v1_17_R1/entity/ZombieController.java | 12 +++++ .../v1_17_R1/entity/ZombieHuskController.java | 12 +++++ .../entity/ZombieVillagerController.java | 12 +++++ .../nonliving/AreaEffectCloudController.java | 13 +++++ .../nonliving/ArmorStandController.java | 12 +++++ .../entity/nonliving/BoatController.java | 12 +++++ .../nonliving/DragonFireballController.java | 13 +++++ .../entity/nonliving/EggController.java | 13 +++++ .../nonliving/EnderCrystalController.java | 13 +++++ .../nonliving/EnderPearlController.java | 13 +++++ .../nonliving/EnderSignalController.java | 13 +++++ .../nonliving/EvokerFangsController.java | 12 +++++ .../nonliving/ExperienceOrbController.java | 13 +++++ .../nonliving/FallingBlockController.java | 12 +++++ .../entity/nonliving/FireworkController.java | 13 +++++ .../nonliving/FishingHookController.java | 13 +++++ .../nonliving/GlowItemFrameController.java | 13 +++++ .../entity/nonliving/ItemController.java | 13 +++++ .../entity/nonliving/ItemFrameController.java | 13 +++++ .../nonliving/LargeFireballController.java | 13 +++++ .../entity/nonliving/LeashController.java | 13 +++++ .../entity/nonliving/LlamaSpitController.java | 13 +++++ .../entity/nonliving/MarkerController.java | 13 +++++ .../nonliving/MinecartChestController.java | 13 +++++ .../nonliving/MinecartCommandController.java | 13 +++++ .../nonliving/MinecartFurnaceController.java | 13 +++++ .../nonliving/MinecartHopperController.java | 13 +++++ .../nonliving/MinecartRideableController.java | 13 +++++ .../nonliving/MinecartSpawnerController.java | 13 +++++ .../nonliving/MinecartTNTController.java | 13 +++++ .../entity/nonliving/PaintingController.java | 13 +++++ .../nonliving/ShulkerBulletController.java | 13 +++++ .../nonliving/SmallFireballController.java | 13 +++++ .../entity/nonliving/SnowballController.java | 13 +++++ .../nonliving/SpectralArrowController.java | 13 +++++ .../entity/nonliving/TNTPrimedController.java | 13 +++++ .../nonliving/ThrownExpBottleController.java | 13 +++++ .../nonliving/ThrownPotionController.java | 13 +++++ .../nonliving/ThrownTridentController.java | 13 +++++ .../nonliving/TippedArrowController.java | 13 +++++ .../nonliving/WitherSkullController.java | 13 +++++ .../v1_18_R2/entity/AxolotlController.java | 12 +++++ .../nms/v1_18_R2/entity/BatController.java | 13 +++++ .../nms/v1_18_R2/entity/BeeController.java | 13 +++++ .../nms/v1_18_R2/entity/BlazeController.java | 13 +++++ .../nms/v1_18_R2/entity/CatController.java | 12 +++++ .../v1_18_R2/entity/CaveSpiderController.java | 12 +++++ .../v1_18_R2/entity/ChickenController.java | 12 +++++ .../nms/v1_18_R2/entity/CodController.java | 12 +++++ .../nms/v1_18_R2/entity/CowController.java | 12 +++++ .../v1_18_R2/entity/CreeperController.java | 12 +++++ .../v1_18_R2/entity/DolphinController.java | 12 +++++ .../v1_18_R2/entity/DrownedController.java | 12 +++++ .../entity/EnderDragonController.java | 12 +++++ .../v1_18_R2/entity/EndermanController.java | 12 +++++ .../v1_18_R2/entity/EndermiteController.java | 12 +++++ .../nms/v1_18_R2/entity/EvokerController.java | 12 +++++ .../nms/v1_18_R2/entity/FoxController.java | 12 +++++ .../nms/v1_18_R2/entity/GhastController.java | 13 +++++ .../nms/v1_18_R2/entity/GiantController.java | 12 +++++ .../v1_18_R2/entity/GlowSquidController.java | 12 +++++ .../nms/v1_18_R2/entity/GoatController.java | 12 +++++ .../v1_18_R2/entity/GuardianController.java | 12 +++++ .../entity/GuardianElderController.java | 12 +++++ .../nms/v1_18_R2/entity/HoglinController.java | 12 +++++ .../nms/v1_18_R2/entity/HorseController.java | 12 +++++ .../entity/HorseDonkeyController.java | 12 +++++ .../v1_18_R2/entity/HorseMuleController.java | 12 +++++ .../entity/HorseSkeletonController.java | 12 +++++ .../entity/HorseZombieController.java | 12 +++++ .../v1_18_R2/entity/IllusionerController.java | 12 +++++ .../v1_18_R2/entity/IronGolemController.java | 12 +++++ .../nms/v1_18_R2/entity/LlamaController.java | 12 +++++ .../v1_18_R2/entity/MagmaCubeController.java | 12 +++++ .../entity/MushroomCowController.java | 12 +++++ .../nms/v1_18_R2/entity/OcelotController.java | 12 +++++ .../nms/v1_18_R2/entity/PandaController.java | 12 +++++ .../nms/v1_18_R2/entity/ParrotController.java | 13 +++++ .../v1_18_R2/entity/PhantomController.java | 12 +++++ .../nms/v1_18_R2/entity/PigController.java | 12 +++++ .../v1_18_R2/entity/PigZombieController.java | 12 +++++ .../entity/PiglinBruteController.java | 12 +++++ .../nms/v1_18_R2/entity/PiglinController.java | 12 +++++ .../v1_18_R2/entity/PillagerController.java | 12 +++++ .../v1_18_R2/entity/PolarBearController.java | 13 +++++ .../v1_18_R2/entity/PufferFishController.java | 12 +++++ .../nms/v1_18_R2/entity/RabbitController.java | 12 +++++ .../v1_18_R2/entity/RavagerController.java | 12 +++++ .../nms/v1_18_R2/entity/SalmonController.java | 12 +++++ .../nms/v1_18_R2/entity/SheepController.java | 12 +++++ .../v1_18_R2/entity/ShulkerController.java | 12 +++++ .../v1_18_R2/entity/SilverfishController.java | 12 +++++ .../v1_18_R2/entity/SkeletonController.java | 12 +++++ .../entity/SkeletonStrayController.java | 12 +++++ .../entity/SkeletonWitherController.java | 12 +++++ .../nms/v1_18_R2/entity/SlimeController.java | 12 +++++ .../v1_18_R2/entity/SnowmanController.java | 12 +++++ .../nms/v1_18_R2/entity/SpiderController.java | 12 +++++ .../nms/v1_18_R2/entity/SquidController.java | 12 +++++ .../v1_18_R2/entity/StriderController.java | 12 +++++ .../entity/TraderLlamaController.java | 12 +++++ .../entity/TropicalFishController.java | 12 +++++ .../nms/v1_18_R2/entity/TurtleController.java | 12 +++++ .../nms/v1_18_R2/entity/VexController.java | 13 +++++ .../v1_18_R2/entity/VillagerController.java | 12 +++++ .../v1_18_R2/entity/VindicatorController.java | 12 +++++ .../entity/WanderingTraderController.java | 12 +++++ .../nms/v1_18_R2/entity/WitchController.java | 12 +++++ .../nms/v1_18_R2/entity/WitherController.java | 13 +++++ .../nms/v1_18_R2/entity/WolfController.java | 12 +++++ .../nms/v1_18_R2/entity/ZoglinController.java | 12 +++++ .../nms/v1_18_R2/entity/ZombieController.java | 12 +++++ .../v1_18_R2/entity/ZombieHuskController.java | 12 +++++ .../entity/ZombieVillagerController.java | 12 +++++ .../nonliving/AreaEffectCloudController.java | 13 +++++ .../nonliving/ArmorStandController.java | 12 +++++ .../entity/nonliving/BoatController.java | 12 +++++ .../nonliving/DragonFireballController.java | 13 +++++ .../entity/nonliving/EggController.java | 13 +++++ .../nonliving/EnderCrystalController.java | 13 +++++ .../nonliving/EnderPearlController.java | 13 +++++ .../nonliving/EnderSignalController.java | 13 +++++ .../nonliving/EvokerFangsController.java | 12 +++++ .../nonliving/ExperienceOrbController.java | 13 +++++ .../nonliving/FallingBlockController.java | 15 +++++- .../entity/nonliving/FireworkController.java | 13 +++++ .../nonliving/FishingHookController.java | 13 +++++ .../nonliving/GlowItemFrameController.java | 13 +++++ .../entity/nonliving/ItemController.java | 13 +++++ .../entity/nonliving/ItemFrameController.java | 13 +++++ .../nonliving/LargeFireballController.java | 13 +++++ .../entity/nonliving/LeashController.java | 13 +++++ .../entity/nonliving/LlamaSpitController.java | 13 +++++ .../entity/nonliving/MarkerController.java | 13 +++++ .../nonliving/MinecartChestController.java | 13 +++++ .../nonliving/MinecartCommandController.java | 13 +++++ .../nonliving/MinecartFurnaceController.java | 13 +++++ .../nonliving/MinecartHopperController.java | 13 +++++ .../nonliving/MinecartRideableController.java | 13 +++++ .../nonliving/MinecartSpawnerController.java | 13 +++++ .../nonliving/MinecartTNTController.java | 13 +++++ .../entity/nonliving/PaintingController.java | 13 +++++ .../nonliving/ShulkerBulletController.java | 13 +++++ .../nonliving/SmallFireballController.java | 13 +++++ .../entity/nonliving/SnowballController.java | 13 +++++ .../nonliving/SpectralArrowController.java | 13 +++++ .../entity/nonliving/TNTPrimedController.java | 13 +++++ .../nonliving/ThrownExpBottleController.java | 13 +++++ .../nonliving/ThrownPotionController.java | 13 +++++ .../nonliving/ThrownTridentController.java | 13 +++++ .../nonliving/TippedArrowController.java | 13 +++++ .../nonliving/WitherSkullController.java | 13 +++++ .../nms/v1_19_R1/entity/AllayController.java | 12 +++++ .../v1_19_R1/entity/AxolotlController.java | 12 +++++ .../nms/v1_19_R1/entity/BatController.java | 13 +++++ .../nms/v1_19_R1/entity/BeeController.java | 13 +++++ .../nms/v1_19_R1/entity/BlazeController.java | 13 +++++ .../nms/v1_19_R1/entity/CatController.java | 12 +++++ .../v1_19_R1/entity/CaveSpiderController.java | 12 +++++ .../v1_19_R1/entity/ChickenController.java | 12 +++++ .../nms/v1_19_R1/entity/CodController.java | 12 +++++ .../nms/v1_19_R1/entity/CowController.java | 12 +++++ .../v1_19_R1/entity/CreeperController.java | 12 +++++ .../v1_19_R1/entity/DolphinController.java | 12 +++++ .../v1_19_R1/entity/DrownedController.java | 12 +++++ .../entity/EnderDragonController.java | 12 +++++ .../v1_19_R1/entity/EndermanController.java | 12 +++++ .../v1_19_R1/entity/EndermiteController.java | 12 +++++ .../nms/v1_19_R1/entity/EntityHumanNPC.java | 12 +++++ .../nms/v1_19_R1/entity/EvokerController.java | 12 +++++ .../nms/v1_19_R1/entity/FoxController.java | 12 +++++ .../nms/v1_19_R1/entity/FrogController.java | 12 +++++ .../nms/v1_19_R1/entity/GhastController.java | 13 +++++ .../nms/v1_19_R1/entity/GiantController.java | 12 +++++ .../v1_19_R1/entity/GlowSquidController.java | 12 +++++ .../nms/v1_19_R1/entity/GoatController.java | 12 +++++ .../v1_19_R1/entity/GuardianController.java | 12 +++++ .../entity/GuardianElderController.java | 12 +++++ .../nms/v1_19_R1/entity/HoglinController.java | 12 +++++ .../nms/v1_19_R1/entity/HorseController.java | 12 +++++ .../entity/HorseDonkeyController.java | 12 +++++ .../v1_19_R1/entity/HorseMuleController.java | 12 +++++ .../entity/HorseSkeletonController.java | 12 +++++ .../entity/HorseZombieController.java | 12 +++++ .../v1_19_R1/entity/IllusionerController.java | 12 +++++ .../v1_19_R1/entity/IronGolemController.java | 12 +++++ .../nms/v1_19_R1/entity/LlamaController.java | 12 +++++ .../v1_19_R1/entity/MagmaCubeController.java | 12 +++++ .../entity/MushroomCowController.java | 12 +++++ .../nms/v1_19_R1/entity/OcelotController.java | 12 +++++ .../nms/v1_19_R1/entity/PandaController.java | 12 +++++ .../nms/v1_19_R1/entity/ParrotController.java | 13 +++++ .../v1_19_R1/entity/PhantomController.java | 12 +++++ .../nms/v1_19_R1/entity/PigController.java | 12 +++++ .../v1_19_R1/entity/PigZombieController.java | 12 +++++ .../entity/PiglinBruteController.java | 12 +++++ .../nms/v1_19_R1/entity/PiglinController.java | 12 +++++ .../v1_19_R1/entity/PillagerController.java | 12 +++++ .../v1_19_R1/entity/PolarBearController.java | 13 +++++ .../v1_19_R1/entity/PufferFishController.java | 12 +++++ .../nms/v1_19_R1/entity/RabbitController.java | 12 +++++ .../v1_19_R1/entity/RavagerController.java | 12 +++++ .../nms/v1_19_R1/entity/SalmonController.java | 12 +++++ .../nms/v1_19_R1/entity/SheepController.java | 12 +++++ .../v1_19_R1/entity/ShulkerController.java | 12 +++++ .../v1_19_R1/entity/SilverfishController.java | 12 +++++ .../v1_19_R1/entity/SkeletonController.java | 12 +++++ .../entity/SkeletonStrayController.java | 12 +++++ .../entity/SkeletonWitherController.java | 12 +++++ .../nms/v1_19_R1/entity/SlimeController.java | 12 +++++ .../v1_19_R1/entity/SnowmanController.java | 12 +++++ .../nms/v1_19_R1/entity/SpiderController.java | 12 +++++ .../nms/v1_19_R1/entity/SquidController.java | 12 +++++ .../v1_19_R1/entity/StriderController.java | 12 +++++ .../v1_19_R1/entity/TadpoleController.java | 12 +++++ .../entity/TraderLlamaController.java | 12 +++++ .../entity/TropicalFishController.java | 12 +++++ .../nms/v1_19_R1/entity/TurtleController.java | 12 +++++ .../nms/v1_19_R1/entity/VexController.java | 13 +++++ .../v1_19_R1/entity/VillagerController.java | 12 +++++ .../v1_19_R1/entity/VindicatorController.java | 12 +++++ .../entity/WanderingTraderController.java | 12 +++++ .../nms/v1_19_R1/entity/WardenController.java | 12 +++++ .../nms/v1_19_R1/entity/WitchController.java | 12 +++++ .../nms/v1_19_R1/entity/WitherController.java | 13 +++++ .../nms/v1_19_R1/entity/WolfController.java | 12 +++++ .../nms/v1_19_R1/entity/ZoglinController.java | 12 +++++ .../nms/v1_19_R1/entity/ZombieController.java | 12 +++++ .../v1_19_R1/entity/ZombieHuskController.java | 12 +++++ .../entity/ZombieVillagerController.java | 12 +++++ .../nonliving/AreaEffectCloudController.java | 13 +++++ .../nonliving/ArmorStandController.java | 12 +++++ .../entity/nonliving/BoatController.java | 12 +++++ .../entity/nonliving/ChestBoatController.java | 12 +++++ .../nonliving/DragonFireballController.java | 13 +++++ .../entity/nonliving/EggController.java | 13 +++++ .../nonliving/EnderCrystalController.java | 13 +++++ .../nonliving/EnderPearlController.java | 13 +++++ .../nonliving/EnderSignalController.java | 13 +++++ .../nonliving/EvokerFangsController.java | 12 +++++ .../nonliving/ExperienceOrbController.java | 13 +++++ .../nonliving/FallingBlockController.java | 12 +++++ .../entity/nonliving/FireworkController.java | 13 +++++ .../nonliving/FishingHookController.java | 13 +++++ .../nonliving/GlowItemFrameController.java | 13 +++++ .../entity/nonliving/ItemController.java | 13 +++++ .../entity/nonliving/ItemFrameController.java | 13 +++++ .../nonliving/LargeFireballController.java | 13 +++++ .../entity/nonliving/LeashController.java | 13 +++++ .../entity/nonliving/LlamaSpitController.java | 13 +++++ .../entity/nonliving/MarkerController.java | 13 +++++ .../nonliving/MinecartChestController.java | 13 +++++ .../nonliving/MinecartCommandController.java | 13 +++++ .../nonliving/MinecartFurnaceController.java | 13 +++++ .../nonliving/MinecartHopperController.java | 13 +++++ .../nonliving/MinecartRideableController.java | 13 +++++ .../nonliving/MinecartSpawnerController.java | 13 +++++ .../nonliving/MinecartTNTController.java | 13 +++++ .../entity/nonliving/PaintingController.java | 13 +++++ .../nonliving/ShulkerBulletController.java | 13 +++++ .../nonliving/SmallFireballController.java | 13 +++++ .../entity/nonliving/SnowballController.java | 13 +++++ .../nonliving/SpectralArrowController.java | 13 +++++ .../entity/nonliving/TNTPrimedController.java | 13 +++++ .../nonliving/ThrownExpBottleController.java | 13 +++++ .../nonliving/ThrownPotionController.java | 13 +++++ .../nonliving/ThrownTridentController.java | 13 +++++ .../nonliving/TippedArrowController.java | 13 +++++ .../nonliving/WitherSkullController.java | 13 +++++ .../nms/v1_19_R1/util/PlayerNavigation.java | 3 +- 752 files changed, 8056 insertions(+), 768 deletions(-) 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 e20fb2c27..657d04d62 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 @@ -18,8 +18,10 @@ 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.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; import net.minecraft.server.v1_13_R2.SoundEffect; +import net.minecraft.server.v1_13_R2.Tag; import net.minecraft.server.v1_13_R2.World; public class BatController extends MobEntityController { @@ -61,6 +63,20 @@ public class BatController extends MobEntityController { } } + @Override + public boolean b(Tag tag) { + double mx = motX; + double my = motY; + double mz = motZ; + boolean res = super.b(tag); + if (!npc.isPushableByFluids()) { + motX = mx; + motY = my; + motZ = mz; + } + return res; + } + @Override public void collide(net.minecraft.server.v1_13_R2.Entity entity) { // this method is called by both the entities involved - cancelling 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 83657a716..2cb414762 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftBlaze; @@ -47,6 +50,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 94583ffee..f7cec7012 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftCaveSpider; @@ -49,6 +52,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 bcc73cad4..04cf5773c 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import java.lang.reflect.Method; import org.bukkit.Bukkit; @@ -52,6 +55,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 02fedda4e..8119a1f7c 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftCod; @@ -54,6 +57,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends EntityCod implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 eb3213e58..e1633818a 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftCow; @@ -53,6 +56,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 c3693975b..eef71c245 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftCreeper; @@ -50,6 +53,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 bedf0060c..bc1d673c0 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftDolphin; @@ -50,6 +53,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + private final CitizensNPC npc; public EntityDolphinNPC(World world) { 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 b475d7940..8e5ac81d6 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftDrowned; @@ -49,6 +52,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 82f698f35..5f925e9ca 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import java.lang.reflect.Method; import org.bukkit.Bukkit; @@ -50,6 +53,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 59033f7d4..ea602aab1 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEnderman; @@ -49,6 +52,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 31937518c..9deaae478 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEndermite; @@ -49,6 +52,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + private final CitizensNPC npc; public EntityEndermiteNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EntityHumanNPC.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EntityHumanNPC.java index 1c32df949..aa3742e81 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EntityHumanNPC.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EntityHumanNPC.java @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import java.io.IOException; import java.lang.invoke.MethodHandle; import java.net.Socket; 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 e4abacd28..a6f8af9cf 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 7d22de4e7..b6eec8530 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -33,6 +36,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 0f4fd6919..891f14a3f 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 1413517a3..d4448dd7c 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import java.lang.reflect.Method; import org.bukkit.Bukkit; @@ -38,6 +41,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 2e4d6ca75..2f22cfca2 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import java.lang.reflect.Method; import org.bukkit.Bukkit; @@ -38,6 +41,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 c527c069a..d009b516c 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; @@ -46,6 +49,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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/HorseDonkeyController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseDonkeyController.java index 7a433d573..3bb44326c 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; @@ -46,6 +49,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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/HorseMuleController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseMuleController.java index 5c3fd0f74..eb56bf940 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; @@ -46,6 +49,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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/HorseSkeletonController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseSkeletonController.java index 8062dcb07..31ac06a6d 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; @@ -46,6 +49,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 77468c860..585e7be90 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; @@ -46,6 +49,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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/HumanController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HumanController.java index 7f1c9fc51..a64dda2bc 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HumanController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HumanController.java @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import java.util.UUID; import org.bukkit.Bukkit; 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 b6ec1ce17..12fbc739d 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 e367cd6bf..92ec2e46e 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 076017483..b813ae9b7 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; @@ -44,6 +47,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + private final CitizensNPC npc; public EntityLlamaNPC(World world) { 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 8796b7161..0f9cc7544 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -37,6 +40,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + private final CitizensNPC npc; public EntityMagmaCubeNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MobEntityController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MobEntityController.java index b7c7a1865..9cd9d81fc 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MobEntityController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MobEntityController.java @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import java.lang.invoke.MethodHandle; import java.lang.reflect.Constructor; import java.util.Map; 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 c1052996d..cc945c167 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -38,6 +41,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 b69db943e..01057f393 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 b0910f042..aad9b1f43 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 d1dd70988..2e5da5c06 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import java.lang.reflect.Method; import org.bukkit.Bukkit; @@ -41,6 +44,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 54bb39d45..02d910284 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -36,6 +39,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 8e575946a..e6abafb1e 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -36,6 +39,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 66aab533a..e13b15287 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -33,6 +36,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 5941143eb..4250231c7 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -41,6 +44,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 658625ea5..b32e3a140 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -37,6 +40,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 85f3a4832..f9dc6f312 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -40,6 +43,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 a21e8c433..5ce722f81 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 981120f27..7b882f5fc 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import java.lang.reflect.Method; import org.bukkit.Bukkit; @@ -39,6 +42,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 ae6fa83a3..b699b04ed 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 0a02ef93f..c0b1a9ae4 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 4ce307387..d93ba5a5a 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 35db07e14..3799f3ec5 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 1ecfa1f93..9897e0fa5 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -37,6 +40,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 da954fdf2..ff0c42cd0 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import java.lang.reflect.Method; import org.bukkit.Bukkit; @@ -38,6 +41,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 ea7fba8bb..0729b3f3f 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 a2aaa2068..dff4c78b5 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 822bf5f96..698979df2 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -40,6 +43,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 f51ff4d34..70838e20b 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -38,6 +41,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 ae3d311aa..586233845 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -33,6 +36,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 b1d27708d..228e50b3b 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import java.util.List; import org.bukkit.Bukkit; @@ -41,6 +44,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 90d28049d..d13ab41d1 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 aa44e2181..e5cb48843 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 4d2431318..8c53d6e69 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -33,6 +36,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 f0c923643..c0f417309 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -37,6 +40,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 b38561e7b..b817f6970 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 a556a54c2..d379ee93d 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 c2210e8c4..0cfaaf2d1 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -35,6 +38,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 7f376a25c..837050b29 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftAreaEffectCloud; @@ -41,6 +44,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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/ArmorStandController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ArmorStandController.java index f99f9d08d..6dfd5c9f1 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ArmorStandController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ArmorStandController.java @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftArmorStand; @@ -47,6 +50,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + private final CitizensNPC npc; public EntityArmorStandNPC(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 0822338ff..c923fd126 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftBoat; @@ -42,6 +45,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 640292050..bfb5707a6 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftDragonFireball; @@ -42,6 +45,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 1680766b4..21a8f95e3 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; @@ -52,6 +55,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 9cd45053c..d2b263153 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEnderCrystal; @@ -41,6 +44,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 27053b97b..c4229e480 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEnderPearl; @@ -41,6 +44,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 e5d906ab9..786083032 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEnderSignal; @@ -41,6 +44,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 592a496df..ee8053c07 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -33,6 +36,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 b51734384..9845a1805 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -27,6 +30,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 2967f7cf1..329ca66f1 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -55,6 +58,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 7831a23d2..a3ffb04b5 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -27,6 +30,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 d1ecb63a2..1eef2ab4a 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import java.util.UUID; import org.bukkit.Bukkit; @@ -34,6 +37,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 531966bef..a585194db 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -56,6 +59,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 b69af2ebb..58f0ec012 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -44,6 +47,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 f46ccb62b..22a4bf6e1 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -28,6 +31,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 341b65e67..56744614b 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -27,6 +30,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 e6df864e3..bf200db15 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; @@ -40,6 +43,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 254bc23cc..f933d61ec 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -28,6 +31,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 d9fd5f075..89614f132 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -28,6 +31,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 a02677508..005edc3a7 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -28,6 +31,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 cb9f31d00..81d7f9f24 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.entity.Minecart; import org.bukkit.util.Vector; @@ -24,6 +27,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 28ffed3dd..c0306cf7e 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -28,6 +31,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 48b71bdb0..30d3bd724 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.entity.Minecart; import org.bukkit.util.Vector; @@ -24,6 +27,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 7cf172e2f..1b6389009 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.entity.Minecart; import org.bukkit.util.Vector; @@ -24,6 +27,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 5348a4eaa..73d917a9c 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -27,6 +30,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 16e3a467d..ccd286c8e 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -27,6 +30,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 6dda1860c..7d09ec946 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -27,6 +30,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 8bbe0c1f6..edba8071c 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -41,6 +44,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 d0a36840f..75e0fbe23 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftArrow; @@ -27,6 +30,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 c75fb6085..4b914f21b 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -27,6 +30,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 a5635b945..5e4ef84fe 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -27,6 +30,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 e32bb31a6..b9a8319e6 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -28,6 +31,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 9a95434f3..1b343aaa3 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -27,6 +30,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends EntityThrownTrident implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 ba5fc24d5..639c59a97 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -27,6 +30,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + 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 fa438de95..d4b4dd0b4 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 @@ -1,5 +1,8 @@ package net.citizensnpcs.nms.v1_13_R2.entity.nonliving; +import net.minecraft.server.v1_13_R2.Tag; +import net.minecraft.server.v1_13_R2.FluidType; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_13_R2.CraftServer; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; @@ -27,6 +30,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public boolean b(Tag tag) { + double mx = motX; double my = motY; double mz = motZ; boolean res = super.b(tag); if (!npc.isPushableByFluids()) { motX = mx; motY = my; motZ = mz; } return res; + } + private final CitizensNPC npc; public EntityWitherSkullNPC(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 47398e71c..7c0d00e0f 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -48,6 +51,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + private final CitizensNPC npc; public EntityBatNPC(EntityTypes types, World world) { 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 77a473217..56719eb91 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -48,6 +51,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 90c955316..c96688271 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -52,6 +55,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends EntityCat implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 ceeeb65af..f03d5aa3c 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -51,6 +54,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 6a375d87e..cfb75d64a 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -52,6 +55,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 057954887..825884a69 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -56,6 +59,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends EntityCod implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 464cf50b8..5fff13b3c 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -56,6 +59,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 4bab409f9..fd252c608 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -52,6 +55,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 f0b3ecdc9..42aa12589 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -53,6 +56,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + private final CitizensNPC npc; public EntityDolphinNPC(EntityTypes types, World world) { 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 d204a3e75..6130b41a3 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -51,6 +54,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 8dc172bb5..2a096d411 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -49,6 +52,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 bd785c0f9..22809ad5e 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -51,6 +54,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 460443c7b..a0b004cea 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -51,6 +54,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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/EntityHumanNPC.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EntityHumanNPC.java index 0807649c9..ef12d0bae 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EntityHumanNPC.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EntityHumanNPC.java @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import java.io.IOException; import java.net.Socket; 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 5b89b2d37..6b09cd6fa 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 b99d185bf..3fd7e5334 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -38,6 +41,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends EntityFox implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 8757a48cf..6a66422ae 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -34,6 +37,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 147b00ede..546331e42 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 8622a944d..c21668069 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 2d96600eb..41abbe8e7 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 b62dde26a..052af7542 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -49,6 +52,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + private double baseMovementSpeed; private boolean calledNMSHeight = false; 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 7c6279fc7..f6297f4fb 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -49,6 +52,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; private final CitizensNPC npc; 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 d0a2a0b35..0ad9daa7d 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -49,6 +52,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; 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 6b5a14756..ab134243a 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -49,6 +52,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; 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 36f40a0ee..9409be13c 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -49,6 +52,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HumanController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HumanController.java index fcb1c3b8a..ec4a74e46 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HumanController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HumanController.java @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import java.util.UUID; 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 16e396b93..7a174163d 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 e749ad6dd..88a82b60b 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 d8e404c73..8dd53b31d 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -47,6 +50,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 76edab241..037fc2504 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -39,6 +42,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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/MobEntityController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MobEntityController.java index a152fb79e..caefefb50 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MobEntityController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MobEntityController.java @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import java.lang.invoke.MethodHandle; import java.lang.reflect.Constructor; 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 d79dbd70c..26c54456a 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -41,6 +44,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 3ad419eae..88cfbbd5f 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -38,6 +41,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 cee851906..739c113a6 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -38,6 +41,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends EntityPanda implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 b36f809b0..11fbccba6 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -36,6 +39,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 768cfd03d..1e41300d4 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -40,6 +43,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 ca8be8ead..9221202f4 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -39,6 +42,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 a61565956..dc2532fa8 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -38,6 +41,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 3dcb841c7..28024d01c 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -38,6 +41,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends EntityPillager implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 715ee4dc7..8315b85da 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -35,6 +38,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 699c1fa2f..ba17dd042 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -45,6 +48,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 a4d875883..cea180aca 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -40,6 +43,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 8718bc55f..229b3e9c0 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -38,6 +41,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends EntityRavager implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 9cd3558d4..5c05ec270 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -42,6 +45,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 33f64bbdb..398a13795 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -38,6 +41,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 8ec67db06..7268cc459 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -38,6 +41,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 56c09f5f2..92e4f25be 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 b47f3f106..dfe2bb9ef 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 9cb7cb235..f5db03990 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 0e2eff5d3..d907cef10 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 26db4b1c7..325438aca 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -39,6 +42,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 eae619382..1a325db50 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -38,6 +41,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 2973cf6ce..71d3286bd 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 161f0acd1..58de1691e 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 dc058307c..92e355415 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import java.lang.invoke.MethodHandle; @@ -49,6 +52,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends EntityLlamaTrader implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 ae391ca65..47191260f 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -42,6 +45,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 db2ed97a2..ac2f73610 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -40,6 +43,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 fc4adc3d3..12a23f326 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -34,6 +37,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 24c784a91..4133aac1b 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import java.util.List; import java.util.TreeMap; @@ -46,6 +49,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + private TreeMap behaviorMap; private boolean blockingATrade; boolean calledNMSHeight = false; 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 68588a1fa..102137ac3 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -38,6 +41,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 b618df683..89d758d41 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import java.util.List; import java.util.TreeMap; @@ -45,6 +48,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends EntityVillagerTrader implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + private TreeMap behaviorMap; private boolean blockingATrade; private boolean blockTrades = true; 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 30df39c49..0dd72c506 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 561ea4224..c5540ec3c 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -34,6 +37,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 4f3bc616c..f012848ae 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -40,6 +43,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 b3f5aab97..ea84be313 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 f88671208..97bb719a5 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 37b0d9b70..b09dd3449 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity; +package net.citizensnpcs.nms.v1_14_R1.entity;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -37,6 +40,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 1f16315b6..b500fdac9 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -43,6 +46,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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/ArmorStandController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ArmorStandController.java index ed3bf1a89..29e4134c3 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ArmorStandController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ArmorStandController.java @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -49,6 +52,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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/nonliving/BoatController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/BoatController.java index d4c938680..a00e4758d 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -43,6 +46,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 60e5ae3fc..17ef6dd1c 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -43,6 +46,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 b9a3cd010..a02860528 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -54,6 +57,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 18b5165db..4ce9f004b 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -43,6 +46,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 5292e1713..2a95ab7e5 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -43,6 +46,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 7b2027bfd..c2ebfcd3d 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -43,6 +46,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 ec3f7d926..d120f4233 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -35,6 +38,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 ba5504f0d..9de7db271 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 a84aec9f1..1cbb1cb17 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -57,6 +60,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 b5353bbb4..ad7e50d57 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 6ae8a5391..40406e819 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import java.util.UUID; @@ -40,6 +43,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 a0de409d6..34f4ff9a0 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -58,6 +61,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 a18834c2c..b5c6eff28 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -46,6 +49,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 3a51c1105..5491a3abd 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 e3eb6c119..7b1dd377b 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 ce53f79b2..df1e5ff4a 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -43,6 +46,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 977bf0901..7829221e8 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 efe3a2dfb..5edfb1dca 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 fc19b191d..597b5b963 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 7fff0fee3..688c27fb5 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.entity.Minecart; import org.bukkit.util.Vector; @@ -25,6 +28,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 86fec3bf9..38967151e 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 d33aacd93..33d02fed1 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.entity.Minecart; import org.bukkit.util.Vector; @@ -25,6 +28,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 34fac3ea7..98a650148 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.entity.Minecart; import org.bukkit.util.Vector; @@ -25,6 +28,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 20d208e1c..903e6cfad 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 572dc4329..c6892f705 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 a36b6f718..aa9089014 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 489c3207e..4748c11b6 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 29aa87904..d85042b78 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 61e883663..0782c683f 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 f84f95d9d..cec06966d 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 0ffd298bf..ae5918f15 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -30,6 +33,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 40852b5e4..c741add36 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends EntityThrownTrident implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 d5fd3f94d..0fbb5a23b 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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 13c89c1f0..642d416b8 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 @@ -1,4 +1,7 @@ -package net.citizensnpcs.nms.v1_14_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_14_R1.entity.nonliving;import net.minecraft.server.v1_14_R1.Vec3D; + +import net.minecraft.server.v1_14_R1.Tag; +import net.minecraft.server.v1_14_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_14_R1.CraftServer; @@ -29,6 +32,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + 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/BatController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BatController.java index 12b48e14a..b893fc147 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -40,7 +40,7 @@ public class BatController extends MobEntityController { } } - public static class EntityBatNPC extends EntityBat implements NPCHolder { + public static class EntityBatNPC extends EntityBat implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } private final CitizensNPC npc; public EntityBatNPC(EntityTypes types, World world) { 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 abbe3820a..378dbbd38 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -40,7 +40,7 @@ public class BeeController extends MobEntityController { } } - public static class EntityBeeNPC extends EntityBee implements NPCHolder { + public static class EntityBeeNPC extends EntityBee implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 e195b479f..fa23b2bce 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -40,7 +40,7 @@ public class BlazeController extends MobEntityController { } } - public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 74dab3809..160c59fe6 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -44,7 +44,7 @@ public class CatController extends MobEntityController { } } - public static class EntityCatNPC extends EntityCat implements NPCHolder { + public static class EntityCatNPC extends EntityCat implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 eb78ac0fd..d0e777049 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -43,7 +43,7 @@ public class CaveSpiderController extends MobEntityController { } } - public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 c07edef3f..950c8b1e3 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -44,7 +44,7 @@ public class ChickenController extends MobEntityController { } } - public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + public static class EntityChickenNPC extends EntityChicken implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 6237835ea..4bf137041 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -49,7 +49,7 @@ public class CodController extends MobEntityController { } } - public static class EntityCodNPC extends EntityCod implements NPCHolder { + public static class EntityCodNPC extends EntityCod implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 257c3befa..a4ec2108f 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -48,7 +48,7 @@ public class CowController extends MobEntityController { } } - public static class EntityCowNPC extends EntityCow implements NPCHolder { + public static class EntityCowNPC extends EntityCow implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 599404fdf..697ffd32f 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -44,7 +44,7 @@ public class CreeperController extends MobEntityController { } } - public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 51e1d31fd..7873b8aae 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -46,7 +46,7 @@ public class DolphinController extends MobEntityController { } } - public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder { + public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } private final CitizensNPC npc; private ControllerMove oldMoveController; 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 fce488939..404186362 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -43,7 +43,7 @@ public class DrownedController extends MobEntityController { } } - public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder { + public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 3a8b20329..b27ebece2 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -41,7 +41,7 @@ public class EnderDragonController extends MobEntityController { } } - public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 ef77d4c46..227bcbc8a 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -43,7 +43,7 @@ public class EndermanController extends MobEntityController { } } - public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 ca754b5b7..612d4f8b8 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -43,7 +43,7 @@ public class EndermiteController extends MobEntityController { } } - public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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/EntityHumanNPC.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EntityHumanNPC.java index 1b63213ce..8eef57e66 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EntityHumanNPC.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EntityHumanNPC.java @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import java.io.IOException; import java.net.Socket; 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 ec35b95b3..6004947cb 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class EvokerController extends MobEntityController { return (Evoker) super.getBukkitEntity(); } - public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 8d60034ea..0c05186d2 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -38,7 +38,7 @@ public class FoxController extends MobEntityController { return (Fox) super.getBukkitEntity(); } - public static class EntityFoxNPC extends EntityFox implements NPCHolder { + public static class EntityFoxNPC extends EntityFox implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 41d632423..74c69e910 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -34,7 +34,7 @@ public class GhastController extends MobEntityController { return (Ghast) super.getBukkitEntity(); } - public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + public static class EntityGhastNPC extends EntityGhast implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 0b9c81dbf..a10587136 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class GiantController extends MobEntityController { return (Giant) super.getBukkitEntity(); } - public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 a4d085bbc..b2afb1aff 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class GuardianController extends MobEntityController { return (Guardian) super.getBukkitEntity(); } - public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 09ccee45e..733ce7704 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class GuardianElderController extends MobEntityController { return (ElderGuardian) super.getBukkitEntity(); } - public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 645649c68..53ba43c86 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -49,7 +49,7 @@ public class HorseController extends MobEntityController { super.spawn(at, npc); } - public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + public static class EntityHorseNPC extends EntityHorse implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } private double baseMovementSpeed; private boolean calledNMSHeight = false; 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 b412b92dd..0cf01422e 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -49,7 +49,7 @@ public class HorseDonkeyController extends MobEntityController { super.spawn(at, npc); } - public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } private double baseMovementSpeed; boolean calledNMSHeight = false; private final CitizensNPC npc; 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 450566e36..34d12a477 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -49,7 +49,7 @@ public class HorseMuleController extends MobEntityController { super.spawn(at, npc); } - public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } private double baseMovementSpeed; boolean calledNMSHeight = false; 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 5a500b8d7..ed53c247a 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -49,7 +49,7 @@ public class HorseSkeletonController extends MobEntityController { super.spawn(at, npc); } - public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } private double baseMovementSpeed; boolean calledNMSHeight = false; 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 70980ce5a..30247cba0 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -49,7 +49,7 @@ public class HorseZombieController extends MobEntityController { super.spawn(at, npc); } - public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } private double baseMovementSpeed; boolean calledNMSHeight = false; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HumanController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HumanController.java index 0f4b821d9..a164e6a45 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HumanController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HumanController.java @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import java.util.UUID; 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 f70b139c1..1a84562d8 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class IllusionerController extends MobEntityController { return (Illusioner) super.getBukkitEntity(); } - public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 bbc43a13f..1db43f5e1 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class IronGolemController extends MobEntityController { return (IronGolem) super.getBukkitEntity(); } - public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 646613547..7499ca21b 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -47,7 +47,7 @@ public class LlamaController extends MobEntityController { super.spawn(at, npc); } - public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + public static class EntityLlamaNPC extends EntityLlama implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 82c160bc2..413f9947b 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -40,7 +40,7 @@ public class MagmaCubeController extends MobEntityController { return (MagmaCube) super.getBukkitEntity(); } - public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MobEntityController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MobEntityController.java index cbf98cb50..23d1bac3c 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MobEntityController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MobEntityController.java @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import java.lang.invoke.MethodHandle; import java.lang.reflect.Constructor; 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 acfc4fae6..c2cb43554 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -41,7 +41,7 @@ public class MushroomCowController extends MobEntityController { return (MushroomCow) super.getBukkitEntity(); } - public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 4c2f53b61..76e1c14e7 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -39,7 +39,7 @@ public class OcelotController extends MobEntityController { return (Ocelot) super.getBukkitEntity(); } - public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 24b9a85ab..a0ba56b2e 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -38,7 +38,7 @@ public class PandaController extends MobEntityController { return (Panda) super.getBukkitEntity(); } - public static class EntityPandaNPC extends EntityPanda implements NPCHolder { + public static class EntityPandaNPC extends EntityPanda implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 643fb0fd8..887310561 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -36,7 +36,7 @@ public class ParrotController extends MobEntityController { return (Parrot) super.getBukkitEntity(); } - public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + public static class EntityParrotNPC extends EntityParrot implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 5928a5f16..11c7728b7 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -41,7 +41,7 @@ public class PhantomController extends MobEntityController { return (Phantom) super.getBukkitEntity(); } - public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder { + public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } private final CitizensNPC npc; private ControllerLook oldLookController; private ControllerMove oldMoveController; 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 7dc485444..3df20c758 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -39,7 +39,7 @@ public class PigController extends MobEntityController { return (Pig) super.getBukkitEntity(); } - public static class EntityPigNPC extends EntityPig implements NPCHolder { + public static class EntityPigNPC extends EntityPig implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 d89ebb7b1..06fde1216 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -38,7 +38,7 @@ public class PigZombieController extends MobEntityController { return (PigZombie) super.getBukkitEntity(); } - public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 a5004239f..50667ac93 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -38,7 +38,7 @@ public class PillagerController extends MobEntityController { return (Pillager) super.getBukkitEntity(); } - public static class EntityPillagerNPC extends EntityPillager implements NPCHolder { + public static class EntityPillagerNPC extends EntityPillager implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 f846dfed5..9a0f91f25 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -35,7 +35,7 @@ public class PolarBearController extends MobEntityController { return (PolarBear) super.getBukkitEntity(); } - public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 aa167887b..b9105499e 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -46,7 +46,7 @@ public class PufferFishController extends MobEntityController { return (PufferFish) super.getBukkitEntity(); } - public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder { + public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 2d29a1dfb..56ce155bf 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -40,7 +40,7 @@ public class RabbitController extends MobEntityController { return (Rabbit) super.getBukkitEntity(); } - public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 349534e02..e2e2f89e2 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -38,7 +38,7 @@ public class RavagerController extends MobEntityController { return (Ravager) super.getBukkitEntity(); } - public static class EntityRavagerNPC extends EntityRavager implements NPCHolder { + public static class EntityRavagerNPC extends EntityRavager implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 12632f99e..b3017068f 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -43,7 +43,7 @@ public class SalmonController extends MobEntityController { return (Salmon) super.getBukkitEntity(); } - public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder { + public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 e31673f09..452f4b876 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -38,7 +38,7 @@ public class SheepController extends MobEntityController { return (Sheep) super.getBukkitEntity(); } - public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + public static class EntitySheepNPC extends EntitySheep implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 20445b0c8..e1ae72c4f 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -38,7 +38,7 @@ public class ShulkerController extends MobEntityController { return (Shulker) super.getBukkitEntity(); } - public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + public static class EntityShulkerNPC extends EntityShulker implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 4fa1d7707..c93fc81d0 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class SilverfishController extends MobEntityController { return (Silverfish) super.getBukkitEntity(); } - public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 466616775..7a9f0b372 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class SkeletonController extends MobEntityController { return (Skeleton) super.getBukkitEntity(); } - public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 39ca0c9ef..e77791d4f 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class SkeletonStrayController extends MobEntityController { return (Stray) super.getBukkitEntity(); } - public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 17ca9588d..f21cd4abc 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class SkeletonWitherController extends MobEntityController { return (WitherSkeleton) super.getBukkitEntity(); } - public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 6dec76f0e..234c110f8 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -40,7 +40,7 @@ public class SlimeController extends MobEntityController { return (Slime) super.getBukkitEntity(); } - public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + public static class EntitySlimeNPC extends EntitySlime implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 d1c5421d7..1ce79dcb8 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -38,7 +38,7 @@ public class SnowmanController extends MobEntityController { return (Snowman) super.getBukkitEntity(); } - public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 a5469788d..3feb43547 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class SpiderController extends MobEntityController { return (Spider) super.getBukkitEntity(); } - public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + public static class EntitySpiderNPC extends EntitySpider implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 512c9677c..fc342ab85 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class SquidController extends MobEntityController { return (Squid) super.getBukkitEntity(); } - public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + public static class EntitySquidNPC extends EntitySquid implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 55e2a1c83..85cdefb90 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import java.lang.invoke.MethodHandle; @@ -49,7 +49,7 @@ public class TraderLlamaController extends MobEntityController { super.spawn(at, npc); } - public static class EntityTraderLlamaNPC extends EntityLlamaTrader implements NPCHolder { + public static class EntityTraderLlamaNPC extends EntityLlamaTrader implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 1364f6ccd..4ccbaeaf7 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -43,7 +43,7 @@ public class TropicalFishController extends MobEntityController { return (TropicalFish) super.getBukkitEntity(); } - public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder { + public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 13e9ab67a..bb3408396 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -41,7 +41,7 @@ public class TurtleController extends MobEntityController { return (Turtle) super.getBukkitEntity(); } - public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder { + public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } private final CitizensNPC npc; private ControllerJump oldJumpController; private ControllerMove oldMoveController; 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 5aa68a9b6..c3d0557b9 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -34,7 +34,7 @@ public class VexController extends MobEntityController { return (Vex) super.getBukkitEntity(); } - public static class EntityVexNPC extends EntityVex implements NPCHolder { + public static class EntityVexNPC extends EntityVex implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 7e566e7e8..c1f30445d 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import java.util.List; @@ -45,7 +45,7 @@ public class VillagerController extends MobEntityController { return (Villager) super.getBukkitEntity(); } - public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + public static class EntityVillagerNPC extends EntityVillager implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } private boolean blockingATrade; boolean calledNMSHeight = false; 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 3c05d9b31..8ecaff8ad 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -38,7 +38,7 @@ public class VindicatorController extends MobEntityController { return (Vindicator) super.getBukkitEntity(); } - public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 db0c5fc0b..ad91299d5 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import java.util.List; @@ -44,7 +44,7 @@ public class WanderingTraderController extends MobEntityController { return (WanderingTrader) super.getBukkitEntity(); } - public static class EntityWanderingTraderNPC extends EntityVillagerTrader implements NPCHolder { + public static class EntityWanderingTraderNPC extends EntityVillagerTrader implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } private boolean blockingATrade; private boolean blockTrades = true; boolean calledNMSHeight = false; 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 1f1b6f6f3..5f33a8998 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -36,7 +36,7 @@ public class WitchController extends MobEntityController { return (org.bukkit.entity.Witch) super.getBukkitEntity(); } - public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + public static class EntityWitchNPC extends EntityWitch implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 e26cd6db8..e557e9873 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -34,7 +34,7 @@ public class WitherController extends MobEntityController { return (Wither) super.getBukkitEntity(); } - public static class EntityWitherNPC extends EntityWither implements NPCHolder { + public static class EntityWitherNPC extends EntityWither implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 20094297f..dd790ff23 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -40,7 +40,7 @@ public class WolfController extends MobEntityController { return (Wolf) super.getBukkitEntity(); } - public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + public static class EntityWolfNPC extends EntityWolf implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } boolean calledNMSHeight = false; private final CitizensNPC npc; 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 03b8be771..67d1fe25a 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class ZombieController extends MobEntityController { return (Zombie) super.getBukkitEntity(); } - public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + public static class EntityZombieNPC extends EntityZombie implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 e78da6080..c5ebd0abc 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class ZombieHuskController extends MobEntityController { return (Husk) super.getBukkitEntity(); } - public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 1aab76e69..1a2969acf 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity; +package net.citizensnpcs.nms.v1_15_R1.entity;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -37,7 +37,7 @@ public class ZombieVillagerController extends MobEntityController { return (ZombieVillager) super.getBukkitEntity(); } - public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 b804984a4..9c60b4f8f 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 @@ -9,13 +9,17 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityAreaEffectCloud; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; +import net.minecraft.server.v1_15_R1.Vec3D; import net.minecraft.server.v1_15_R1.World; public class AreaEffectCloudController extends MobEntityController { @@ -28,17 +32,9 @@ public class AreaEffectCloudController extends MobEntityController { return (AreaEffectCloud) super.getBukkitEntity(); } - public static class AreaEffectCloudNPC extends CraftAreaEffectCloud implements NPCHolder { - private final CitizensNPC npc; - + public static class AreaEffectCloudNPC extends CraftAreaEffectCloud implements ForwardingNPCHolder { public AreaEffectCloudNPC(EntityAreaEffectCloudNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } @@ -54,6 +50,16 @@ public class AreaEffectCloudController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.b(tag); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -69,14 +75,6 @@ public class AreaEffectCloudController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -90,6 +88,14 @@ public class AreaEffectCloudController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ArmorStandController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ArmorStandController.java index fe10c49ea..c131f837d 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ArmorStandController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ArmorStandController.java @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -11,6 +11,7 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; @@ -20,7 +21,9 @@ 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.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.Vec3D; import net.minecraft.server.v1_15_R1.World; @@ -34,17 +37,9 @@ public class ArmorStandController extends MobEntityController { return (ArmorStand) super.getBukkitEntity(); } - public static class ArmorStandNPC extends CraftArmorStand implements NPCHolder { - private final CitizensNPC npc; - + public static class ArmorStandNPC extends CraftArmorStand implements ForwardingNPCHolder { public ArmorStandNPC(EntityArmorStandNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } @@ -71,6 +66,11 @@ public class ArmorStandController extends MobEntityController { return event.isCancelled() ? EnumInteractionResult.FAIL : EnumInteractionResult.SUCCESS; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -86,14 +86,6 @@ public class ArmorStandController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -107,6 +99,14 @@ public class ArmorStandController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { super.tick(); 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 0b7c16c53..30d4bb557 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,6 +9,7 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; @@ -20,8 +21,10 @@ 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.Fluid; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.MathHelper; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.TagsFluid; import net.minecraft.server.v1_15_R1.Vec3D; import net.minecraft.server.v1_15_R1.World; @@ -36,17 +39,9 @@ public class BoatController extends MobEntityController { return (Boat) super.getBukkitEntity(); } - public static class BoatNPC extends CraftBoat implements NPCHolder { - private final CitizensNPC npc; - + public static class BoatNPC extends CraftBoat implements ForwardingNPCHolder { public BoatNPC(EntityBoatNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } @@ -68,6 +63,11 @@ public class BoatController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling 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 014702786..934619283 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityDragonFireball; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class DragonFireballController extends MobEntityController { @@ -28,17 +31,9 @@ public class DragonFireballController extends MobEntityController { return (DragonFireball) super.getBukkitEntity(); } - public static class DragonFireballNPC extends CraftDragonFireball implements NPCHolder { - private final CitizensNPC npc; - + public static class DragonFireballNPC extends CraftDragonFireball implements ForwardingNPCHolder { public DragonFireballNPC(EntityDragonFireballNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } @@ -54,6 +49,11 @@ public class DragonFireballController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -69,14 +69,6 @@ public class DragonFireballController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -91,11 +83,10 @@ public class DragonFireballController extends MobEntityController { } @Override - public void updateSize() { - if (npc == null) { - super.updateSize(); - } else { - NMSImpl.setSize(this, justCreated); + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); } } @@ -110,5 +101,14 @@ public class DragonFireballController extends MobEntityController { super.tick(); } } + + @Override + public void updateSize() { + if (npc == null) { + super.updateSize(); + } else { + NMSImpl.setSize(this, justCreated); + } + } } } 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 16aaf4854..6edbb404b 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -11,6 +11,7 @@ import org.bukkit.entity.Entity; import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; @@ -18,7 +19,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityEgg; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; import net.minecraft.server.v1_15_R1.WorldServer; @@ -39,17 +42,9 @@ public class EggController extends AbstractEntityController { return (Egg) super.getBukkitEntity(); } - public static class EggNPC extends CraftEgg implements NPCHolder { - private final CitizensNPC npc; - + public static class EggNPC extends CraftEgg implements ForwardingNPCHolder { public EggNPC(EntityEggNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } @@ -70,6 +65,11 @@ public class EggController extends AbstractEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -85,14 +85,6 @@ public class EggController extends AbstractEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -106,6 +98,14 @@ public class EggController extends AbstractEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { 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 c9187dfb2..4fe58458e 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityEnderCrystal; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class EnderCrystalController extends MobEntityController { @@ -28,17 +31,9 @@ public class EnderCrystalController extends MobEntityController { return (EnderCrystal) super.getBukkitEntity(); } - public static class EnderCrystalNPC extends CraftEnderCrystal implements NPCHolder { - private final CitizensNPC npc; - + public static class EnderCrystalNPC extends CraftEnderCrystal implements ForwardingNPCHolder { public EnderCrystalNPC(EntityEnderCrystalNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } @@ -54,6 +49,11 @@ public class EnderCrystalController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -69,14 +69,6 @@ public class EnderCrystalController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -90,6 +82,14 @@ public class EnderCrystalController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { 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 9f854f123..4c8f6a191 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityEnderPearl; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class EnderPearlController extends MobEntityController { @@ -28,17 +31,9 @@ public class EnderPearlController extends MobEntityController { return (EnderPearl) super.getBukkitEntity(); } - public static class EnderPearlNPC extends CraftEnderPearl implements NPCHolder { - private final CitizensNPC npc; - + public static class EnderPearlNPC extends CraftEnderPearl implements ForwardingNPCHolder { public EnderPearlNPC(EntityEnderPearlNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } @@ -54,6 +49,11 @@ public class EnderPearlController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -69,14 +69,6 @@ public class EnderPearlController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -90,6 +82,14 @@ public class EnderPearlController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { 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 f4d3731d8..0f0e23427 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityEnderSignal; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class EnderSignalController extends MobEntityController { @@ -28,17 +31,9 @@ public class EnderSignalController extends MobEntityController { return (EnderSignal) super.getBukkitEntity(); } - public static class EnderSignalNPC extends CraftEnderSignal implements NPCHolder { - private final CitizensNPC npc; - + public static class EnderSignalNPC extends CraftEnderSignal implements ForwardingNPCHolder { public EnderSignalNPC(EntityEnderSignalNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } @@ -54,6 +49,11 @@ public class EnderSignalController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -69,14 +69,6 @@ public class EnderSignalController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -90,6 +82,14 @@ public class EnderSignalController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { 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 9cf4906cf..18f10bf20 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -11,6 +11,7 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; @@ -20,7 +21,9 @@ 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.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.Vec3D; import net.minecraft.server.v1_15_R1.World; @@ -57,6 +60,11 @@ public class EvokerFangsController extends MobEntityController { return event.isCancelled() ? EnumInteractionResult.FAIL : EnumInteractionResult.SUCCESS; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -72,14 +80,6 @@ public class EvokerFangsController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -93,6 +93,14 @@ public class EvokerFangsController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { super.tick(); @@ -102,17 +110,9 @@ public class EvokerFangsController extends MobEntityController { } } - public static class EvokerFangsNPC extends CraftEvokerFangs implements NPCHolder { - private final CitizensNPC npc; - + public static class EvokerFangsNPC extends CraftEvokerFangs implements ForwardingNPCHolder { public EvokerFangsNPC(EntityEvokerFangsNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 b415d451c..973a6cba8 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityExperienceOrb; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class ExperienceOrbController extends MobEntityController { @@ -40,6 +43,11 @@ public class ExperienceOrbController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class ExperienceOrbController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -76,6 +76,14 @@ public class ExperienceOrbController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { @@ -86,17 +94,9 @@ public class ExperienceOrbController extends MobEntityController { } } - public static class ExperienceOrbNPC extends CraftExperienceOrb implements NPCHolder { - private final CitizensNPC npc; - + public static class ExperienceOrbNPC extends CraftExperienceOrb implements ForwardingNPCHolder { public ExperienceOrbNPC(EntityExperienceOrbNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 cc28996fa..3525dc0e6 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -25,8 +25,10 @@ import net.minecraft.server.v1_15_R1.Blocks; 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.FluidType; import net.minecraft.server.v1_15_R1.IBlockData; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.Vec3D; import net.minecraft.server.v1_15_R1.World; import net.minecraft.server.v1_15_R1.WorldServer; @@ -73,6 +75,11 @@ public class FallingBlockController extends AbstractEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -88,14 +95,6 @@ public class FallingBlockController extends AbstractEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -109,6 +108,14 @@ public class FallingBlockController extends AbstractEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { 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 505107522..1c95bbe9f 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityFireworks; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class FireworkController extends MobEntityController { @@ -40,6 +43,11 @@ public class FireworkController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class FireworkController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -76,6 +76,14 @@ public class FireworkController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { @@ -86,17 +94,9 @@ public class FireworkController extends MobEntityController { } } - public static class FireworkNPC extends CraftFirework implements NPCHolder { - private final CitizensNPC npc; - + public static class FireworkNPC extends CraftFirework implements ForwardingNPCHolder { public FireworkNPC(EntityFireworkNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 4e7d10950..e387565a9 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import java.util.UUID; @@ -13,6 +13,7 @@ import com.mojang.authlib.GameProfile; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; @@ -22,10 +23,12 @@ 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.FluidType; import net.minecraft.server.v1_15_R1.ItemStack; import net.minecraft.server.v1_15_R1.Items; import net.minecraft.server.v1_15_R1.NBTTagCompound; import net.minecraft.server.v1_15_R1.PlayerInteractManager; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; import net.minecraft.server.v1_15_R1.WorldServer; @@ -54,6 +57,11 @@ public class FishingHookController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -69,14 +77,6 @@ public class FishingHookController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -90,6 +90,14 @@ public class FishingHookController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public double h(Entity entity) { // distance check in k() @@ -120,17 +128,9 @@ public class FishingHookController extends MobEntityController { } } - public static class FishingHookNPC extends CraftFishHook implements NPCHolder { - private final CitizensNPC npc; - + public static class FishingHookNPC extends CraftFishHook implements ForwardingNPCHolder { public FishingHookNPC(EntityFishingHookNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 176b017f3..d8639fea7 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -24,8 +24,10 @@ import net.citizensnpcs.util.Util; 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.FluidType; import net.minecraft.server.v1_15_R1.ItemStack; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; import net.minecraft.server.v1_15_R1.WorldServer; @@ -70,6 +72,11 @@ public class ItemController extends AbstractEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling 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 d41ccb4d2..50f5cbf03 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -23,7 +23,9 @@ 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.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class ItemFrameController extends MobEntityController { @@ -57,6 +59,11 @@ public class ItemFrameController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling 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 fa251bbbb..b04582b58 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityLargeFireball; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class LargeFireballController extends MobEntityController { @@ -40,6 +43,11 @@ public class LargeFireballController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class LargeFireballController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -77,11 +77,10 @@ public class LargeFireballController extends MobEntityController { } @Override - public void updateSize() { - if (npc == null) { - super.updateSize(); - } else { - NMSImpl.setSize(this, justCreated); + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); } } @@ -96,19 +95,20 @@ public class LargeFireballController extends MobEntityController { super.tick(); } } - } - - public static class LargeFireballNPC extends CraftLargeFireball implements NPCHolder { - private final CitizensNPC npc; - - public LargeFireballNPC(EntityLargeFireballNPC entity) { - super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } @Override - public NPC getNPC() { - return npc; + public void updateSize() { + if (npc == null) { + super.updateSize(); + } else { + NMSImpl.setSize(this, justCreated); + } + } + } + + public static class LargeFireballNPC extends CraftLargeFireball implements ForwardingNPCHolder { + public LargeFireballNPC(EntityLargeFireballNPC entity) { + super((CraftServer) Bukkit.getServer(), entity); } } } 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 87253db40..29f22402f 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityLeash; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class LeashController extends MobEntityController { @@ -40,6 +43,11 @@ public class LeashController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class LeashController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -76,6 +76,14 @@ public class LeashController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public boolean survives() { return npc == null || !npc.isProtected() ? super.survives() : true; @@ -91,17 +99,9 @@ public class LeashController extends MobEntityController { } } - public static class LeashNPC extends CraftLeash implements NPCHolder { - private final CitizensNPC npc; - + public static class LeashNPC extends CraftLeash implements ForwardingNPCHolder { public LeashNPC(EntityLeashNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 2e2a039da..90595d59d 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -11,6 +11,7 @@ import org.bukkit.entity.LlamaSpit; import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; @@ -19,7 +20,9 @@ import net.citizensnpcs.util.Util; 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.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; import net.minecraft.server.v1_15_R1.WorldServer; @@ -59,6 +62,11 @@ public class LlamaSpitController extends AbstractEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -74,14 +82,6 @@ public class LlamaSpitController extends AbstractEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -95,6 +95,14 @@ public class LlamaSpitController extends AbstractEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { @@ -108,17 +116,9 @@ public class LlamaSpitController extends AbstractEntityController { } } - public static class LlamaSpitNPC extends CraftLlamaSpit implements NPCHolder { - private final CitizensNPC npc; - + public static class LlamaSpitNPC extends CraftLlamaSpit implements ForwardingNPCHolder { public LlamaSpitNPC(EntityLlamaSpitNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 76b802af1..6d184b211 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityMinecartChest; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class MinecartChestController extends MobEntityController { @@ -40,6 +43,11 @@ public class MinecartChestController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -87,17 +95,9 @@ public class MinecartChestController extends MobEntityController { } - public static class MinecartChestNPC extends CraftMinecartChest implements NPCHolder { - private final CitizensNPC npc; - + public static class MinecartChestNPC extends CraftMinecartChest implements ForwardingNPCHolder { public MinecartChestNPC(EntityMinecartChestNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 378f493e6..0a5c8f799 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityMinecartCommandBlock; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class MinecartCommandController extends MobEntityController { @@ -40,6 +43,11 @@ public class MinecartCommandController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -86,17 +94,9 @@ public class MinecartCommandController extends MobEntityController { } } - public static class MinecartCommandNPC extends CraftMinecartCommand implements NPCHolder { - private final CitizensNPC npc; - + public static class MinecartCommandNPC extends CraftMinecartCommand implements ForwardingNPCHolder { public MinecartCommandNPC(EntityMinecartCommandNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 660a74a02..7d2763555 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityMinecartFurnace; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class MinecartFurnaceController extends MobEntityController { @@ -40,6 +43,11 @@ public class MinecartFurnaceController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -86,17 +94,9 @@ public class MinecartFurnaceController extends MobEntityController { } } - public static class MinecartFurnaceNPC extends CraftMinecartFurnace implements NPCHolder { - private final CitizensNPC npc; - + public static class MinecartFurnaceNPC extends CraftMinecartFurnace implements ForwardingNPCHolder { public MinecartFurnaceNPC(EntityMinecartFurnaceNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 21665b796..4b0c1c0f5 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.entity.Minecart; import org.bukkit.util.Vector; @@ -24,7 +24,7 @@ public class MinecartHopperController extends MobEntityController { return (Minecart) super.getBukkitEntity(); } - public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 bd1cad9c3..b3321d9c5 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityMinecartRideable; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class MinecartRideableController extends MobEntityController { @@ -40,6 +43,11 @@ public class MinecartRideableController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -86,17 +94,9 @@ public class MinecartRideableController extends MobEntityController { } } - public static class MinecartRideableNPC extends CraftMinecartRideable implements NPCHolder { - private final CitizensNPC npc; - + public static class MinecartRideableNPC extends CraftMinecartRideable implements ForwardingNPCHolder { public MinecartRideableNPC(EntityMinecartRideableNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 4a6f81c26..00284aabc 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.entity.Minecart; import org.bukkit.util.Vector; @@ -24,7 +24,7 @@ public class MinecartSpawnerController extends MobEntityController { return (Minecart) super.getBukkitEntity(); } - public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 8824bda18..7863c207e 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D;import net.minecraft.server.v1_15_R1.Tag;import net.minecraft.server.v1_15_R1.FluidType; import org.bukkit.entity.Minecart; import org.bukkit.util.Vector; @@ -24,7 +24,7 @@ public class MinecartTNTController extends MobEntityController { return (Minecart) super.getBukkitEntity(); } - public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder {@Override public boolean b(Tag tag) { Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; } 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 2d8289e74..f432c74a5 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityPainting; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class PaintingController extends MobEntityController { @@ -40,6 +43,11 @@ public class PaintingController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class PaintingController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -76,6 +76,14 @@ public class PaintingController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public boolean survives() { return npc == null || !npc.isProtected() ? super.survives() : true; @@ -91,17 +99,9 @@ public class PaintingController extends MobEntityController { } } - public static class PaintingNPC extends CraftPainting implements NPCHolder { - private final CitizensNPC npc; - + public static class PaintingNPC extends CraftPainting implements ForwardingNPCHolder { public PaintingNPC(EntityPaintingNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 e31d7c6c6..7a657be20 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityShulkerBullet; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class ShulkerBulletController extends MobEntityController { @@ -40,6 +43,11 @@ public class ShulkerBulletController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class ShulkerBulletController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -76,6 +76,14 @@ public class ShulkerBulletController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { @@ -86,17 +94,9 @@ public class ShulkerBulletController extends MobEntityController { } } - public static class ShulkerBulletNPC extends CraftShulkerBullet implements NPCHolder { - private final CitizensNPC npc; - + public static class ShulkerBulletNPC extends CraftShulkerBullet implements ForwardingNPCHolder { public ShulkerBulletNPC(EntityShulkerBulletNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 eaaa2299b..f13f0ec97 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntitySmallFireball; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class SmallFireballController extends MobEntityController { @@ -40,6 +43,11 @@ public class SmallFireballController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class SmallFireballController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -76,6 +76,14 @@ public class SmallFireballController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { @@ -89,17 +97,9 @@ public class SmallFireballController extends MobEntityController { } } - public static class SmallFireballNPC extends CraftSmallFireball implements NPCHolder { - private final CitizensNPC npc; - + public static class SmallFireballNPC extends CraftSmallFireball implements ForwardingNPCHolder { public SmallFireballNPC(EntitySmallFireballNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 a30803d06..a6379a23c 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntitySnowball; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class SnowballController extends MobEntityController { @@ -40,6 +43,11 @@ public class SnowballController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class SnowballController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -76,6 +76,14 @@ public class SnowballController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { @@ -86,17 +94,9 @@ public class SnowballController extends MobEntityController { } } - public static class SnowballNPC extends CraftSnowball implements NPCHolder { - private final CitizensNPC npc; - + public static class SnowballNPC extends CraftSnowball implements ForwardingNPCHolder { public SnowballNPC(EntitySnowballNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 d3b535e22..cc4652c1b 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntitySpectralArrow; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class SpectralArrowController extends MobEntityController { @@ -40,6 +43,11 @@ public class SpectralArrowController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class SpectralArrowController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -76,6 +76,14 @@ public class SpectralArrowController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { @@ -86,17 +94,9 @@ public class SpectralArrowController extends MobEntityController { } } - public static class SpectralArrowNPC extends CraftArrow implements NPCHolder { - private final CitizensNPC npc; - + public static class SpectralArrowNPC extends CraftArrow implements ForwardingNPCHolder { public SpectralArrowNPC(EntitySpectralArrowNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 7459a105b..2af3d3d76 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityTNTPrimed; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class TNTPrimedController extends MobEntityController { @@ -40,6 +43,11 @@ public class TNTPrimedController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class TNTPrimedController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -76,6 +76,14 @@ public class TNTPrimedController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { @@ -86,17 +94,9 @@ public class TNTPrimedController extends MobEntityController { } } - public static class TNTPrimedNPC extends CraftTNTPrimed implements NPCHolder { - private final CitizensNPC npc; - + public static class TNTPrimedNPC extends CraftTNTPrimed implements ForwardingNPCHolder { public TNTPrimedNPC(EntityTNTPrimedNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 b3c302821..3cf2c4fa0 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityThrownExpBottle; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class ThrownExpBottleController extends MobEntityController { @@ -40,6 +43,11 @@ public class ThrownExpBottleController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class ThrownExpBottleController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -76,6 +76,14 @@ public class ThrownExpBottleController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { @@ -89,17 +97,9 @@ public class ThrownExpBottleController extends MobEntityController { } } - public static class ThrownExpBottleNPC extends CraftThrownExpBottle implements NPCHolder { - private final CitizensNPC npc; - + public static class ThrownExpBottleNPC extends CraftThrownExpBottle implements ForwardingNPCHolder { public ThrownExpBottleNPC(EntityThrownExpBottleNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 6129d062a..2e95ea66d 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,14 +9,17 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityPotion; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.Items; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class ThrownPotionController extends MobEntityController { @@ -41,6 +44,11 @@ public class ThrownPotionController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -56,14 +64,6 @@ public class ThrownPotionController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -81,6 +81,14 @@ public class ThrownPotionController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { @@ -91,31 +99,15 @@ public class ThrownPotionController extends MobEntityController { } } - public static class LingeringThrownPotionNPC extends CraftThrownPotion implements NPCHolder { - private final CitizensNPC npc; - + public static class LingeringThrownPotionNPC extends CraftThrownPotion implements ForwardingNPCHolder { public LingeringThrownPotionNPC(EntityThrownPotionNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } - public static class SplashThrownPotionNPC extends CraftThrownPotion implements NPCHolder { - private final CitizensNPC npc; - + public static class SplashThrownPotionNPC extends CraftThrownPotion implements ForwardingNPCHolder { public SplashThrownPotionNPC(EntityThrownPotionNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 5654d8bc4..872d114e4 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityThrownTrident; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class ThrownTridentController extends MobEntityController { @@ -40,6 +43,11 @@ public class ThrownTridentController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class ThrownTridentController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -76,6 +76,14 @@ public class ThrownTridentController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { @@ -86,17 +94,9 @@ public class ThrownTridentController extends MobEntityController { } } - public static class ThrownTridentNPC extends CraftTrident implements NPCHolder { - private final CitizensNPC npc; - + public static class ThrownTridentNPC extends CraftTrident implements ForwardingNPCHolder { public ThrownTridentNPC(EntityThrownTridentNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 75533395c..391ddcf4d 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityTippedArrow; import net.minecraft.server.v1_15_R1.EntityTypes; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class TippedArrowController extends MobEntityController { @@ -40,6 +43,11 @@ public class TippedArrowController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -86,17 +94,9 @@ public class TippedArrowController extends MobEntityController { } } - public static class TippedArrowNPC extends CraftTippedArrow implements NPCHolder { - private final CitizensNPC npc; - + public static class TippedArrowNPC extends CraftTippedArrow implements ForwardingNPCHolder { public TippedArrowNPC(EntityTippedArrowNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 f5daf249b..4382029ba 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 @@ -1,4 +1,4 @@ -package net.citizensnpcs.nms.v1_15_R1.entity.nonliving; +package net.citizensnpcs.nms.v1_15_R1.entity.nonliving;import net.minecraft.server.v1_15_R1.Vec3D; import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_15_R1.CraftServer; @@ -9,13 +9,16 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_15_R1.entity.MobEntityController; +import net.citizensnpcs.nms.v1_15_R1.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityWitherSkull; +import net.minecraft.server.v1_15_R1.FluidType; import net.minecraft.server.v1_15_R1.NBTTagCompound; +import net.minecraft.server.v1_15_R1.Tag; import net.minecraft.server.v1_15_R1.World; public class WitherSkullController extends MobEntityController { @@ -40,6 +43,11 @@ public class WitherSkullController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean b(Tag tag) { + Vec3D old = getMot().add(0, 0, 0); boolean res = super.b(tag); if (!npc.isPushableByFluids()) { this.setMot(old); } return res; + } + @Override public void collide(net.minecraft.server.v1_15_R1.Entity entity) { // this method is called by both the entities involved - cancelling @@ -55,14 +63,6 @@ public class WitherSkullController extends MobEntityController { return npc == null ? super.d(save) : false; } - @Override - public void h(double x, double y, double z) { - Vector vector = Util.callPushEvent(npc, x, y, z); - if (vector != null) { - super.h(vector.getX(), vector.getY(), vector.getZ()); - } - } - @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -76,6 +76,14 @@ public class WitherSkullController extends MobEntityController { return npc; } + @Override + public void h(double x, double y, double z) { + Vector vector = Util.callPushEvent(npc, x, y, z); + if (vector != null) { + super.h(vector.getX(), vector.getY(), vector.getZ()); + } + } + @Override public void tick() { if (npc != null) { @@ -86,17 +94,9 @@ public class WitherSkullController extends MobEntityController { } } - public static class WitherSkullNPC extends CraftWitherSkull implements NPCHolder { - private final CitizensNPC npc; - + public static class WitherSkullNPC extends CraftWitherSkull implements ForwardingNPCHolder { public WitherSkullNPC(EntityWitherSkullNPC entity) { super((CraftServer) Bukkit.getServer(), entity); - this.npc = entity.npc; - } - - @Override - public NPC getNPC() { - return npc; } } } 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 122908cb6..13885e71b 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftBat; @@ -20,8 +22,10 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class BatController extends MobEntityController { @@ -55,6 +59,16 @@ public class BatController extends MobEntityController { } } + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + @Override public void checkDespawn() { if (npc == null) { 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 72be74cc4..b53df85d1 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftBee; @@ -20,8 +22,10 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class BeeController extends MobEntityController { @@ -41,6 +45,16 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends EntityBee implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 9bfa892d0..674e1d228 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftBlaze; @@ -20,8 +22,10 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class BlazeController extends MobEntityController { @@ -41,6 +45,16 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 58ee21436..d2cb95f44 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftCat; @@ -22,9 +24,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -45,7 +49,18 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends EntityCat implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + 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 136ece675..98caddb6a 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftCaveSpider; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -44,6 +48,16 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 931ad2ab7..1f1b50874 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftChicken; @@ -22,9 +24,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -45,7 +49,18 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + 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 60b467988..68a027dc3 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftCod; @@ -26,11 +28,13 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.ItemStack; import net.minecraft.server.v1_16_R3.Items; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -51,6 +55,16 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends EntityCod implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 522d1984e..90ce49963 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftCow; @@ -25,11 +27,13 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.ItemStack; import net.minecraft.server.v1_16_R3.Items; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -50,7 +54,18 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + 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 b19f03c6f..06de316a4 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftCreeper; @@ -22,9 +24,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; import net.minecraft.server.v1_16_R3.WorldServer; @@ -46,6 +50,16 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 5be4bc77f..d6ef31dd1 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftDolphin; @@ -23,10 +25,12 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -48,6 +52,7 @@ public class DolphinController extends MobEntityController { public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder { private final CitizensNPC npc; + private ControllerMove oldMoveController; public EntityDolphinNPC(EntityTypes types, World world) { @@ -72,6 +77,16 @@ public class DolphinController extends MobEntityController { } } + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + @Override public boolean b(float f, float f1) { if (npc == null || !npc.isFlyable()) { 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 475cc32dc..d1ce3e36d 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftDrowned; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -62,6 +66,16 @@ public class DrownedController extends MobEntityController { } } + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + @Override public boolean b(float f, float f1) { if (npc == null || !npc.isFlyable()) { 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 aa5b1db70..35d365a7a 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEnderDragon; @@ -20,8 +22,10 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -42,6 +46,16 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 abd2c51c4..6ef94aa50 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEnderman; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -44,6 +48,16 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 9eb554c15..726d8f1a0 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEndermite; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -44,6 +48,16 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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/EntityHumanNPC.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EntityHumanNPC.java index cfe9e4202..d2a7968f8 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EntityHumanNPC.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EntityHumanNPC.java @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import java.io.IOException; import java.lang.invoke.MethodHandle; import java.net.Socket; 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 d5c512945..74b1975ad 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 3d1c718dc..1872b5a25 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -22,9 +24,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -39,7 +43,18 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends EntityFox implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + 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 2eac5e4b6..f9245821d 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -20,8 +22,10 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class GhastController extends MobEntityController { @@ -35,6 +39,16 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 752482232..64df9200f 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 1c3569700..d997c11d5 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 c91b7ddfb..52ca188e5 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftElderGuardian; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 893834475..1663d7b69 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends EntityHoglin implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 471dac245..ede6f5f4f 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; @@ -26,10 +28,12 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -50,6 +54,16 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + private double baseMovementSpeed; private boolean calledNMSHeight = false; 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 073b943a3..f054a8789 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; @@ -26,10 +28,12 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -86,6 +90,16 @@ public class HorseDonkeyController extends MobEntityController { } } + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + @Override public boolean b(float f, float f1) { if (npc == null || !npc.isFlyable()) { 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 d3c78d72d..4d05647a9 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; @@ -26,10 +28,12 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -50,6 +54,16 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; 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 8aeb50c1c..9e725b0cd 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; @@ -26,10 +28,12 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -50,6 +54,16 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; 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 52da72231..2e04aad9c 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; @@ -26,10 +28,12 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -50,6 +54,16 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HumanController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HumanController.java index 5e10f9f53..83b934804 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HumanController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HumanController.java @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import java.util.UUID; import org.bukkit.Bukkit; 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 50604c6e8..7754a008b 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 a75fa5bd5..8841ae3f8 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 a584958b9..00a82e388 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; @@ -25,9 +27,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -48,7 +52,18 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + private final CitizensNPC npc; public EntityLlamaNPC(EntityTypes types, World world) { 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 be0bd60b5..6b58d9e75 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -24,9 +26,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -41,6 +45,16 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MobEntityController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MobEntityController.java index 12d1332ba..156ff81bb 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MobEntityController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MobEntityController.java @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import java.lang.invoke.MethodHandle; import java.lang.reflect.Constructor; import java.util.Map; 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 a78afd155..a4a14833e 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -25,9 +27,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -43,7 +47,18 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + 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 d1bfb988e..f908e0c08 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -23,9 +25,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -40,7 +44,18 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + 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 eec089c28..43fd0782a 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -22,9 +24,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -39,7 +43,18 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends EntityPanda implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + 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 0d75b314e..c70ee22b8 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -23,8 +25,10 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class ParrotController extends MobEntityController { @@ -38,6 +42,16 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 837a731f1..de4772702 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -26,9 +28,11 @@ 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.EnumDifficulty; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; import net.minecraft.server.v1_16_R3.WorldDataServer; @@ -44,7 +48,18 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + private final CitizensNPC npc; private ControllerLook oldLookController; private ControllerMove oldMoveController; 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 37d3c56ef..61abf6df7 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -23,9 +25,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; import net.minecraft.server.v1_16_R3.WorldServer; @@ -41,7 +45,18 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + 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 2458fe879..be07a08da 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -39,6 +43,16 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 223a9423c..bb478018c 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends EntityPiglinBrute implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 e9ef54e77..ce95ca0e4 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends EntityPiglin implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 2b68ab465..9ac5493cd 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -22,9 +24,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -39,7 +43,18 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends EntityPillager implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + 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 ad07f653b..5b2578fb2 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,8 +23,10 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class PolarBearController extends MobEntityController { @@ -36,6 +40,16 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 358a4db2a..3441bccc2 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -29,11 +31,13 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.ItemStack; import net.minecraft.server.v1_16_R3.Items; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -48,6 +52,16 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 336435eeb..0cdba89a3 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -24,9 +26,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -41,6 +45,16 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 2194c1feb..ff3dd508a 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -22,9 +24,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -39,7 +43,18 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends EntityRavager implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + 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 f15b31eb1..7c62bb2e4 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -26,11 +28,13 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.ItemStack; import net.minecraft.server.v1_16_R3.Items; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -45,6 +49,16 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 fe97e8fab..2209c039b 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -22,9 +24,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -39,6 +43,16 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 4e27fbf68..76a836b56 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -22,9 +24,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -39,6 +43,16 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 99569ddc5..f8f7f76f4 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 f7744bffd..d2b3a5bf0 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 7bb8c814f..0fced3f09 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 bdead0b96..884a83a41 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 042427bee..9ac5cb624 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -24,9 +26,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -41,6 +45,16 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 79b65c0e2..938effcd7 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,10 +23,12 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.GameRules; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -39,6 +43,16 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 a95441ffd..c6c887522 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 c95d2e702..9f41d8243 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 e81be2d7d..50b2dc8a1 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends EntityStrider implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 c2521d56d..42507b2e7 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import java.lang.invoke.MethodHandle; import org.bukkit.Bukkit; @@ -27,9 +29,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -50,7 +54,18 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends EntityLlamaTrader implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; + 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 54d6d0065..27ef54b4b 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -26,11 +28,13 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.ItemStack; import net.minecraft.server.v1_16_R3.Items; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -45,6 +49,16 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 6fe3d473d..a790d1a33 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -25,9 +27,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -42,6 +46,16 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + private final CitizensNPC npc; private ControllerJump oldJumpController; private ControllerMove oldMoveController; 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 fec176c8a..cf64d7267 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -20,8 +22,10 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class VexController extends MobEntityController { @@ -35,6 +39,16 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 3c643229c..040c5f348 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import java.util.List; import org.bukkit.Bukkit; @@ -28,11 +30,13 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.GenericAttributes; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.MerchantRecipe; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; import net.minecraft.server.v1_16_R3.WorldServer; @@ -48,6 +52,16 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + private boolean blockingATrade; boolean calledNMSHeight = false; 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 a11bd26b9..290d7f282 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -22,9 +24,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -39,6 +43,16 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 97e83c599..ab1384288 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import java.util.List; import org.bukkit.Bukkit; @@ -28,10 +30,12 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.MerchantRecipe; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; import net.minecraft.server.v1_16_R3.WorldServer; @@ -47,6 +51,16 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends EntityVillagerTrader implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + private boolean blockingATrade; private boolean blockTrades = true; boolean calledNMSHeight = false; 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 620d0f2e0..55a6628b2 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 8265e2333..83170f4f0 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -20,8 +22,10 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class WitherController extends MobEntityController { @@ -35,6 +39,16 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 ab94a3f0f..770ebfc1e 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -24,9 +26,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -41,6 +45,16 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 ba4c2da3f..d1ff5be57 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends EntityZoglin implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 519e8d9ab..6055ba1c7 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 0044dfd02..195f96876 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 239eec0bf..143bd7630 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,9 +23,11 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.SoundEffect; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -38,6 +42,16 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 35e8239a2..5ea8e3bf0 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftAreaEffectCloud; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityAreaEffectCloud; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class AreaEffectCloudController extends MobEntityController { @@ -36,6 +40,16 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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/ArmorStandController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ArmorStandController.java index d88dd6d3e..69cab9519 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ArmorStandController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ArmorStandController.java @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftArmorStand; @@ -21,7 +23,9 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -42,6 +46,16 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + private final CitizensNPC npc; public EntityArmorStandNPC(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 2d1287e9b..de5dd85bf 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftBoat; @@ -21,8 +23,10 @@ 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.Fluid; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.MathHelper; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.TagsFluid; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -44,6 +48,16 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 b471984fd..a6545e4ea 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftDragonFireball; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityDragonFireball; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class DragonFireballController extends MobEntityController { @@ -36,6 +40,16 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 d64501436..387e00732 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; @@ -19,7 +21,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityEgg; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; import net.minecraft.server.v1_16_R3.WorldServer; @@ -47,6 +51,16 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 19ef0e21f..33cedcbaa 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEnderCrystal; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityEnderCrystal; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class EnderCrystalController extends MobEntityController { @@ -36,6 +40,16 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 1d5278cba..fdf812427 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEnderPearl; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityEnderPearl; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class EnderPearlController extends MobEntityController { @@ -36,6 +40,16 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 a859244bd..88809487d 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEnderSignal; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityEnderSignal; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class EnderSignalController extends MobEntityController { @@ -36,6 +40,16 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 628febd26..d70598091 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -21,7 +23,9 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; @@ -36,6 +40,16 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 46b7e1916..fa2c8b451 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityExperienceOrb; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class ExperienceOrbController extends MobEntityController { @@ -30,6 +34,16 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 7709c7312..691e57db8 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -25,8 +27,10 @@ import net.minecraft.server.v1_16_R3.Blocks; 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.FluidType; import net.minecraft.server.v1_16_R3.IBlockData; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; import net.minecraft.server.v1_16_R3.WorldServer; @@ -73,6 +77,16 @@ public class FallingBlockController extends AbstractEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + @Override public void collide(net.minecraft.server.v1_16_R3.Entity entity) { // this method is called by both the entities involved - cancelling 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 d7313dd51..27ad589c5 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityFireworks; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class FireworkController extends MobEntityController { @@ -30,6 +34,16 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 5aaf131ff..81196c1a9 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import java.lang.invoke.MethodHandle; import java.util.UUID; @@ -25,10 +27,13 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.ItemStack; import net.minecraft.server.v1_16_R3.Items; import net.minecraft.server.v1_16_R3.NBTTagCompound; import net.minecraft.server.v1_16_R3.PlayerInteractManager; +import net.minecraft.server.v1_16_R3.Tag; +import net.minecraft.server.v1_16_R3.Vec3D; import net.minecraft.server.v1_16_R3.World; import net.minecraft.server.v1_16_R3.WorldServer; @@ -57,6 +62,16 @@ public class FishingHookController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + @Override public void collide(net.minecraft.server.v1_16_R3.Entity entity) { // this method is called by both the entities involved - cancelling 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 045ffcc5a..9c7544f4b 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -24,8 +26,10 @@ import net.citizensnpcs.util.Util; 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.FluidType; import net.minecraft.server.v1_16_R3.ItemStack; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; import net.minecraft.server.v1_16_R3.WorldServer; @@ -70,6 +74,16 @@ public class ItemController extends AbstractEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + @Override public void collide(net.minecraft.server.v1_16_R3.Entity entity) { // this method is called by both the entities involved - cancelling 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 5cb66423c..0e5eb7494 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -23,7 +25,9 @@ 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class ItemFrameController extends MobEntityController { @@ -57,6 +61,16 @@ public class ItemFrameController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + @Override public void collide(net.minecraft.server.v1_16_R3.Entity entity) { // this method is called by both the entities involved - cancelling 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 f17b80797..542d03888 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityLargeFireball; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class LargeFireballController extends MobEntityController { @@ -30,6 +34,16 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 5c2406e94..4c28ee2cc 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityLeash; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class LeashController extends MobEntityController { @@ -30,6 +34,16 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 3d7ed0e5f..93e336714 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; @@ -20,7 +22,9 @@ import net.citizensnpcs.util.Util; 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.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; import net.minecraft.server.v1_16_R3.WorldServer; @@ -44,6 +48,16 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 e392a8adf..7af9162ab 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityMinecartChest; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class MinecartChestController extends MobEntityController { @@ -30,6 +34,16 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 09789ba3c..e2d8025a7 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityMinecartCommandBlock; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class MinecartCommandController extends MobEntityController { @@ -30,6 +34,16 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 80901c5cd..e619f2817 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityMinecartFurnace; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class MinecartFurnaceController extends MobEntityController { @@ -30,6 +34,16 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 d84a8e269..af0f16850 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.entity.Minecart; import org.bukkit.util.Vector; @@ -11,7 +13,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityMinecartHopper; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class MinecartHopperController extends MobEntityController { @@ -25,6 +29,16 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 0a6cc1f43..b75e716a8 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityMinecartRideable; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class MinecartRideableController extends MobEntityController { @@ -30,6 +34,16 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 f114aa126..7ccdce81b 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.entity.Minecart; import org.bukkit.util.Vector; @@ -11,7 +13,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityMinecartMobSpawner; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class MinecartSpawnerController extends MobEntityController { @@ -25,6 +29,16 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 36c0f7d15..d1bff7e25 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.entity.Minecart; import org.bukkit.util.Vector; @@ -11,7 +13,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityMinecartTNT; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class MinecartTNTController extends MobEntityController { @@ -25,6 +29,16 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 6d9efe64a..cfe6da3a9 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityPainting; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class PaintingController extends MobEntityController { @@ -30,6 +34,16 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 f04930cd8..9527a3d29 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityShulkerBullet; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class ShulkerBulletController extends MobEntityController { @@ -30,6 +34,16 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 70ca42b9e..343b2befb 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntitySmallFireball; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class SmallFireballController extends MobEntityController { @@ -30,6 +34,16 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 5b78ed465..d26296622 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntitySnowball; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class SnowballController extends MobEntityController { @@ -30,6 +34,16 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 eb993a958..a961ec29b 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftArrow; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntitySpectralArrow; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class SpectralArrowController extends MobEntityController { @@ -30,6 +34,16 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 287f7644a..0c24a42c0 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityTNTPrimed; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class TNTPrimedController extends MobEntityController { @@ -30,6 +34,16 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 aa2bd503c..983963ea1 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityThrownExpBottle; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class ThrownExpBottleController extends MobEntityController { @@ -30,6 +34,16 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 52097641a..398cb6952 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,8 +18,10 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityPotion; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.Items; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class ThrownPotionController extends MobEntityController { @@ -42,6 +46,16 @@ public class ThrownPotionController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + @Override public void collide(net.minecraft.server.v1_16_R3.Entity entity) { // this method is called by both the entities involved - cancelling 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 264e101f4..6b3285636 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityThrownTrident; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class ThrownTridentController extends MobEntityController { @@ -30,6 +34,16 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends EntityThrownTrident implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 f742e2678..9058be1c5 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityTippedArrow; import net.minecraft.server.v1_16_R3.EntityTypes; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class TippedArrowController extends MobEntityController { @@ -30,6 +34,16 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 d2c50c9bf..0bea4614f 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 @@ -1,5 +1,7 @@ package net.citizensnpcs.nms.v1_16_R3.entity.nonliving; +import net.minecraft.server.v1_16_R3.Vec3D; + import org.bukkit.Bukkit; import org.bukkit.craftbukkit.v1_16_R3.CraftServer; import org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity; @@ -16,7 +18,9 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityWitherSkull; +import net.minecraft.server.v1_16_R3.FluidType; import net.minecraft.server.v1_16_R3.NBTTagCompound; +import net.minecraft.server.v1_16_R3.Tag; import net.minecraft.server.v1_16_R3.World; public class WitherSkullController extends MobEntityController { @@ -30,6 +34,16 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public boolean a(Tag tag, double d0) { + Vec3D old = getMot().add(0, 0, 0); + boolean res = super.a(tag, d0); + if (!npc.isPushableByFluids()) { + this.setMot(old); + } + return res; + } + 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 c63b68ae5..e89c6db0c 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 @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -35,6 +36,7 @@ import net.minecraft.world.item.ItemStack; 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.phys.Vec3; public class AxolotlController extends MobEntityController { @@ -54,6 +56,16 @@ public class AxolotlController extends MobEntityController { } public static class EntityAxolotlNPC extends Axolotl implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 38b6f7104..faaedfd92 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -22,6 +23,8 @@ import net.minecraft.world.entity.ambient.Bat; 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.phys.Vec3; public class BatController extends MobEntityController { public BatController() { @@ -40,6 +43,16 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 283986aa1..3d83cf4fe 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -22,6 +23,8 @@ import net.minecraft.world.entity.animal.Bee; 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.phys.Vec3; public class BeeController extends MobEntityController { public BeeController() { @@ -40,6 +43,16 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 bd8021284..c933aa9aa 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -22,6 +23,8 @@ import net.minecraft.world.entity.monster.Blaze; 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.phys.Vec3; public class BlazeController extends MobEntityController { public BlazeController() { @@ -40,6 +43,16 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 28d2d2ab3..4f4265ac1 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CatController extends MobEntityController { @@ -44,6 +46,16 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 e63f96a86..1d21a9515 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CaveSpiderController extends MobEntityController { @@ -43,6 +45,16 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 2351d8385..95b94bd16 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ChickenController extends MobEntityController { @@ -44,6 +46,16 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 68d9d89dd..13915b927 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -31,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CodController extends MobEntityController { @@ -50,6 +52,16 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 c61365e2b..78fbd3408 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -30,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CowController extends MobEntityController { @@ -49,6 +51,16 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 a5d694837..12715dd48 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CreeperController extends MobEntityController { @@ -45,6 +47,16 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 e0880f27d..326b5b884 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class DolphinController extends MobEntityController { @@ -46,6 +48,16 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 9260fb985..f27a24a09 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class DrownedController extends MobEntityController { @@ -43,6 +45,16 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 424b108a9..1abc16f50 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -22,6 +23,7 @@ import net.minecraft.world.entity.boss.enderdragon.EnderDragon; 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.phys.Vec3; public class EnderDragonController extends MobEntityController { @@ -41,6 +43,16 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 b83641dc1..1a358b7f0 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 @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class EndermanController extends MobEntityController { @@ -46,6 +48,16 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 6cdb183d7..77f5ec78a 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class EndermiteController extends MobEntityController { @@ -43,6 +45,16 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 9eed81339..3e8c24cad 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class EvokerController extends MobEntityController { @@ -37,6 +39,16 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 d1fbc8437..053adc614 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class FoxController extends MobEntityController { @@ -38,6 +40,16 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 c238eaf1a..c3be12b6f 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -22,6 +23,8 @@ import net.minecraft.world.entity.monster.Ghast; 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.phys.Vec3; public class GhastController extends MobEntityController { public GhastController() { @@ -34,6 +37,16 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 38bb0ed0b..93d3371f0 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GiantController extends MobEntityController { @@ -37,6 +39,16 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 9670542d9..ca644cdfd 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GlowSquidController extends MobEntityController { @@ -37,6 +39,16 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 d1feb2f07..0adf13fae 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GoatController extends MobEntityController { @@ -38,6 +40,16 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 4f71c1510..36dfd2d28 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GuardianController extends MobEntityController { @@ -37,6 +39,16 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 28355bc4e..9bade682b 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GuardianElderController extends MobEntityController { @@ -37,6 +39,16 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 b75d65823..7a1e8b59e 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HoglinController extends MobEntityController { @@ -37,6 +39,16 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 f50b70fb4..e543629b2 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 @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -30,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseController extends MobEntityController { @@ -49,6 +51,16 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private double baseMovementSpeed; private boolean calledNMSHeight = false; 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 310bddfd8..a1bf44bbf 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 @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -30,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseDonkeyController extends MobEntityController { @@ -49,6 +51,16 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; private final CitizensNPC npc; 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 2078a0d85..5d281a052 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 @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -30,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseMuleController extends MobEntityController { @@ -49,6 +51,16 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; 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 61cd8d23d..5927eb305 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 @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -30,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseSkeletonController extends MobEntityController { @@ -49,6 +51,16 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; 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 990918b80..e42e90221 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 @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -30,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseZombieController extends MobEntityController { @@ -49,6 +51,16 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; 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 f1fc274a9..a6627b27a 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class IllusionerController extends MobEntityController { @@ -37,6 +39,16 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 51903188e..b9bbb81f9 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class IronGolemController extends MobEntityController { @@ -37,6 +39,16 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 7f9cab9e7..41077dd2d 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 @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class LlamaController extends MobEntityController { @@ -47,6 +49,16 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 a8b94c553..eaa9eecb6 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class MagmaCubeController extends MobEntityController { @@ -40,6 +42,16 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 cec6598da..974f0e073 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class MushroomCowController extends MobEntityController { @@ -41,6 +43,16 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 74c42b168..36e909fc2 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class OcelotController extends MobEntityController { @@ -39,6 +41,16 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 a5570b820..cb0bdf6f1 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PandaController extends MobEntityController { @@ -38,6 +40,16 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 7dd124968..6c3fefe3b 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -25,6 +26,8 @@ import net.minecraft.world.entity.player.Player; 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.phys.Vec3; public class ParrotController extends MobEntityController { public ParrotController() { @@ -37,6 +40,16 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 fdf6a85fa..62bd5311e 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 @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.Difficulty; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; @@ -29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.storage.WorldData; import net.minecraft.world.phys.Vec3; @@ -43,6 +45,16 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; 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 3fc62b0db..5b46e06c8 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PigController extends MobEntityController { @@ -40,6 +42,16 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 eb9ed36fc..47dcb2fbc 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PigZombieController extends MobEntityController { @@ -38,6 +40,16 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 7e8c1835c..c08a8a04a 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PiglinBruteController extends MobEntityController { @@ -37,6 +39,16 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 5b55c336f..835404f63 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PiglinController extends MobEntityController { @@ -37,6 +39,16 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 d7473995d..7bef7b815 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PillagerController extends MobEntityController { @@ -38,6 +40,16 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 c50611559..30eea0119 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -23,6 +24,8 @@ import net.minecraft.world.entity.animal.PolarBear; 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.phys.Vec3; public class PolarBearController extends MobEntityController { public PolarBearController() { @@ -35,6 +38,16 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 2fd9c6d45..6432544d5 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 @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -34,6 +35,7 @@ import net.minecraft.world.item.ItemStack; 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.phys.Vec3; public class PufferFishController extends MobEntityController { @@ -47,6 +49,16 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 f39657b03..4ca2f79c3 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 @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class RabbitController extends MobEntityController { @@ -40,6 +42,16 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 3eee23e48..f39e50eb1 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class RavagerController extends MobEntityController { @@ -38,6 +40,16 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 21d262388..2055c198b 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -31,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SalmonController extends MobEntityController { @@ -44,6 +46,16 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 55afcc557..a6648e8fe 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SheepController extends MobEntityController { @@ -38,6 +40,16 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 36936ab9a..f3b4157ed 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ShulkerController extends MobEntityController { @@ -38,6 +40,16 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 1eac457d8..0581ddda9 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SilverfishController extends MobEntityController { @@ -37,6 +39,16 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 2cf089dd9..4235461a8 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SkeletonController extends MobEntityController { @@ -37,6 +39,16 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 faf343f17..370c1676b 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SkeletonStrayController extends MobEntityController { @@ -37,6 +39,16 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 d91c1cb7c..31e9b35e6 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SkeletonWitherController extends MobEntityController { @@ -37,6 +39,16 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 8dcec4ade..a4dc0c8ec 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SlimeController extends MobEntityController { @@ -40,6 +42,16 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 f9bc42ce9..ea3012d5c 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,6 +26,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.GameRules; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SnowmanController extends MobEntityController { @@ -38,6 +40,16 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 13c88457d..00b82d861 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SpiderController extends MobEntityController { @@ -37,6 +39,16 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 4a89e319e..c9a2bfc91 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SquidController extends MobEntityController { @@ -37,6 +39,16 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 548f2fcfb..8a8626436 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class StriderController extends MobEntityController { @@ -37,6 +39,16 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 ee6f7ae90..9cca9bd71 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 @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class TraderLlamaController extends MobEntityController { @@ -47,6 +49,16 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 fff7b4b11..bca5ea7fe 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -31,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class TropicalFishController extends MobEntityController { @@ -44,6 +46,16 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 cfe4876df..a27eec4e1 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class TurtleController extends MobEntityController { @@ -41,6 +43,16 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private final CitizensNPC npc; private JumpControl oldJumpController; private MoveControl oldMoveController; 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 e4cb8072e..f8b425c66 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -22,6 +23,8 @@ import net.minecraft.world.entity.monster.Vex; 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.phys.Vec3; public class VexController extends MobEntityController { public VexController() { @@ -34,6 +37,16 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 7d9a2dca8..b310bb9de 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -32,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; 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.phys.Vec3; public class VillagerController extends MobEntityController { @@ -45,6 +47,16 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private boolean blockingATrade; boolean calledNMSHeight = false; 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 8dae8df16..33b426d91 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class VindicatorController extends MobEntityController { @@ -38,6 +40,16 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 af78046f2..ff3ccde93 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -31,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; 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.phys.Vec3; public class WanderingTraderController extends MobEntityController { @@ -44,6 +46,16 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private boolean blockingATrade; private boolean blockTrades = true; boolean calledNMSHeight = false; 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 f600f74f1..cf53a3ff0 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class WitchController extends MobEntityController { @@ -37,6 +39,16 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 5fd56d261..84d5f65fd 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -22,6 +23,8 @@ import net.minecraft.world.entity.boss.wither.WitherBoss; 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.phys.Vec3; public class WitherController extends MobEntityController { public WitherController() { @@ -34,6 +37,16 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 64c42e3b1..1f154d0d4 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 @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class WolfController extends MobEntityController { @@ -40,6 +42,16 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 b807684e0..e87a3a6f8 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ZoglinController extends MobEntityController { @@ -37,6 +39,16 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 6f0bc9144..8b39bf739 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ZombieController extends MobEntityController { @@ -37,6 +39,16 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 c6be62b78..e7ff17af1 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ZombieHuskController extends MobEntityController { @@ -37,6 +39,16 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 1c08ad5b2..0108a4336 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ZombieVillagerController extends MobEntityController { @@ -37,6 +39,16 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 cd6d489f9..cb88f10c1 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.AreaEffectCloud; 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.phys.Vec3; public class AreaEffectCloudController extends MobEntityController { public AreaEffectCloudController() { @@ -36,6 +39,16 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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/ArmorStandController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ArmorStandController.java index 15c203a6b..c4f372e2c 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ArmorStandController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ArmorStandController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Entity; @@ -22,6 +23,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.ArmorStand; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ArmorStandController extends MobEntityController { @@ -41,6 +43,16 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends ArmorStand implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private final CitizensNPC npc; public EntityArmorStandNPC(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 b29c6a1f5..1863604d8 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 @@ -17,12 +17,14 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.FluidTags; +import net.minecraft.tags.Tag; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.MoverType; 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.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -44,6 +46,16 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 c7dbcfe9f..62c6b2a34 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class DragonFireballController extends MobEntityController { public DragonFireballController() { @@ -36,6 +39,16 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 6f44648bb..1201a48ef 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 @@ -17,10 +17,13 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class EggController extends AbstractEntityController { public EggController() { @@ -46,6 +49,16 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 7e02fdc7c..708978d1e 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class EnderCrystalController extends MobEntityController { public EnderCrystalController() { @@ -36,6 +39,16 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 b3890643b..78b3c8e26 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 @@ -15,10 +15,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class EnderPearlController extends MobEntityController { public EnderPearlController() { @@ -37,6 +40,16 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 bf5fd58c2..87e74eae2 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 @@ -15,10 +15,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class EnderSignalController extends MobEntityController { public EnderSignalController() { @@ -37,6 +40,16 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 6fef4074c..2b5ba2899 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Entity; @@ -22,6 +23,7 @@ import net.minecraft.world.entity.EntityType; 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.phys.Vec3; public class EvokerFangsController extends MobEntityController { @@ -35,6 +37,16 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 454bec521..9d600c2e7 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ExperienceOrbController extends MobEntityController { public ExperienceOrbController() { @@ -30,6 +33,16 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 9f92da884..c07ea47b5 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 @@ -21,6 +21,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.MoverType; @@ -29,6 +30,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class FallingBlockController extends AbstractEntityController { @@ -133,6 +135,16 @@ public class FallingBlockController extends AbstractEntityController { } } + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private static final double EPSILON = 0.001; } 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 ca62e1b4d..6104c713b 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 @@ -15,10 +15,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class FireworkController extends MobEntityController { public FireworkController() { @@ -31,6 +34,16 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 95cfaf531..b85408385 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 @@ -22,12 +22,15 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.FishingHook; 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.phys.Vec3; public class FishingHookController extends MobEntityController { public FishingHookController() { @@ -40,6 +43,16 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 0d61c34a1..02a9a164c 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 @@ -20,10 +20,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class GlowItemFrameController extends MobEntityController { public GlowItemFrameController() { @@ -105,6 +108,16 @@ public class GlowItemFrameController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class GlowItemFrameNPC extends CraftGlowItemFrame implements NPCHolder { 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 974cd5907..70f27ef4e 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 @@ -22,12 +22,15 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.item.ItemEntity; 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.phys.Vec3; public class ItemController extends AbstractEntityController { public ItemController() { @@ -121,6 +124,16 @@ public class ItemController extends AbstractEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ItemNPC extends CraftItem implements NPCHolder { 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 0076ce2d6..fa33e29fc 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 @@ -20,10 +20,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ItemFrameController extends MobEntityController { public ItemFrameController() { @@ -105,6 +108,16 @@ public class ItemFrameController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ItemFrameNPC extends CraftItemFrame implements NPCHolder { 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 e92a2bf24..8071b4343 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class LargeFireballController extends MobEntityController { public LargeFireballController() { @@ -30,6 +33,16 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 b99002328..d9bb61090 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 @@ -15,10 +15,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class LeashController extends MobEntityController { public LeashController() { @@ -31,6 +34,16 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 a1b094f5e..006a9e390 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 @@ -17,11 +17,14 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; 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.phys.Vec3; public class LlamaSpitController extends AbstractEntityController { public LlamaSpitController() { @@ -43,6 +46,16 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 06ae506fc..cbe16664c 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MarkerController extends MobEntityController { public MarkerController() { @@ -30,6 +33,16 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 707355f9a..02a21103c 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 @@ -15,10 +15,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartChestController extends MobEntityController { public MinecartChestController() { @@ -31,6 +34,16 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 ff4dc1cab..451454225 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 @@ -15,10 +15,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartCommandController extends MobEntityController { public MinecartCommandController() { @@ -31,6 +34,16 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 80adf564e..b8448286d 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 @@ -15,10 +15,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartFurnaceController extends MobEntityController { public MinecartFurnaceController() { @@ -31,6 +34,16 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 3993244d9..8546e8870 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 @@ -10,10 +10,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartHopperController extends MobEntityController { public MinecartHopperController() { @@ -26,6 +29,16 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 cc8fcb94f..cc6c0dd1e 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartRideableController extends MobEntityController { public MinecartRideableController() { @@ -30,6 +33,16 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 000353944..6a93708e8 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 @@ -10,10 +10,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartSpawnerController extends MobEntityController { public MinecartSpawnerController() { @@ -26,6 +29,16 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 e80a4f569..f1e606533 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 @@ -10,10 +10,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartTNTController extends MobEntityController { public MinecartTNTController() { @@ -26,6 +29,16 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 2ab581596..2c228779e 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class PaintingController extends MobEntityController { public PaintingController() { @@ -30,6 +33,16 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 afd3ae40e..547790991 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ShulkerBulletController extends MobEntityController { public ShulkerBulletController() { @@ -30,6 +33,16 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 08c3f576a..ca6ef725d 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class SmallFireballController extends MobEntityController { public SmallFireballController() { @@ -30,6 +33,16 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 04bb5d29c..8166c7396 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class SnowballController extends MobEntityController { public SnowballController() { @@ -30,6 +33,16 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 0ea24f251..23f978d73 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 @@ -15,10 +15,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class SpectralArrowController extends MobEntityController { public SpectralArrowController() { @@ -31,6 +34,16 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 fa87704f6..7c8d73938 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 @@ -15,10 +15,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class TNTPrimedController extends MobEntityController { public TNTPrimedController() { @@ -31,6 +34,16 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 cf8de1471..7cee611db 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 @@ -15,10 +15,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ThrownExpBottleController extends MobEntityController { public ThrownExpBottleController() { @@ -31,6 +34,16 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 27101604b..f641cdf30 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 @@ -14,11 +14,14 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; 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.phys.Vec3; public class ThrownPotionController extends MobEntityController { public ThrownPotionController() { @@ -90,6 +93,16 @@ public class ThrownPotionController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class LingeringThrownPotionNPC extends CraftThrownPotion implements NPCHolder { 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 cee0c8441..62aa1b683 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 @@ -15,10 +15,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ThrownTridentController extends MobEntityController { public ThrownTridentController() { @@ -31,6 +34,16 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 82f696de2..4d22c36bc 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class TippedArrowController extends MobEntityController { public TippedArrowController() { @@ -30,6 +33,16 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 4218727de..5fcff1b33 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 @@ -14,10 +14,13 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class WitherSkullController extends MobEntityController { public WitherSkullController() { @@ -30,6 +33,16 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(Tag Tag, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(Tag, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 5555c9533..1e21fd820 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 @@ -19,6 +19,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -35,6 +36,7 @@ import net.minecraft.world.item.ItemStack; 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.phys.Vec3; public class AxolotlController extends MobEntityController { @@ -238,5 +240,15 @@ public class AxolotlController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } 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 222f06db1..efc284e54 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,8 @@ import net.minecraft.world.entity.ambient.Bat; 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.phys.Vec3; public class BatController extends MobEntityController { public BatController() { @@ -42,6 +45,16 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 2dc8a38a1..a15959cbd 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,8 @@ import net.minecraft.world.entity.animal.Bee; 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.phys.Vec3; public class BeeController extends MobEntityController { public BeeController() { @@ -42,6 +45,16 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 cac714824..8e36ebd8b 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,8 @@ import net.minecraft.world.entity.monster.Blaze; 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.phys.Vec3; public class BlazeController extends MobEntityController { public BlazeController() { @@ -42,6 +45,16 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 e8857ccc8..b1e5ec733 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CatController extends MobEntityController { @@ -45,6 +47,16 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 efb1c786e..d4650be14 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CaveSpiderController extends MobEntityController { @@ -44,6 +46,16 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 3ef6d5f4e..060fd8ef6 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ChickenController extends MobEntityController { @@ -45,6 +47,16 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 b4909fdec..4cf00d36b 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 @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CodController extends MobEntityController { @@ -51,6 +53,16 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 48ec8d00c..a24eda398 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -31,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CowController extends MobEntityController { @@ -50,6 +52,16 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 7a8c13a3b..981b258dc 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CreeperController extends MobEntityController { @@ -45,6 +47,16 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 f74fa9ca9..cee868615 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class DolphinController extends MobEntityController { @@ -46,6 +48,16 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 36a1e819d..9b87f8b17 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class DrownedController extends MobEntityController { @@ -44,6 +46,16 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 415b59b44..ed3eed124 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,7 @@ import net.minecraft.world.entity.boss.enderdragon.EnderDragon; 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.phys.Vec3; public class EnderDragonController extends MobEntityController { @@ -43,6 +45,16 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 6408c2e54..5e83f7664 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 @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class EndermanController extends MobEntityController { @@ -47,6 +49,16 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 6fc30003b..02f9318db 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class EndermiteController extends MobEntityController { @@ -44,6 +46,16 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 50078f024..58d8cfdc2 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class EvokerController extends MobEntityController { @@ -38,6 +40,16 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 3e5961fc7..948608aaf 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class FoxController extends MobEntityController { @@ -39,6 +41,16 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 8caa0df00..0590fbbc5 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,8 @@ import net.minecraft.world.entity.monster.Ghast; 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.phys.Vec3; public class GhastController extends MobEntityController { public GhastController() { @@ -36,6 +39,16 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 dc5ec66bd..01c0aa9f3 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GiantController extends MobEntityController { @@ -38,6 +40,16 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 0467283ed..ce8251706 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GlowSquidController extends MobEntityController { @@ -38,6 +40,16 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 d563cc9f5..3c7a6a345 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GoatController extends MobEntityController { @@ -39,6 +41,16 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 3e3d53de2..ddaa8af31 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GuardianController extends MobEntityController { @@ -38,6 +40,16 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 512955f24..3449eb5ba 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GuardianElderController extends MobEntityController { @@ -38,6 +40,16 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 5eec3828d..75834a3c7 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HoglinController extends MobEntityController { @@ -38,6 +40,16 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 37abb47e9..ea452180a 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 @@ -22,6 +22,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -31,6 +32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseController extends MobEntityController { @@ -50,6 +52,16 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private double baseMovementSpeed; private boolean calledNMSHeight = false; 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 bbdc5b04d..a38548986 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 @@ -22,6 +22,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -31,6 +32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseDonkeyController extends MobEntityController { @@ -50,6 +52,16 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; private final CitizensNPC npc; 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 041b57333..9bb98890d 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 @@ -22,6 +22,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -31,6 +32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseMuleController extends MobEntityController { @@ -50,6 +52,16 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; 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 5560154cd..9d73ebe56 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 @@ -22,6 +22,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -31,6 +32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseSkeletonController extends MobEntityController { @@ -50,6 +52,16 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; 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 02e40e058..81263afb6 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 @@ -22,6 +22,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -31,6 +32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseZombieController extends MobEntityController { @@ -50,6 +52,16 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private double baseMovementSpeed; boolean calledNMSHeight = false; 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 e52d3a4b9..ddeb9204a 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class IllusionerController extends MobEntityController { @@ -38,6 +40,16 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 5032e82cd..419e8a971 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class IronGolemController extends MobEntityController { @@ -38,6 +40,16 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 8517661bc..c99f028a1 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 @@ -21,6 +21,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class LlamaController extends MobEntityController { @@ -48,6 +50,16 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 a0d0310e3..35d1da5d2 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 @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class MagmaCubeController extends MobEntityController { @@ -41,6 +43,16 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 c301345a9..87468b4a1 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class MushroomCowController extends MobEntityController { @@ -42,6 +44,16 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 44e39f7fa..3cfefe61f 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class OcelotController extends MobEntityController { @@ -40,6 +42,16 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 3cf4913e8..a1318ec56 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PandaController extends MobEntityController { @@ -39,6 +41,16 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 e8153b856..5bebdc109 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -27,6 +28,8 @@ import net.minecraft.world.entity.player.Player; 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.phys.Vec3; public class ParrotController extends MobEntityController { public ParrotController() { @@ -39,6 +42,16 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 2a15b1c70..99ba33357 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 @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.Difficulty; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; @@ -30,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.storage.WorldData; import net.minecraft.world.phys.Vec3; @@ -44,6 +46,16 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; 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 5f60b93cf..feb5756a6 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PigController extends MobEntityController { @@ -40,6 +42,16 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 6a202db7d..5ff4283d3 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PigZombieController extends MobEntityController { @@ -39,6 +41,16 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 3c2a3a0f7..c348c8d23 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PiglinBruteController extends MobEntityController { @@ -38,6 +40,16 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 c510fb2ff..470d324cb 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PiglinController extends MobEntityController { @@ -38,6 +40,16 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 876ca7634..4e3c12245 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PillagerController extends MobEntityController { @@ -39,6 +41,16 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 817849928..af6a1c65c 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,6 +26,8 @@ import net.minecraft.world.entity.animal.PolarBear; 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.phys.Vec3; public class PolarBearController extends MobEntityController { public PolarBearController() { @@ -37,6 +40,16 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 6a376d3e9..77553ff86 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 @@ -19,6 +19,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -35,6 +36,7 @@ import net.minecraft.world.item.ItemStack; 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.phys.Vec3; public class PufferFishController extends MobEntityController { @@ -48,6 +50,16 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 25ebc5a1e..8857e6008 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 @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class RabbitController extends MobEntityController { @@ -41,6 +43,16 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 b0274adf6..84bc0a2e0 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class RavagerController extends MobEntityController { @@ -39,6 +41,16 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 b8960f6a7..273564f64 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 @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SalmonController extends MobEntityController { @@ -45,6 +47,16 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 5e02c6365..9088f1099 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SheepController extends MobEntityController { @@ -39,6 +41,16 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 9a42f8d9c..8e7576baf 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ShulkerController extends MobEntityController { @@ -39,6 +41,16 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 3a5986021..a6966aaca 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SilverfishController extends MobEntityController { @@ -38,6 +40,16 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 4376b5209..bc5a3c7f6 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SkeletonController extends MobEntityController { @@ -38,6 +40,16 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 4ac9d8238..278ad8a6b 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SkeletonStrayController extends MobEntityController { @@ -38,6 +40,16 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 e42345bf1..a19c3fa12 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SkeletonWitherController extends MobEntityController { @@ -38,6 +40,16 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 cfa63dc49..351af81db 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 @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SlimeController extends MobEntityController { @@ -41,6 +43,16 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 3cc79b4af..eae69d75b 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,6 +27,7 @@ import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.level.GameRules; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SnowmanController extends MobEntityController { @@ -39,6 +41,16 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 b0aa6de6b..3576c5c0e 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SpiderController extends MobEntityController { @@ -38,6 +40,16 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 fa88015d4..09986c72a 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SquidController extends MobEntityController { @@ -38,6 +40,16 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 ea9541e6b..804a74d25 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class StriderController extends MobEntityController { @@ -38,6 +40,16 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 47b68a096..5ee92fdc3 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 @@ -21,6 +21,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class TraderLlamaController extends MobEntityController { @@ -48,6 +50,16 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 eae57269e..8a7c190b2 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 @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class TropicalFishController extends MobEntityController { @@ -45,6 +47,16 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 980344837..a5d3c8f80 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 @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class TurtleController extends MobEntityController { @@ -42,6 +44,16 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private final CitizensNPC npc; private JumpControl oldJumpController; private MoveControl oldMoveController; 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 c4e31a2cc..eb02bb881 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,8 @@ import net.minecraft.world.entity.monster.Vex; 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.phys.Vec3; public class VexController extends MobEntityController { public VexController() { @@ -36,6 +39,16 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 d2ca2e85a..556c1c611 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -32,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; 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.phys.Vec3; public class VillagerController extends MobEntityController { @@ -45,6 +47,16 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private boolean blockingATrade; boolean calledNMSHeight = false; 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 1c422b544..0814c42ef 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class VindicatorController extends MobEntityController { @@ -39,6 +41,16 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 d599819be..5bf5ea7f6 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 @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -31,6 +32,7 @@ import net.minecraft.world.entity.vehicle.Boat; 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.phys.Vec3; public class WanderingTraderController extends MobEntityController { @@ -44,6 +46,16 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private boolean blockingATrade; private boolean blockTrades = true; boolean calledNMSHeight = false; 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 7eac1b5ed..f54c3d159 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class WitchController extends MobEntityController { @@ -38,6 +40,16 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 b38469593..71683d106 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,8 @@ import net.minecraft.world.entity.boss.wither.WitherBoss; 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.phys.Vec3; public class WitherController extends MobEntityController { public WitherController() { @@ -36,6 +39,16 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 0f765dd37..a98c91f52 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 @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class WolfController extends MobEntityController { @@ -41,6 +43,16 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + boolean calledNMSHeight = false; private final CitizensNPC npc; 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 181cdd85a..14b1ff55c 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ZoglinController extends MobEntityController { @@ -38,6 +40,16 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 dc87f8f72..c3aa57605 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ZombieController extends MobEntityController { @@ -38,6 +40,16 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 dd8c78e46..87c43d7b3 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ZombieHuskController extends MobEntityController { @@ -38,6 +40,16 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 1144ee5f6..f7c27bb26 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ZombieVillagerController extends MobEntityController { @@ -38,6 +40,16 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 032b99d08..851a66843 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.AreaEffectCloud; 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.phys.Vec3; public class AreaEffectCloudController extends MobEntityController { public AreaEffectCloudController() { @@ -38,6 +41,16 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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/ArmorStandController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ArmorStandController.java index a6690fcb1..d5d3f3e13 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ArmorStandController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ArmorStandController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Entity; @@ -24,6 +25,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.ArmorStand; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ArmorStandController extends MobEntityController { @@ -43,6 +45,16 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends ArmorStand implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private final CitizensNPC npc; public EntityArmorStandNPC(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 f1767e2b3..612c60515 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 @@ -18,12 +18,14 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.FluidTags; +import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.MoverType; 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.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -45,6 +47,16 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 e74a7a57b..c65161c05 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class DragonFireballController extends MobEntityController { public DragonFireballController() { @@ -38,6 +41,16 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 ddd36d8c5..4fbcff6ed 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 @@ -18,10 +18,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class EggController extends AbstractEntityController { public EggController() { @@ -47,6 +50,16 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 9f93271fd..077324de4 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class EnderCrystalController extends MobEntityController { public EnderCrystalController() { @@ -38,6 +41,16 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 ff9aa7a20..6a311bb04 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 @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class EnderPearlController extends MobEntityController { public EnderPearlController() { @@ -39,6 +42,16 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 e66897c56..eb85a0141 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 @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class EnderSignalController extends MobEntityController { public EnderSignalController() { @@ -39,6 +42,16 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 0eea180f8..a3394dc70 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Entity; @@ -24,6 +25,7 @@ import net.minecraft.world.entity.EntityType; 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.phys.Vec3; public class EvokerFangsController extends MobEntityController { @@ -37,6 +39,16 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 f236ea97d..6a2d88c24 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ExperienceOrbController extends MobEntityController { public ExperienceOrbController() { @@ -32,6 +35,16 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 27140fee9..cbe09c57f 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 @@ -14,6 +14,7 @@ import org.bukkit.util.Vector; import net.citizensnpcs.api.event.DespawnReason; import net.citizensnpcs.api.event.SpawnReason; import net.citizensnpcs.api.npc.NPC; +import net.citizensnpcs.nms.v1_18_R2.util.ForwardingNPCHolder; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; @@ -22,6 +23,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.MoverType; @@ -29,6 +31,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.block.Blocks; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class FallingBlockController extends AbstractEntityController { @@ -138,10 +141,20 @@ public class FallingBlockController extends AbstractEntityController { } } + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private static final double EPSILON = 0.001; } - public static class FallingBlockNPC extends CraftFallingBlock implements NPCHolder { + public static class FallingBlockNPC extends CraftFallingBlock implements ForwardingNPCHolder { private final CitizensNPC npc; public FallingBlockNPC(EntityFallingBlockNPC entity) { 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 21aeb72c6..253742736 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 @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class FireworkController extends MobEntityController { public FireworkController() { @@ -33,6 +36,16 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 2563601a7..a04fb4327 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 @@ -23,12 +23,15 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.FishingHook; 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.phys.Vec3; public class FishingHookController extends MobEntityController { public FishingHookController() { @@ -41,6 +44,16 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 e71214898..cc406624c 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 @@ -21,10 +21,13 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class GlowItemFrameController extends MobEntityController { public GlowItemFrameController() { @@ -113,6 +116,16 @@ public class GlowItemFrameController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class GlowItemFrameNPC extends CraftGlowItemFrame implements NPCHolder { 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 650cde6b9..57b355b84 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 @@ -23,12 +23,15 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.item.ItemEntity; 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.phys.Vec3; public class ItemController extends AbstractEntityController { public ItemController() { @@ -129,6 +132,16 @@ public class ItemController extends AbstractEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ItemNPC extends CraftItem implements NPCHolder { 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 f88d4d70a..174cd204b 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 @@ -21,10 +21,13 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ItemFrameController extends MobEntityController { public ItemFrameController() { @@ -113,6 +116,16 @@ public class ItemFrameController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ItemFrameNPC extends CraftItemFrame implements NPCHolder { 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 fef363c66..112ce981c 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class LargeFireballController extends MobEntityController { public LargeFireballController() { @@ -32,6 +35,16 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 65722f9dd..5bc3e03cc 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 @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class LeashController extends MobEntityController { public LeashController() { @@ -33,6 +36,16 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 38641c32a..d0fbe40e9 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 @@ -18,11 +18,14 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; 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.phys.Vec3; public class LlamaSpitController extends AbstractEntityController { public LlamaSpitController() { @@ -44,6 +47,16 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 1a0b8cb73..794244ab8 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MarkerController extends MobEntityController { public MarkerController() { @@ -32,6 +35,16 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 307881d9e..f4abbeeeb 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 @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartChestController extends MobEntityController { public MinecartChestController() { @@ -33,6 +36,16 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 27ecda86e..5aa37a31a 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 @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartCommandController extends MobEntityController { public MinecartCommandController() { @@ -33,6 +36,16 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 b8988b600..1e0a6d890 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 @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartFurnaceController extends MobEntityController { public MinecartFurnaceController() { @@ -33,6 +36,16 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 aa25b318a..2a67f630e 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 @@ -12,10 +12,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartHopperController extends MobEntityController { public MinecartHopperController() { @@ -28,6 +31,16 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 4571b94a7..fe0669669 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartRideableController extends MobEntityController { public MinecartRideableController() { @@ -32,6 +35,16 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 ee3992b8d..a4ab5b9c9 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 @@ -12,10 +12,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartSpawnerController extends MobEntityController { public MinecartSpawnerController() { @@ -28,6 +31,16 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 9c8200883..8b456fd25 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 @@ -12,10 +12,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartTNTController extends MobEntityController { public MinecartTNTController() { @@ -28,6 +31,16 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 d061dc0da..8c2b318d4 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class PaintingController extends MobEntityController { public PaintingController() { @@ -32,6 +35,16 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 4e2795300..d172210dc 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ShulkerBulletController extends MobEntityController { public ShulkerBulletController() { @@ -32,6 +35,16 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 865dfb092..fb7d0dee5 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class SmallFireballController extends MobEntityController { public SmallFireballController() { @@ -32,6 +35,16 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 f3b2983bd..3b4aeaa04 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class SnowballController extends MobEntityController { public SnowballController() { @@ -32,6 +35,16 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 c7bd8074c..037b408f5 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 @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class SpectralArrowController extends MobEntityController { public SpectralArrowController() { @@ -33,6 +36,16 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 0766cb7f4..e37f022d8 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 @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class TNTPrimedController extends MobEntityController { public TNTPrimedController() { @@ -33,6 +36,16 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 ba246500e..7b7d18bee 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 @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ThrownExpBottleController extends MobEntityController { public ThrownExpBottleController() { @@ -33,6 +36,16 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 b4a8cd6e2..508f4a280 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 @@ -16,11 +16,14 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; 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.phys.Vec3; public class ThrownPotionController extends MobEntityController { public ThrownPotionController() { @@ -99,6 +102,16 @@ public class ThrownPotionController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class LingeringThrownPotionNPC extends CraftThrownPotion implements NPCHolder { 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 7df37b893..38418a11a 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 @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ThrownTridentController extends MobEntityController { public ThrownTridentController() { @@ -33,6 +36,16 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 615a68396..d3c85df9a 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class TippedArrowController extends MobEntityController { public TippedArrowController() { @@ -32,6 +35,16 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + 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 5741f9bb7..510ed7c24 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 @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class WitherSkullController extends MobEntityController { public WitherSkullController() { @@ -32,6 +35,16 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/AllayController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/AllayController.java index 24bd38778..eb947ce7e 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/AllayController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/AllayController.java @@ -23,6 +23,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -35,6 +36,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class AllayController extends MobEntityController { @@ -211,5 +213,15 @@ public class AllayController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/AxolotlController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/AxolotlController.java index d2c27596e..2cc86c9da 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/AxolotlController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/AxolotlController.java @@ -20,6 +20,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -36,6 +37,7 @@ import net.minecraft.world.item.ItemStack; 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.phys.Vec3; public class AxolotlController extends MobEntityController { @@ -231,5 +233,15 @@ public class AxolotlController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/BatController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/BatController.java index f5afc965d..fea5659c2 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/BatController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/BatController.java @@ -17,6 +17,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,8 @@ import net.minecraft.world.entity.ambient.Bat; 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.phys.Vec3; public class BatController extends MobEntityController { public BatController() { @@ -163,5 +166,15 @@ public class BatController extends MobEntityController { return super.teleportTo(worldserver, location); return NMSImpl.teleportAcrossWorld(this, worldserver, location); } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/BeeController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/BeeController.java index 5a02ae781..8d63efa08 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/BeeController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/BeeController.java @@ -17,6 +17,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,8 @@ import net.minecraft.world.entity.animal.Bee; 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.phys.Vec3; public class BeeController extends MobEntityController { public BeeController() { @@ -156,5 +159,15 @@ public class BeeController extends MobEntityController { return super.teleportTo(worldserver, location); return NMSImpl.teleportAcrossWorld(this, worldserver, location); } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/BlazeController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/BlazeController.java index 7be994b83..b5feffc9f 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/BlazeController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/BlazeController.java @@ -17,6 +17,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,8 @@ import net.minecraft.world.entity.monster.Blaze; 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.phys.Vec3; public class BlazeController extends MobEntityController { public BlazeController() { @@ -151,5 +154,15 @@ public class BlazeController extends MobEntityController { return super.teleportTo(worldserver, location); return NMSImpl.teleportAcrossWorld(this, worldserver, location); } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CatController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CatController.java index a4a41e3d9..717e05d90 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CatController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CatController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CatController extends MobEntityController { @@ -201,5 +203,15 @@ public class CatController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CaveSpiderController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CaveSpiderController.java index 79be7d441..6be6ae68b 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CaveSpiderController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CaveSpiderController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CaveSpiderController extends MobEntityController { @@ -197,5 +199,15 @@ public class CaveSpiderController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ChickenController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ChickenController.java index b5b0808ad..9b7ce6c35 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ChickenController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ChickenController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ChickenController extends MobEntityController { @@ -210,5 +212,15 @@ public class ChickenController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CodController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CodController.java index 036bf7d33..e098df2b0 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CodController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CodController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -33,6 +34,7 @@ import net.minecraft.world.item.ItemStack; 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.phys.Vec3; public class CodController extends MobEntityController { @@ -236,5 +238,15 @@ public class CodController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CowController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CowController.java index c99e35c4a..dfbf22213 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CowController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CowController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CowController extends MobEntityController { @@ -217,5 +219,15 @@ public class CowController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CreeperController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CreeperController.java index e4612abed..fee318cfd 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CreeperController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/CreeperController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class CreeperController extends MobEntityController { @@ -209,5 +211,15 @@ public class CreeperController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/DolphinController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/DolphinController.java index 1a263778e..1cdcd0de3 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/DolphinController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/DolphinController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class DolphinController extends MobEntityController { @@ -205,5 +207,15 @@ public class DolphinController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/DrownedController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/DrownedController.java index 41c8304f1..cde9e623f 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/DrownedController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/DrownedController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class DrownedController extends MobEntityController { @@ -187,5 +189,15 @@ public class DrownedController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EnderDragonController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EnderDragonController.java index 8fb684f87..f667af2f4 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EnderDragonController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EnderDragonController.java @@ -17,6 +17,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,7 @@ import net.minecraft.world.entity.boss.enderdragon.EnderDragon; 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.phys.Vec3; public class EnderDragonController extends MobEntityController { @@ -167,5 +169,15 @@ public class EnderDragonController extends MobEntityController { return super.teleportTo(worldserver, location); return NMSImpl.teleportAcrossWorld(this, worldserver, location); } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EndermanController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EndermanController.java index 7b46d6227..87d37a7b8 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EndermanController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EndermanController.java @@ -21,6 +21,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class EndermanController extends MobEntityController { @@ -208,5 +210,15 @@ public class EndermanController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EndermiteController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EndermiteController.java index 38c6ebec0..89da3ae27 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EndermiteController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EndermiteController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class EndermiteController extends MobEntityController { @@ -196,5 +198,15 @@ public class EndermiteController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EntityHumanNPC.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EntityHumanNPC.java index 44c111ff5..1f3542119 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EntityHumanNPC.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EntityHumanNPC.java @@ -60,6 +60,7 @@ import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.ServerPlayerGameMode; import net.minecraft.sounds.SoundEvent; import net.minecraft.stats.ServerStatsCounter; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EquipmentSlot; @@ -73,6 +74,7 @@ import net.minecraft.world.entity.player.ProfilePublicKey; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.GameType; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.pathfinder.BlockPathTypes; import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -508,6 +510,16 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable controllerJump.tick(); } + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private void updatePackets(boolean navigating) { if (updateCounter++ <= npc.data(). get(NPC.Metadata.PACKET_UPDATE_DELAY, Setting.PACKET_UPDATE_DELAY.asInt())) diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EvokerController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EvokerController.java index d36ff6f91..55f926fdd 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EvokerController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/EvokerController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class EvokerController extends MobEntityController { @@ -182,6 +184,16 @@ public class EvokerController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class EvokerNPC extends CraftEvoker implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/FoxController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/FoxController.java index a51de6924..d06dd6f32 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/FoxController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/FoxController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class FoxController extends MobEntityController { @@ -195,6 +197,16 @@ public class FoxController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class FoxNPC extends CraftFox implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/FrogController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/FrogController.java index 109670bd5..cffff002c 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/FrogController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/FrogController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class FrogController extends MobEntityController { @@ -198,6 +200,16 @@ public class FrogController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class FrogNPC extends CraftFrog implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GhastController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GhastController.java index fbc718917..caba24ad3 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GhastController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GhastController.java @@ -17,6 +17,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,8 @@ import net.minecraft.world.entity.monster.Ghast; 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.phys.Vec3; public class GhastController extends MobEntityController { public GhastController() { @@ -151,6 +154,16 @@ public class GhastController extends MobEntityController { return super.teleportTo(worldserver, location); return NMSImpl.teleportAcrossWorld(this, worldserver, location); } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class GhastNPC extends CraftGhast implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GiantController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GiantController.java index 52a40d56e..138b271bd 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GiantController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GiantController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GiantController extends MobEntityController { @@ -190,6 +192,16 @@ public class GiantController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class GiantNPC extends CraftGiant implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GlowSquidController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GlowSquidController.java index c45e1f371..479d4ee8d 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GlowSquidController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GlowSquidController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GlowSquidController extends MobEntityController { @@ -190,6 +192,16 @@ public class GlowSquidController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class GlowSquidNPC extends CraftGlowSquid implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GoatController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GoatController.java index e04a4939c..c7353eb57 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GoatController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GoatController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GoatController extends MobEntityController { @@ -195,6 +197,16 @@ public class GoatController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class GoatNPC extends CraftGoat implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GuardianController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GuardianController.java index d8c518aed..130931389 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GuardianController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GuardianController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GuardianController extends MobEntityController { @@ -197,6 +199,16 @@ public class GuardianController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class GuardianNPC extends CraftGuardian implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GuardianElderController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GuardianElderController.java index d18875dea..7819bd6d1 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GuardianElderController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/GuardianElderController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class GuardianElderController extends MobEntityController { @@ -197,6 +199,16 @@ public class GuardianElderController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class GuardianElderNPC extends CraftElderGuardian implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HoglinController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HoglinController.java index 3507a3bc6..11214f92d 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HoglinController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HoglinController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HoglinController extends MobEntityController { @@ -187,6 +189,16 @@ public class HoglinController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class HoglinNPC extends CraftHoglin implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseController.java index f45e6bbb8..680f8d1fa 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseController.java @@ -23,6 +23,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseController extends MobEntityController { @@ -243,6 +245,16 @@ public class HorseController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class HorseNPC extends CraftHorse implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseDonkeyController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseDonkeyController.java index 1d45dc832..d589ae505 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseDonkeyController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseDonkeyController.java @@ -23,6 +23,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseDonkeyController extends MobEntityController { @@ -242,6 +244,16 @@ public class HorseDonkeyController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class HorseDonkeyNPC extends CraftDonkey implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseMuleController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseMuleController.java index 828812239..7652d7594 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseMuleController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseMuleController.java @@ -23,6 +23,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseMuleController extends MobEntityController { @@ -242,6 +244,16 @@ public class HorseMuleController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class HorseMuleNPC extends CraftMule implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseSkeletonController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseSkeletonController.java index 67028680c..240bb7f90 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseSkeletonController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseSkeletonController.java @@ -23,6 +23,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseSkeletonController extends MobEntityController { @@ -242,6 +244,16 @@ public class HorseSkeletonController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class HorseSkeletonNPC extends CraftSkeletonHorse implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseZombieController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseZombieController.java index 7df018d53..6b8c9b051 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseZombieController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/HorseZombieController.java @@ -23,6 +23,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class HorseZombieController extends MobEntityController { @@ -242,6 +244,16 @@ public class HorseZombieController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class HorseZombieNPC extends CraftZombieHorse implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/IllusionerController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/IllusionerController.java index 68ee9c8f9..35ef3b897 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/IllusionerController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/IllusionerController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class IllusionerController extends MobEntityController { @@ -182,6 +184,16 @@ public class IllusionerController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class IllusionerNPC extends CraftIllusioner implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/IronGolemController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/IronGolemController.java index ae20850a8..c111a7a31 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/IronGolemController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/IronGolemController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class IronGolemController extends MobEntityController { @@ -190,6 +192,16 @@ public class IronGolemController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class IronGolemNPC extends CraftIronGolem implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/LlamaController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/LlamaController.java index 2cefb0f29..0d42be3f7 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/LlamaController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/LlamaController.java @@ -22,6 +22,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -30,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class LlamaController extends MobEntityController { @@ -214,6 +216,16 @@ public class LlamaController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class LlamaNPC extends CraftLlama implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/MagmaCubeController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/MagmaCubeController.java index 3f45bf024..46da44e89 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/MagmaCubeController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/MagmaCubeController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class MagmaCubeController extends MobEntityController { @@ -212,6 +214,16 @@ public class MagmaCubeController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class MagmaCubeNPC extends CraftMagmaCube implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/MushroomCowController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/MushroomCowController.java index 12bd9c3ad..f554de27b 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/MushroomCowController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/MushroomCowController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -30,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class MushroomCowController extends MobEntityController { @@ -205,6 +207,16 @@ public class MushroomCowController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class MushroomCowNPC extends CraftMushroomCow implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/OcelotController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/OcelotController.java index 9a25bd9ee..4035964fc 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/OcelotController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/OcelotController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class OcelotController extends MobEntityController { @@ -202,6 +204,16 @@ public class OcelotController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class OcelotNPC extends CraftOcelot implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PandaController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PandaController.java index e0a81b13c..b96a450c4 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PandaController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PandaController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PandaController extends MobEntityController { @@ -195,6 +197,16 @@ public class PandaController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class PandaNPC extends CraftPanda implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ParrotController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ParrotController.java index 8bfe8deb7..7e3c07893 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ParrotController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ParrotController.java @@ -17,6 +17,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -27,6 +28,8 @@ import net.minecraft.world.entity.player.Player; 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.phys.Vec3; public class ParrotController extends MobEntityController { public ParrotController() { @@ -164,6 +167,16 @@ public class ParrotController extends MobEntityController { return super.teleportTo(worldserver, location); return NMSImpl.teleportAcrossWorld(this, worldserver, location); } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ParrotNPC extends CraftParrot implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PhantomController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PhantomController.java index 607a8e627..2e18ba176 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PhantomController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PhantomController.java @@ -20,6 +20,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.Difficulty; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; @@ -31,6 +32,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.storage.WorldData; import net.minecraft.world.phys.Vec3; @@ -243,6 +245,16 @@ public class PhantomController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class PhantomNPC extends CraftPhantom implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PigController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PigController.java index d1cd25f6b..4e3aaddc5 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PigController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PigController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PigController extends MobEntityController { @@ -210,6 +212,16 @@ public class PigController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class PigNPC extends CraftPig implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PigZombieController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PigZombieController.java index dba8ac015..da996c72f 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PigZombieController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PigZombieController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PigZombieController extends MobEntityController { @@ -182,6 +184,16 @@ public class PigZombieController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class PigZombieNPC extends CraftPigZombie implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PiglinBruteController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PiglinBruteController.java index 2cca8e409..0b19d2d75 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PiglinBruteController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PiglinBruteController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PiglinBruteController extends MobEntityController { @@ -184,6 +186,16 @@ public class PiglinBruteController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class PiglinBruteNPC extends CraftPiglinBrute implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PiglinController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PiglinController.java index b3f362706..4ac6c41ee 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PiglinController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PiglinController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PiglinController extends MobEntityController { @@ -184,6 +186,16 @@ public class PiglinController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class PiglinNPC extends CraftPiglin implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PillagerController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PillagerController.java index eaea5b1ef..852165455 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PillagerController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PillagerController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class PillagerController extends MobEntityController { @@ -195,6 +197,16 @@ public class PillagerController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class PillagerNPC extends CraftPillager implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PolarBearController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PolarBearController.java index 665effe06..82b372a16 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PolarBearController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PolarBearController.java @@ -18,6 +18,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -25,6 +26,8 @@ import net.minecraft.world.entity.animal.PolarBear; 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.phys.Vec3; public class PolarBearController extends MobEntityController { public PolarBearController() { @@ -160,6 +163,16 @@ public class PolarBearController extends MobEntityController { return super.teleportTo(worldserver, location); return NMSImpl.teleportAcrossWorld(this, worldserver, location); } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class PolarBearNPC extends CraftPolarBear implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PufferFishController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PufferFishController.java index 56999bca8..5318b946d 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PufferFishController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/PufferFishController.java @@ -20,6 +20,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -36,6 +37,7 @@ import net.minecraft.world.item.ItemStack; 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.phys.Vec3; public class PufferFishController extends MobEntityController { @@ -252,6 +254,16 @@ public class PufferFishController extends MobEntityController { } } + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private static float s(int i) { switch (i) { case 0: diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/RabbitController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/RabbitController.java index 388e87597..1892a34b5 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/RabbitController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/RabbitController.java @@ -20,6 +20,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class RabbitController extends MobEntityController { @@ -217,6 +219,16 @@ public class RabbitController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class RabbitNPC extends CraftRabbit implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/RavagerController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/RavagerController.java index eb55aa9da..1d5d38986 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/RavagerController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/RavagerController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class RavagerController extends MobEntityController { @@ -200,6 +202,16 @@ public class RavagerController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class RavagerNPC extends CraftRavager implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SalmonController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SalmonController.java index 7358c2fac..6dcbd2c8e 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SalmonController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SalmonController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -33,6 +34,7 @@ import net.minecraft.world.item.ItemStack; 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.phys.Vec3; public class SalmonController extends MobEntityController { @@ -227,6 +229,16 @@ public class SalmonController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class SalmonNPC extends CraftSalmon implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SheepController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SheepController.java index e44f4418f..edb0a1c9f 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SheepController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SheepController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SheepController extends MobEntityController { @@ -195,6 +197,16 @@ public class SheepController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class SheepNPC extends CraftSheep implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ShulkerController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ShulkerController.java index c421004d2..72fcc5e76 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ShulkerController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ShulkerController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ShulkerController extends MobEntityController { @@ -207,6 +209,16 @@ public class ShulkerController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ShulkerNPC extends CraftShulker implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SilverfishController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SilverfishController.java index 61062c7ff..e7591e217 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SilverfishController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SilverfishController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SilverfishController extends MobEntityController { @@ -188,6 +190,16 @@ public class SilverfishController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class SilverfishNPC extends CraftSilverfish implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SkeletonController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SkeletonController.java index 6d5878b9c..64d3cb2cd 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SkeletonController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SkeletonController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SkeletonController extends MobEntityController { @@ -190,6 +192,16 @@ public class SkeletonController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class SkeletonNPC extends CraftSkeleton implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SkeletonStrayController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SkeletonStrayController.java index b61b48131..baff450e3 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SkeletonStrayController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SkeletonStrayController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SkeletonStrayController extends MobEntityController { @@ -190,6 +192,16 @@ public class SkeletonStrayController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class StrayNPC extends CraftStray implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SkeletonWitherController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SkeletonWitherController.java index 3e422eb83..4130f8e86 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SkeletonWitherController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SkeletonWitherController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SkeletonWitherController extends MobEntityController { @@ -190,6 +192,16 @@ public class SkeletonWitherController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class SkeletonWitherNPC extends CraftWitherSkeleton implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SlimeController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SlimeController.java index 22bcc9af1..e6401536d 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SlimeController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SlimeController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SlimeController extends MobEntityController { @@ -213,6 +215,16 @@ public class SlimeController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class SlimeNPC extends CraftSlime implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SnowmanController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SnowmanController.java index 5d2425080..20f4993e1 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SnowmanController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SnowmanController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SnowmanController extends MobEntityController { @@ -203,6 +205,16 @@ public class SnowmanController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class SnowmanNPC extends CraftSnowman implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SpiderController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SpiderController.java index 932d6a916..833c0c52c 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SpiderController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SpiderController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SpiderController extends MobEntityController { @@ -191,6 +193,16 @@ public class SpiderController extends MobEntityController { } } + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + } public static class SpiderNPC extends CraftSpider implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SquidController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SquidController.java index f9ffc23ff..b12aa69a9 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SquidController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/SquidController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class SquidController extends MobEntityController { @@ -190,6 +192,16 @@ public class SquidController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class SquidNPC extends CraftSquid implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/StriderController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/StriderController.java index a0006784d..702d0436c 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/StriderController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/StriderController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class StriderController extends MobEntityController { @@ -181,6 +183,16 @@ public class StriderController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class StriderNPC extends CraftStrider implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TadpoleController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TadpoleController.java index 67c0391b3..b648c3f06 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TadpoleController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TadpoleController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -34,6 +35,7 @@ import net.minecraft.world.item.ItemStack; 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.phys.Vec3; public class TadpoleController extends MobEntityController { @@ -227,6 +229,16 @@ public class TadpoleController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class TadpoleNPC extends CraftTadpole implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TraderLlamaController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TraderLlamaController.java index 56f17db39..55f1e9df7 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TraderLlamaController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TraderLlamaController.java @@ -22,6 +22,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -30,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class TraderLlamaController extends MobEntityController { @@ -215,6 +217,16 @@ public class TraderLlamaController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class TraderLlamaNPC extends CraftTraderLlama implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TropicalFishController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TropicalFishController.java index 1939468e8..6419dad3f 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TropicalFishController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TropicalFishController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -33,6 +34,7 @@ import net.minecraft.world.item.ItemStack; 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.phys.Vec3; public class TropicalFishController extends MobEntityController { @@ -229,6 +231,16 @@ public class TropicalFishController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class TropicalFishNPC extends CraftTropicalFish implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TurtleController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TurtleController.java index a0e8f64c8..2cd306bde 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TurtleController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/TurtleController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -30,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class TurtleController extends MobEntityController { @@ -205,6 +207,16 @@ public class TurtleController extends MobEntityController { } } + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + static class EmptyControllerJump extends JumpControl { public EmptyControllerJump(Mob var1) { super(var1); diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/VexController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/VexController.java index 1e507dc32..eeb590767 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/VexController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/VexController.java @@ -17,6 +17,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,8 @@ import net.minecraft.world.entity.monster.Vex; 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.phys.Vec3; public class VexController extends MobEntityController { public VexController() { @@ -149,6 +152,16 @@ public class VexController extends MobEntityController { return super.teleportTo(worldserver, location); return NMSImpl.teleportAcrossWorld(this, worldserver, location); } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class VexNPC extends CraftVex implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/VillagerController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/VillagerController.java index bf12fcd2a..459588bbc 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/VillagerController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/VillagerController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -33,6 +34,7 @@ import net.minecraft.world.entity.vehicle.Boat; 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.phys.Vec3; public class VillagerController extends MobEntityController { @@ -236,6 +238,16 @@ public class VillagerController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class VillagerNPC extends CraftVillager implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/VindicatorController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/VindicatorController.java index faf4b1594..056d1841b 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/VindicatorController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/VindicatorController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -27,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class VindicatorController extends MobEntityController { @@ -196,6 +198,16 @@ public class VindicatorController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class VindicatorNPC extends CraftVindicator implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WanderingTraderController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WanderingTraderController.java index 53f04e160..5932595d3 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WanderingTraderController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WanderingTraderController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; @@ -32,6 +33,7 @@ import net.minecraft.world.entity.vehicle.Boat; 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.phys.Vec3; public class WanderingTraderController extends MobEntityController { @@ -241,6 +243,16 @@ public class WanderingTraderController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class WanderingTraderNPC extends CraftWanderingTrader implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WardenController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WardenController.java index 6c79cddc6..937c396e3 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WardenController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WardenController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.util.Unit; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; @@ -28,6 +29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class WardenController extends MobEntityController { @@ -192,6 +194,16 @@ public class WardenController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class WardenNPC extends CraftWarden implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WitchController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WitchController.java index ceb5fc295..9fe35ed52 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WitchController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WitchController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class WitchController extends MobEntityController { @@ -190,6 +192,16 @@ public class WitchController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class WitchNPC extends CraftWitch implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WitherController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WitherController.java index 363a8321f..331bc8a6c 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WitherController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WitherController.java @@ -17,6 +17,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -24,6 +25,8 @@ import net.minecraft.world.entity.boss.wither.WitherBoss; 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.phys.Vec3; public class WitherController extends MobEntityController { public WitherController() { @@ -160,6 +163,16 @@ public class WitherController extends MobEntityController { return super.teleportTo(worldserver, location); return NMSImpl.teleportAcrossWorld(this, worldserver, location); } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class WitherNPC extends CraftWither implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WolfController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WolfController.java index c9c937f65..157bf2999 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WolfController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/WolfController.java @@ -20,6 +20,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -29,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class WolfController extends MobEntityController { @@ -203,6 +205,16 @@ public class WolfController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class WolfNPC extends CraftWolf implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZoglinController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZoglinController.java index b35c9c026..c61c9d2f5 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZoglinController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZoglinController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ZoglinController extends MobEntityController { @@ -183,6 +185,16 @@ public class ZoglinController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ZoglinNPC extends CraftZoglin implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZombieController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZombieController.java index 43cafa91f..2dcbf299e 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZombieController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZombieController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ZombieController extends MobEntityController { @@ -181,6 +183,16 @@ public class ZombieController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ZombieNPC extends CraftZombie implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZombieHuskController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZombieHuskController.java index 6edc11c42..eb07e6dea 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZombieHuskController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZombieHuskController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ZombieHuskController extends MobEntityController { @@ -181,6 +183,16 @@ public class ZombieHuskController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ZombieHuskNPC extends CraftHusk implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZombieVillagerController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZombieVillagerController.java index 4c69f5f55..871cf99c7 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZombieVillagerController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/ZombieVillagerController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; +import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,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.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ZombieVillagerController extends MobEntityController { @@ -182,6 +184,16 @@ public class ZombieVillagerController extends MobEntityController { NMSImpl.flyingMoveLogic(this, vec3d); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ZombieVillagerNPC extends CraftVillagerZombie implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/AreaEffectCloudController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/AreaEffectCloudController.java index f7b86a339..381005735 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/AreaEffectCloudController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.AreaEffectCloud; 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.phys.Vec3; public class AreaEffectCloudController extends MobEntityController { public AreaEffectCloudController() { @@ -100,5 +103,15 @@ public class AreaEffectCloudController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ArmorStandController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ArmorStandController.java index 94b877446..e68f2a1e7 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ArmorStandController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ArmorStandController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Entity; @@ -24,6 +25,7 @@ import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.ArmorStand; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class ArmorStandController extends MobEntityController { @@ -115,5 +117,15 @@ public class ArmorStandController extends MobEntityController { npc.update(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/BoatController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/BoatController.java index d89efa811..a887e7189 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/BoatController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/BoatController.java @@ -19,12 +19,14 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.FluidTags; +import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.MoverType; 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.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -235,5 +237,15 @@ public class BoatController extends MobEntityController { } return flag ? Status.UNDER_WATER : null; } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ChestBoatController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ChestBoatController.java index 015b68ea9..8b9ca6829 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ChestBoatController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ChestBoatController.java @@ -19,6 +19,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.FluidTags; +import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -26,6 +27,7 @@ import net.minecraft.world.entity.MoverType; import net.minecraft.world.entity.vehicle.Boat; 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.phys.AABB; import net.minecraft.world.phys.Vec3; @@ -236,5 +238,15 @@ public class ChestBoatController extends MobEntityController { } return flag ? Status.UNDER_WATER : null; } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/DragonFireballController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/DragonFireballController.java index 9233bce53..ffa6f7fd6 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/DragonFireballController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/DragonFireballController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class DragonFireballController extends MobEntityController { public DragonFireballController() { @@ -112,5 +115,15 @@ public class DragonFireballController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EggController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EggController.java index b360e5e01..7d4c9dd13 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EggController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EggController.java @@ -18,10 +18,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class EggController extends AbstractEntityController { public EggController() { @@ -117,5 +120,15 @@ public class EggController extends AbstractEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EnderCrystalController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EnderCrystalController.java index 68c5cdfe6..4691e70e8 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EnderCrystalController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class EnderCrystalController extends MobEntityController { public EnderCrystalController() { @@ -100,5 +103,15 @@ public class EnderCrystalController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EnderPearlController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EnderPearlController.java index e74824bbd..bc3da7389 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EnderPearlController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EnderPearlController.java @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class EnderPearlController extends MobEntityController { public EnderPearlController() { @@ -104,5 +107,15 @@ public class EnderPearlController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EnderSignalController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EnderSignalController.java index 967382cbc..0714343e3 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EnderSignalController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EnderSignalController.java @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class EnderSignalController extends MobEntityController { public EnderSignalController() { @@ -101,5 +104,15 @@ public class EnderSignalController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EvokerFangsController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EvokerFangsController.java index b67f08595..7c4cea55e 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EvokerFangsController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/EvokerFangsController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Entity; @@ -24,6 +25,7 @@ import net.minecraft.world.entity.EntityType; 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.phys.Vec3; public class EvokerFangsController extends MobEntityController { @@ -109,6 +111,16 @@ public class EvokerFangsController extends MobEntityController { npc.update(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class EvokerFangsNPC extends CraftEvokerFangs implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ExperienceOrbController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ExperienceOrbController.java index f2dff5f61..db51f5510 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ExperienceOrbController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ExperienceOrbController extends MobEntityController { public ExperienceOrbController() { @@ -94,6 +97,16 @@ public class ExperienceOrbController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ExperienceOrbNPC extends CraftExperienceOrb implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/FallingBlockController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/FallingBlockController.java index 0446b1b37..f2b2ca404 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/FallingBlockController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/FallingBlockController.java @@ -22,6 +22,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.MoverType; @@ -29,6 +30,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.block.Blocks; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.phys.Vec3; public class FallingBlockController extends AbstractEntityController { @@ -138,6 +140,16 @@ public class FallingBlockController extends AbstractEntityController { } } + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + private static final double EPSILON = 0.001; } diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/FireworkController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/FireworkController.java index 9876e57f1..1a6e4448b 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/FireworkController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/FireworkController.java @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class FireworkController extends MobEntityController { public FireworkController() { @@ -95,6 +98,16 @@ public class FireworkController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class FireworkNPC extends CraftFirework implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/FishingHookController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/FishingHookController.java index a1a1129bc..281a6895e 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/FishingHookController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/FishingHookController.java @@ -23,12 +23,15 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.projectile.FishingHook; 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.phys.Vec3; public class FishingHookController extends MobEntityController { public FishingHookController() { @@ -118,6 +121,16 @@ public class FishingHookController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class FishingHookNPC extends CraftFishHook implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/GlowItemFrameController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/GlowItemFrameController.java index 7482e7fb2..974d986e7 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/GlowItemFrameController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/GlowItemFrameController.java @@ -22,10 +22,13 @@ import net.minecraft.core.Direction; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class GlowItemFrameController extends MobEntityController { public GlowItemFrameController() { @@ -114,6 +117,16 @@ public class GlowItemFrameController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class GlowItemFrameNPC extends CraftGlowItemFrame implements NPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ItemController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ItemController.java index 508d0900d..f4cbb2fe8 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ItemController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ItemController.java @@ -23,12 +23,15 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.item.ItemEntity; 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.phys.Vec3; public class ItemController extends AbstractEntityController { public ItemController() { @@ -129,6 +132,16 @@ public class ItemController extends AbstractEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ItemNPC extends CraftItem implements NPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ItemFrameController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ItemFrameController.java index b85ab51f6..749139844 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ItemFrameController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ItemFrameController.java @@ -22,10 +22,13 @@ import net.minecraft.core.Direction; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ItemFrameController extends MobEntityController { public ItemFrameController() { @@ -114,6 +117,16 @@ public class ItemFrameController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ItemFrameNPC extends CraftItemFrame implements NPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/LargeFireballController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/LargeFireballController.java index b1660de87..80969fa6e 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/LargeFireballController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/LargeFireballController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class LargeFireballController extends MobEntityController { public LargeFireballController() { @@ -106,6 +109,16 @@ public class LargeFireballController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class LargeFireballNPC extends CraftLargeFireball implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/LeashController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/LeashController.java index 9aa504615..d6b648eac 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/LeashController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/LeashController.java @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class LeashController extends MobEntityController { public LeashController() { @@ -100,6 +103,16 @@ public class LeashController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class LeashNPC extends CraftLeash implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/LlamaSpitController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/LlamaSpitController.java index 8f90f04b1..96ea26490 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/LlamaSpitController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/LlamaSpitController.java @@ -18,11 +18,14 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; 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.phys.Vec3; public class LlamaSpitController extends AbstractEntityController { public LlamaSpitController() { @@ -114,6 +117,16 @@ public class LlamaSpitController extends AbstractEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class LlamaSpitNPC extends CraftLlamaSpit implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MarkerController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MarkerController.java index 7dbadb9f8..a9d272afd 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MarkerController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MarkerController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MarkerController extends MobEntityController { public MarkerController() { @@ -94,6 +97,16 @@ public class MarkerController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class MarkerNPC extends CraftMarker implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartChestController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartChestController.java index 4fda30267..817cc73d0 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartChestController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartChestController.java @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartChestController extends MobEntityController { public MinecartChestController() { @@ -96,6 +99,16 @@ public class MinecartChestController extends MobEntityController { } } + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } + } public static class MinecartChestNPC extends CraftMinecartChest implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartCommandController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartCommandController.java index e5e6644fd..1c4ae1b4b 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartCommandController.java @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartCommandController extends MobEntityController { public MinecartCommandController() { @@ -95,6 +98,16 @@ public class MinecartCommandController extends MobEntityController { NMSImpl.minecartItemLogic(this); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class MinecartCommandNPC extends CraftMinecartCommand implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartFurnaceController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartFurnaceController.java index a5c6cba4c..44ab58790 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartFurnaceController.java @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartFurnaceController extends MobEntityController { public MinecartFurnaceController() { @@ -95,6 +98,16 @@ public class MinecartFurnaceController extends MobEntityController { NMSImpl.minecartItemLogic(this); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class MinecartFurnaceNPC extends CraftMinecartFurnace implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartHopperController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartHopperController.java index d837cc0f7..928241242 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartHopperController.java @@ -12,10 +12,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartHopperController extends MobEntityController { public MinecartHopperController() { @@ -82,5 +85,15 @@ public class MinecartHopperController extends MobEntityController { NMSImpl.minecartItemLogic(this); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } \ No newline at end of file diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartRideableController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartRideableController.java index 3cbbf9b43..1f1acb508 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartRideableController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartRideableController extends MobEntityController { public MinecartRideableController() { @@ -94,6 +97,16 @@ public class MinecartRideableController extends MobEntityController { NMSImpl.minecartItemLogic(this); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class MinecartRideableNPC extends CraftMinecartRideable implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartSpawnerController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartSpawnerController.java index 134276482..74224aa5d 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartSpawnerController.java @@ -12,10 +12,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartSpawnerController extends MobEntityController { public MinecartSpawnerController() { @@ -82,5 +85,15 @@ public class MinecartSpawnerController extends MobEntityController { NMSImpl.minecartItemLogic(this); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } \ No newline at end of file diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartTNTController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartTNTController.java index b7a88f5f2..7498bfe22 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/MinecartTNTController.java @@ -12,10 +12,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class MinecartTNTController extends MobEntityController { public MinecartTNTController() { @@ -82,5 +85,15 @@ public class MinecartTNTController extends MobEntityController { NMSImpl.minecartItemLogic(this); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } } \ No newline at end of file diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/PaintingController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/PaintingController.java index 9455000f2..a5c75cb00 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/PaintingController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/PaintingController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class PaintingController extends MobEntityController { public PaintingController() { @@ -99,6 +102,16 @@ public class PaintingController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class PaintingNPC extends CraftPainting implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ShulkerBulletController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ShulkerBulletController.java index 85412e93b..473ef1d11 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ShulkerBulletController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ShulkerBulletController extends MobEntityController { public ShulkerBulletController() { @@ -94,6 +97,16 @@ public class ShulkerBulletController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ShulkerBulletNPC extends CraftShulkerBullet implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/SmallFireballController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/SmallFireballController.java index 121469bf9..bf889a6fa 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/SmallFireballController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/SmallFireballController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class SmallFireballController extends MobEntityController { public SmallFireballController() { @@ -97,6 +100,16 @@ public class SmallFireballController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class SmallFireballNPC extends CraftSmallFireball implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/SnowballController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/SnowballController.java index d9c50c03c..d65d5e8dd 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/SnowballController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/SnowballController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class SnowballController extends MobEntityController { public SnowballController() { @@ -94,6 +97,16 @@ public class SnowballController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class SnowballNPC extends CraftSnowball implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/SpectralArrowController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/SpectralArrowController.java index 5eb59f446..4c1eaaa89 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/SpectralArrowController.java @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class SpectralArrowController extends MobEntityController { public SpectralArrowController() { @@ -95,6 +98,16 @@ public class SpectralArrowController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class SpectralArrowNPC extends CraftArrow implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/TNTPrimedController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/TNTPrimedController.java index 61de74483..1f3d67382 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/TNTPrimedController.java @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class TNTPrimedController extends MobEntityController { public TNTPrimedController() { @@ -95,6 +98,16 @@ public class TNTPrimedController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class TNTPrimedNPC extends CraftTNTPrimed implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ThrownExpBottleController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ThrownExpBottleController.java index a244e4539..ebe08e2a5 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ThrownExpBottleController.java @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ThrownExpBottleController extends MobEntityController { public ThrownExpBottleController() { @@ -98,6 +101,16 @@ public class ThrownExpBottleController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ThrownExpBottleNPC extends CraftThrownExpBottle implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ThrownPotionController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ThrownPotionController.java index cb7ccd482..82872c6f3 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ThrownPotionController.java @@ -16,11 +16,14 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; 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.phys.Vec3; public class ThrownPotionController extends MobEntityController { public ThrownPotionController() { @@ -99,6 +102,16 @@ public class ThrownPotionController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class LingeringThrownPotionNPC extends CraftThrownPotion implements NPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ThrownTridentController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ThrownTridentController.java index e9defe3b5..1de5b952b 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ThrownTridentController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/ThrownTridentController.java @@ -17,10 +17,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class ThrownTridentController extends MobEntityController { public ThrownTridentController() { @@ -95,6 +98,16 @@ public class ThrownTridentController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class ThrownTridentNPC extends CraftTrident implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/TippedArrowController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/TippedArrowController.java index 1148f07c8..ea2d2fb61 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/TippedArrowController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/TippedArrowController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class TippedArrowController extends MobEntityController { public TippedArrowController() { @@ -94,6 +97,16 @@ public class TippedArrowController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class TippedArrowNPC extends CraftTippedArrow implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/WitherSkullController.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/WitherSkullController.java index 675e1b820..97acb0bcd 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/WitherSkullController.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/entity/nonliving/WitherSkullController.java @@ -16,10 +16,13 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; 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.phys.Vec3; public class WitherSkullController extends MobEntityController { public WitherSkullController() { @@ -94,6 +97,16 @@ public class WitherSkullController extends MobEntityController { super.tick(); } } + + @Override + public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { + Vec3 old = getDeltaMovement().add(0, 0, 0); + boolean res = super.updateFluidHeightAndDoFluidPushing(tagkey, d0); + if (!npc.isPushableByFluids()) { + setDeltaMovement(old); + } + return res; + } } public static class WitherSkullNPC extends CraftWitherSkull implements ForwardingNPCHolder { diff --git a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/util/PlayerNavigation.java b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/util/PlayerNavigation.java index 8bbe407cd..c51b74ece 100644 --- a/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/util/PlayerNavigation.java +++ b/v1_19_R1/src/main/java/net/citizensnpcs/nms/v1_19_R1/util/PlayerNavigation.java @@ -29,7 +29,6 @@ import net.minecraft.world.level.pathfinder.Path; import net.minecraft.world.level.pathfinder.PathFinder; import net.minecraft.world.level.pathfinder.WalkNodeEvaluator; import net.minecraft.world.phys.Vec3; -import org.bukkit.Bukkit; public class PlayerNavigation extends PathNavigation { private boolean avoidSun; @@ -149,7 +148,7 @@ public class PlayerNavigation 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;