From ad6b47348c4a47bb7f7f824b8356dba1762667db Mon Sep 17 00:00:00 2001 From: fullwall Date: Mon, 8 Jul 2024 00:35:03 +0800 Subject: [PATCH] Add /npc collidable --fluids and backport fluid pushable to <1.13. --- .../citizensnpcs/commands/NPCCommands.java | 11 ++- .../java/net/citizensnpcs/util/Messages.java | 2 + main/src/main/resources/en.json | 2 + .../v1_10_R1/entity/ArmorStandController.java | 5 + .../nms/v1_10_R1/entity/BatController.java | 5 + .../nms/v1_10_R1/entity/BlazeController.java | 5 + .../v1_10_R1/entity/CaveSpiderController.java | 5 + .../v1_10_R1/entity/ChickenController.java | 5 + .../nms/v1_10_R1/entity/CowController.java | 5 + .../v1_10_R1/entity/CreeperController.java | 5 + .../entity/EnderDragonController.java | 5 + .../v1_10_R1/entity/EndermanController.java | 5 + .../v1_10_R1/entity/EndermiteController.java | 5 + .../nms/v1_10_R1/entity/EntityHumanNPC.java | 7 +- .../nms/v1_10_R1/entity/GhastController.java | 5 + .../nms/v1_10_R1/entity/GiantController.java | 5 + .../v1_10_R1/entity/GuardianController.java | 5 + .../nms/v1_10_R1/entity/HorseController.java | 7 +- .../v1_10_R1/entity/IronGolemController.java | 5 + .../v1_10_R1/entity/MagmaCubeController.java | 5 + .../entity/MushroomCowController.java | 5 + .../nms/v1_10_R1/entity/OcelotController.java | 5 + .../nms/v1_10_R1/entity/PigController.java | 5 + .../v1_10_R1/entity/PigZombieController.java | 5 + .../v1_10_R1/entity/PolarBearController.java | 5 + .../nms/v1_10_R1/entity/RabbitController.java | 5 + .../nms/v1_10_R1/entity/SheepController.java | 5 + .../v1_10_R1/entity/ShulkerController.java | 5 + .../v1_10_R1/entity/SilverfishController.java | 5 + .../v1_10_R1/entity/SkeletonController.java | 5 + .../nms/v1_10_R1/entity/SlimeController.java | 5 + .../v1_10_R1/entity/SnowmanController.java | 5 + .../nms/v1_10_R1/entity/SpiderController.java | 5 + .../nms/v1_10_R1/entity/SquidController.java | 5 + .../v1_10_R1/entity/VillagerController.java | 5 + .../nms/v1_10_R1/entity/WitchController.java | 5 + .../nms/v1_10_R1/entity/WitherController.java | 5 + .../nms/v1_10_R1/entity/WolfController.java | 5 + .../nms/v1_10_R1/entity/ZombieController.java | 5 + .../nonliving/AreaEffectCloudController.java | 5 + .../entity/nonliving/BoatController.java | 5 + .../nonliving/DragonFireballController.java | 5 + .../entity/nonliving/EggController.java | 5 + .../nonliving/EnderCrystalController.java | 5 + .../nonliving/EnderPearlController.java | 5 + .../nonliving/EnderSignalController.java | 5 + .../nonliving/ExperienceOrbController.java | 5 + .../nonliving/FallingBlockController.java | 5 + .../entity/nonliving/FireworkController.java | 5 + .../nonliving/FishingHookController.java | 5 + .../entity/nonliving/ItemController.java | 5 + .../entity/nonliving/ItemFrameController.java | 5 + .../nonliving/LargeFireballController.java | 5 + .../entity/nonliving/LeashController.java | 5 + .../nonliving/MinecartChestController.java | 5 + .../nonliving/MinecartCommandController.java | 5 + .../nonliving/MinecartFurnaceController.java | 5 + .../nonliving/MinecartHopperController.java | 5 + .../nonliving/MinecartRideableController.java | 5 + .../nonliving/MinecartSpawnerController.java | 5 + .../nonliving/MinecartTNTController.java | 5 + .../entity/nonliving/PaintingController.java | 5 + .../nonliving/ShulkerBulletController.java | 5 + .../nonliving/SmallFireballController.java | 5 + .../entity/nonliving/SnowballController.java | 5 + .../nonliving/SpectralArrowController.java | 5 + .../entity/nonliving/TNTPrimedController.java | 5 + .../nonliving/ThrownExpBottleController.java | 5 + .../nonliving/ThrownPotionController.java | 5 + .../nonliving/TippedArrowController.java | 5 + .../nonliving/WitherSkullController.java | 5 + .../v1_10_R1/util/PlayerlistTrackerEntry.java | 4 +- .../v1_11_R1/entity/ArmorStandController.java | 5 + .../nms/v1_11_R1/entity/BatController.java | 5 + .../nms/v1_11_R1/entity/BlazeController.java | 5 + .../v1_11_R1/entity/CaveSpiderController.java | 5 + .../v1_11_R1/entity/ChickenController.java | 5 + .../nms/v1_11_R1/entity/CowController.java | 5 + .../v1_11_R1/entity/CreeperController.java | 5 + .../entity/EnderDragonController.java | 5 + .../v1_11_R1/entity/EndermanController.java | 5 + .../v1_11_R1/entity/EndermiteController.java | 5 + .../nms/v1_11_R1/entity/EntityHumanNPC.java | 7 +- .../nms/v1_11_R1/entity/EvokerController.java | 5 + .../nms/v1_11_R1/entity/GhastController.java | 5 + .../nms/v1_11_R1/entity/GiantController.java | 5 + .../v1_11_R1/entity/GuardianController.java | 5 + .../entity/GuardianElderController.java | 5 + .../nms/v1_11_R1/entity/HorseController.java | 7 +- .../entity/HorseDonkeyController.java | 7 +- .../v1_11_R1/entity/HorseMuleController.java | 7 +- .../entity/HorseSkeletonController.java | 7 +- .../entity/HorseZombieController.java | 7 +- .../v1_11_R1/entity/IronGolemController.java | 5 + .../nms/v1_11_R1/entity/LlamaController.java | 5 + .../v1_11_R1/entity/MagmaCubeController.java | 5 + .../entity/MushroomCowController.java | 5 + .../nms/v1_11_R1/entity/OcelotController.java | 5 + .../nms/v1_11_R1/entity/PigController.java | 5 + .../v1_11_R1/entity/PigZombieController.java | 5 + .../v1_11_R1/entity/PolarBearController.java | 5 + .../nms/v1_11_R1/entity/RabbitController.java | 5 + .../nms/v1_11_R1/entity/SheepController.java | 5 + .../v1_11_R1/entity/ShulkerController.java | 5 + .../v1_11_R1/entity/SilverfishController.java | 5 + .../v1_11_R1/entity/SkeletonController.java | 5 + .../entity/SkeletonStrayController.java | 5 + .../entity/SkeletonWitherController.java | 5 + .../nms/v1_11_R1/entity/SlimeController.java | 5 + .../v1_11_R1/entity/SnowmanController.java | 5 + .../nms/v1_11_R1/entity/SpiderController.java | 5 + .../nms/v1_11_R1/entity/SquidController.java | 5 + .../nms/v1_11_R1/entity/VexController.java | 5 + .../v1_11_R1/entity/VillagerController.java | 5 + .../v1_11_R1/entity/VindicatorController.java | 5 + .../nms/v1_11_R1/entity/WitchController.java | 5 + .../nms/v1_11_R1/entity/WitherController.java | 5 + .../nms/v1_11_R1/entity/WolfController.java | 5 + .../nms/v1_11_R1/entity/ZombieController.java | 5 + .../v1_11_R1/entity/ZombieHuskController.java | 5 + .../entity/ZombieVillagerController.java | 5 + .../nonliving/AreaEffectCloudController.java | 5 + .../entity/nonliving/BoatController.java | 5 + .../nonliving/DragonFireballController.java | 5 + .../entity/nonliving/EggController.java | 5 + .../nonliving/EnderCrystalController.java | 5 + .../nonliving/EnderPearlController.java | 5 + .../nonliving/EnderSignalController.java | 5 + .../nonliving/EvokerFangsController.java | 5 + .../nonliving/ExperienceOrbController.java | 5 + .../nonliving/FallingBlockController.java | 5 + .../entity/nonliving/FireworkController.java | 5 + .../nonliving/FishingHookController.java | 5 + .../entity/nonliving/ItemController.java | 5 + .../entity/nonliving/ItemFrameController.java | 5 + .../nonliving/LargeFireballController.java | 5 + .../entity/nonliving/LeashController.java | 5 + .../entity/nonliving/LlamaSpitController.java | 5 + .../nonliving/MinecartChestController.java | 5 + .../nonliving/MinecartCommandController.java | 5 + .../nonliving/MinecartFurnaceController.java | 5 + .../nonliving/MinecartHopperController.java | 5 + .../nonliving/MinecartRideableController.java | 5 + .../nonliving/MinecartSpawnerController.java | 5 + .../nonliving/MinecartTNTController.java | 5 + .../entity/nonliving/PaintingController.java | 5 + .../nonliving/ShulkerBulletController.java | 5 + .../nonliving/SmallFireballController.java | 5 + .../entity/nonliving/SnowballController.java | 5 + .../nonliving/SpectralArrowController.java | 5 + .../entity/nonliving/TNTPrimedController.java | 5 + .../nonliving/ThrownExpBottleController.java | 5 + .../nonliving/ThrownPotionController.java | 5 + .../nonliving/TippedArrowController.java | 5 + .../nonliving/WitherSkullController.java | 5 + .../v1_11_R1/util/PlayerlistTrackerEntry.java | 11 ++- .../v1_12_R1/entity/ArmorStandController.java | 5 + .../nms/v1_12_R1/entity/BatController.java | 5 + .../nms/v1_12_R1/entity/BlazeController.java | 5 + .../v1_12_R1/entity/CaveSpiderController.java | 5 + .../v1_12_R1/entity/ChickenController.java | 5 + .../nms/v1_12_R1/entity/CowController.java | 5 + .../v1_12_R1/entity/CreeperController.java | 5 + .../entity/EnderDragonController.java | 5 + .../v1_12_R1/entity/EndermanController.java | 5 + .../v1_12_R1/entity/EndermiteController.java | 5 + .../nms/v1_12_R1/entity/EntityHumanNPC.java | 7 +- .../nms/v1_12_R1/entity/EvokerController.java | 5 + .../nms/v1_12_R1/entity/GhastController.java | 5 + .../nms/v1_12_R1/entity/GiantController.java | 5 + .../v1_12_R1/entity/GuardianController.java | 5 + .../entity/GuardianElderController.java | 5 + .../nms/v1_12_R1/entity/HorseController.java | 7 +- .../entity/HorseDonkeyController.java | 7 +- .../v1_12_R1/entity/HorseMuleController.java | 7 +- .../entity/HorseSkeletonController.java | 7 +- .../entity/HorseZombieController.java | 7 +- .../v1_12_R1/entity/IllusionerController.java | 5 + .../v1_12_R1/entity/IronGolemController.java | 5 + .../nms/v1_12_R1/entity/LlamaController.java | 5 + .../v1_12_R1/entity/MagmaCubeController.java | 5 + .../entity/MushroomCowController.java | 5 + .../nms/v1_12_R1/entity/OcelotController.java | 5 + .../nms/v1_12_R1/entity/ParrotController.java | 5 + .../nms/v1_12_R1/entity/PigController.java | 5 + .../v1_12_R1/entity/PigZombieController.java | 5 + .../v1_12_R1/entity/PolarBearController.java | 5 + .../nms/v1_12_R1/entity/RabbitController.java | 5 + .../nms/v1_12_R1/entity/SheepController.java | 5 + .../v1_12_R1/entity/ShulkerController.java | 5 + .../v1_12_R1/entity/SilverfishController.java | 5 + .../v1_12_R1/entity/SkeletonController.java | 5 + .../entity/SkeletonStrayController.java | 5 + .../entity/SkeletonWitherController.java | 5 + .../nms/v1_12_R1/entity/SlimeController.java | 5 + .../v1_12_R1/entity/SnowmanController.java | 5 + .../nms/v1_12_R1/entity/SpiderController.java | 5 + .../nms/v1_12_R1/entity/SquidController.java | 5 + .../nms/v1_12_R1/entity/VexController.java | 5 + .../v1_12_R1/entity/VillagerController.java | 5 + .../v1_12_R1/entity/VindicatorController.java | 5 + .../nms/v1_12_R1/entity/WitchController.java | 5 + .../nms/v1_12_R1/entity/WitherController.java | 5 + .../nms/v1_12_R1/entity/WolfController.java | 5 + .../nms/v1_12_R1/entity/ZombieController.java | 5 + .../v1_12_R1/entity/ZombieHuskController.java | 5 + .../entity/ZombieVillagerController.java | 5 + .../nonliving/AreaEffectCloudController.java | 5 + .../entity/nonliving/BoatController.java | 5 + .../nonliving/DragonFireballController.java | 5 + .../entity/nonliving/EggController.java | 5 + .../nonliving/EnderCrystalController.java | 5 + .../nonliving/EnderPearlController.java | 5 + .../nonliving/EnderSignalController.java | 5 + .../nonliving/EvokerFangsController.java | 5 + .../nonliving/ExperienceOrbController.java | 5 + .../nonliving/FallingBlockController.java | 5 + .../entity/nonliving/FireworkController.java | 5 + .../nonliving/FishingHookController.java | 5 + .../entity/nonliving/ItemController.java | 5 + .../entity/nonliving/ItemFrameController.java | 5 + .../nonliving/LargeFireballController.java | 5 + .../entity/nonliving/LeashController.java | 5 + .../entity/nonliving/LlamaSpitController.java | 5 + .../nonliving/MinecartChestController.java | 5 + .../nonliving/MinecartCommandController.java | 5 + .../nonliving/MinecartFurnaceController.java | 5 + .../nonliving/MinecartHopperController.java | 5 + .../nonliving/MinecartRideableController.java | 5 + .../nonliving/MinecartSpawnerController.java | 5 + .../nonliving/MinecartTNTController.java | 5 + .../entity/nonliving/PaintingController.java | 5 + .../nonliving/ShulkerBulletController.java | 5 + .../nonliving/SmallFireballController.java | 5 + .../entity/nonliving/SnowballController.java | 5 + .../nonliving/SpectralArrowController.java | 5 + .../entity/nonliving/TNTPrimedController.java | 5 + .../nonliving/ThrownExpBottleController.java | 5 + .../nonliving/ThrownPotionController.java | 5 + .../nonliving/TippedArrowController.java | 5 + .../nonliving/WitherSkullController.java | 5 + .../v1_12_R1/util/PlayerlistTrackerEntry.java | 11 ++- .../nms/v1_13_R2/entity/EntityHumanNPC.java | 2 +- .../v1_13_R2/entity/ShulkerController.java | 4 +- .../v1_13_R2/util/PlayerControllerMove.java | 1 - .../v1_13_R2/util/PlayerPathfinderNormal.java | 2 +- .../v1_13_R2/util/PlayerlistTrackerEntry.java | 11 ++- .../nms/v1_14_R1/entity/EntityHumanNPC.java | 2 +- .../nms/v1_14_R1/util/NMSImpl.java | 3 +- .../nms/v1_14_R1/util/PlayerNavigation.java | 8 +- .../v1_14_R1/util/PlayerPathfinderNormal.java | 4 +- .../nms/v1_14_R1/util/PlayerlistTracker.java | 11 ++- .../nms/v1_15_R1/entity/EntityHumanNPC.java | 2 +- .../nms/v1_15_R1/util/NMSImpl.java | 3 +- .../nms/v1_15_R1/util/PlayerNavigation.java | 8 +- .../v1_15_R1/util/PlayerPathfinderNormal.java | 4 +- .../nms/v1_15_R1/util/PlayerlistTracker.java | 11 ++- .../nms/v1_16_R3/entity/EntityHumanNPC.java | 2 +- .../nms/v1_16_R3/util/NMSImpl.java | 3 +- .../nms/v1_16_R3/util/PlayerlistTracker.java | 11 ++- .../nms/v1_17_R1/util/EntityMoveControl.java | 3 +- .../nms/v1_17_R1/util/NMSImpl.java | 3 +- .../nms/v1_18_R2/util/EntityMoveControl.java | 3 +- .../nms/v1_18_R2/util/EntityNavigation.java | 5 +- .../nms/v1_18_R2/util/NMSImpl.java | 3 +- .../nms/v1_19_R3/util/EntityMoveControl.java | 3 +- .../nms/v1_19_R3/util/EntityNavigation.java | 7 +- .../v1_19_R3/util/EntityNodeEvaluator.java | 2 +- .../nms/v1_19_R3/util/NMSImpl.java | 16 +-- .../nms/v1_20_R4/util/EntityMoveControl.java | 3 +- .../nms/v1_20_R4/util/EntityNavigation.java | 31 +++--- .../v1_20_R4/util/EntityNodeEvaluator.java | 99 +++++++------------ .../util/EntityNodeEvaluatorBase.java | 4 +- .../nms/v1_20_R4/util/EntityPathfinder.java | 18 ++-- .../util/EntityPathfindingContext.java | 47 ++++----- .../nms/v1_20_R4/util/NMSImpl.java | 18 ++-- .../v1_21_R1/entity/ArmorStandController.java | 14 +-- .../v1_21_R1/entity/AxolotlController.java | 14 +-- .../nms/v1_21_R1/entity/BatController.java | 14 +-- .../nms/v1_21_R1/entity/BeeController.java | 14 +-- .../nms/v1_21_R1/entity/BlazeController.java | 14 +-- .../nms/v1_21_R1/entity/BoggedController.java | 14 +-- .../nms/v1_21_R1/entity/BreezeController.java | 14 +-- .../nms/v1_21_R1/entity/CamelController.java | 14 +-- .../nms/v1_21_R1/entity/CatController.java | 14 +-- .../v1_21_R1/entity/CaveSpiderController.java | 14 +-- .../v1_21_R1/entity/ChickenController.java | 14 +-- .../nms/v1_21_R1/entity/CodController.java | 14 +-- .../nms/v1_21_R1/entity/CowController.java | 14 +-- .../v1_21_R1/entity/CreeperController.java | 14 +-- .../v1_21_R1/entity/DolphinController.java | 14 +-- .../v1_21_R1/entity/DrownedController.java | 14 +-- .../v1_21_R1/entity/EndermanController.java | 14 +-- .../v1_21_R1/entity/EndermiteController.java | 14 +-- .../nms/v1_21_R1/entity/EvokerController.java | 14 +-- .../nms/v1_21_R1/entity/FoxController.java | 14 +-- .../nms/v1_21_R1/entity/FrogController.java | 14 +-- .../nms/v1_21_R1/entity/GhastController.java | 14 +-- .../nms/v1_21_R1/entity/GiantController.java | 14 +-- .../v1_21_R1/entity/GlowSquidController.java | 14 +-- .../nms/v1_21_R1/entity/GoatController.java | 14 +-- .../v1_21_R1/entity/GuardianController.java | 14 +-- .../entity/GuardianElderController.java | 14 +-- .../nms/v1_21_R1/entity/HoglinController.java | 14 +-- .../nms/v1_21_R1/entity/HorseController.java | 14 +-- .../entity/HorseDonkeyController.java | 14 +-- .../v1_21_R1/entity/HorseMuleController.java | 14 +-- .../entity/HorseSkeletonController.java | 14 +-- .../entity/HorseZombieController.java | 14 +-- .../v1_21_R1/entity/IllusionerController.java | 14 +-- .../v1_21_R1/entity/IronGolemController.java | 14 +-- .../nms/v1_21_R1/entity/LlamaController.java | 14 +-- .../v1_21_R1/entity/MagmaCubeController.java | 14 +-- .../entity/MushroomCowController.java | 14 +-- .../nms/v1_21_R1/entity/OcelotController.java | 14 +-- .../nms/v1_21_R1/entity/PandaController.java | 14 +-- .../nms/v1_21_R1/entity/ParrotController.java | 14 +-- .../v1_21_R1/entity/PhantomController.java | 14 +-- .../nms/v1_21_R1/entity/PigController.java | 14 +-- .../v1_21_R1/entity/PigZombieController.java | 14 +-- .../entity/PiglinBruteController.java | 14 +-- .../nms/v1_21_R1/entity/PiglinController.java | 14 +-- .../v1_21_R1/entity/PillagerController.java | 14 +-- .../v1_21_R1/entity/PolarBearController.java | 14 +-- .../v1_21_R1/entity/PufferFishController.java | 14 +-- .../nms/v1_21_R1/entity/RabbitController.java | 14 +-- .../v1_21_R1/entity/RavagerController.java | 14 +-- .../nms/v1_21_R1/entity/SalmonController.java | 14 +-- .../nms/v1_21_R1/entity/SheepController.java | 14 +-- .../v1_21_R1/entity/ShulkerController.java | 14 +-- .../v1_21_R1/entity/SilverfishController.java | 14 +-- .../v1_21_R1/entity/SkeletonController.java | 14 +-- .../entity/SkeletonStrayController.java | 14 +-- .../entity/SkeletonWitherController.java | 14 +-- .../nms/v1_21_R1/entity/SlimeController.java | 14 +-- .../v1_21_R1/entity/SnifferController.java | 14 +-- .../v1_21_R1/entity/SnowmanController.java | 14 +-- .../nms/v1_21_R1/entity/SpiderController.java | 14 +-- .../nms/v1_21_R1/entity/SquidController.java | 14 +-- .../v1_21_R1/entity/StriderController.java | 14 +-- .../v1_21_R1/entity/TadpoleController.java | 14 +-- .../entity/TraderLlamaController.java | 14 +-- .../entity/TropicalFishController.java | 14 +-- .../nms/v1_21_R1/entity/TurtleController.java | 14 +-- .../nms/v1_21_R1/entity/VexController.java | 14 +-- .../v1_21_R1/entity/VillagerController.java | 14 +-- .../v1_21_R1/entity/VindicatorController.java | 14 +-- .../entity/WanderingTraderController.java | 14 +-- .../nms/v1_21_R1/entity/WardenController.java | 14 +-- .../nms/v1_21_R1/entity/WitchController.java | 14 +-- .../nms/v1_21_R1/entity/WitherController.java | 14 +-- .../nms/v1_21_R1/entity/WolfController.java | 14 +-- .../nms/v1_21_R1/entity/ZoglinController.java | 14 +-- .../nms/v1_21_R1/entity/ZombieController.java | 14 +-- .../v1_21_R1/entity/ZombieHuskController.java | 14 +-- .../entity/ZombieVillagerController.java | 14 +-- .../nonliving/AreaEffectCloudController.java | 14 +-- .../nonliving/BlockDisplayController.java | 16 +-- .../entity/nonliving/BoatController.java | 14 +-- .../nonliving/BreezeWindChargeController.java | 14 +-- .../entity/nonliving/ChestBoatController.java | 14 +-- .../nonliving/DragonFireballController.java | 14 +-- .../entity/nonliving/EggController.java | 14 +-- .../nonliving/EnderCrystalController.java | 14 +-- .../nonliving/EnderPearlController.java | 14 +-- .../nonliving/EvokerFangsController.java | 14 +-- .../nonliving/ExperienceOrbController.java | 14 +-- .../nonliving/EyeOfEnderController.java | 14 +-- .../nonliving/FallingBlockController.java | 14 +-- .../entity/nonliving/FireworkController.java | 14 +-- .../nonliving/FishingHookController.java | 14 +-- .../nonliving/InteractionController.java | 14 +-- .../entity/nonliving/ItemController.java | 14 +-- .../nonliving/ItemDisplayController.java | 14 +-- .../nonliving/LargeFireballController.java | 14 +-- .../entity/nonliving/LeashController.java | 14 +-- .../entity/nonliving/LlamaSpitController.java | 14 +-- .../entity/nonliving/MarkerController.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 +-- .../OminousItemSpawnerController.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/TextDisplayController.java | 14 +-- .../nonliving/ThrownExpBottleController.java | 14 +-- .../nonliving/ThrownPotionController.java | 14 +-- .../nonliving/ThrownTridentController.java | 14 +-- .../nonliving/TippedArrowController.java | 14 +-- .../nonliving/WindChargeController.java | 14 +-- .../nonliving/WitherSkullController.java | 14 +-- .../nms/v1_21_R1/util/EntityMoveControl.java | 3 +- .../nms/v1_21_R1/util/EntityNavigation.java | 2 +- .../v1_21_R1/util/EntityNodeEvaluator.java | 10 +- .../nms/v1_21_R1/util/EntityPathfinder.java | 12 ++- .../nms/v1_21_R1/util/NMSImpl.java | 2 +- .../v1_8_R3/entity/ArmorStandController.java | 5 + .../nms/v1_8_R3/entity/BatController.java | 5 + .../nms/v1_8_R3/entity/BlazeController.java | 5 + .../v1_8_R3/entity/CaveSpiderController.java | 5 + .../nms/v1_8_R3/entity/ChickenController.java | 5 + .../nms/v1_8_R3/entity/CowController.java | 5 + .../nms/v1_8_R3/entity/CreeperController.java | 5 + .../v1_8_R3/entity/EnderDragonController.java | 5 + .../v1_8_R3/entity/EndermanController.java | 5 + .../v1_8_R3/entity/EndermiteController.java | 5 + .../nms/v1_8_R3/entity/EntityHumanNPC.java | 7 +- .../nms/v1_8_R3/entity/GhastController.java | 5 + .../nms/v1_8_R3/entity/GiantController.java | 5 + .../v1_8_R3/entity/GuardianController.java | 5 + .../nms/v1_8_R3/entity/HorseController.java | 6 ++ .../v1_8_R3/entity/IronGolemController.java | 5 + .../v1_8_R3/entity/MagmaCubeController.java | 5 + .../v1_8_R3/entity/MushroomCowController.java | 5 + .../nms/v1_8_R3/entity/OcelotController.java | 5 + .../nms/v1_8_R3/entity/PigController.java | 5 + .../v1_8_R3/entity/PigZombieController.java | 5 + .../nms/v1_8_R3/entity/RabbitController.java | 5 + .../nms/v1_8_R3/entity/SheepController.java | 5 + .../v1_8_R3/entity/SilverfishController.java | 5 + .../v1_8_R3/entity/SkeletonController.java | 5 + .../nms/v1_8_R3/entity/SlimeController.java | 5 + .../nms/v1_8_R3/entity/SnowmanController.java | 5 + .../nms/v1_8_R3/entity/SpiderController.java | 5 + .../nms/v1_8_R3/entity/SquidController.java | 5 + .../v1_8_R3/entity/VillagerController.java | 5 + .../nms/v1_8_R3/entity/WitchController.java | 5 + .../nms/v1_8_R3/entity/WitherController.java | 5 + .../nms/v1_8_R3/entity/WolfController.java | 5 + .../nms/v1_8_R3/entity/ZombieController.java | 5 + .../entity/nonliving/ArrowController.java | 5 + .../entity/nonliving/BoatController.java | 6 ++ .../entity/nonliving/EggController.java | 5 + .../nonliving/EnderCrystalController.java | 5 + .../nonliving/EnderPearlController.java | 5 + .../nonliving/EnderSignalController.java | 5 + .../nonliving/ExperienceOrbController.java | 5 + .../nonliving/FallingBlockController.java | 5 + .../entity/nonliving/FireworkController.java | 5 + .../nonliving/FishingHookController.java | 5 + .../entity/nonliving/ItemController.java | 5 + .../entity/nonliving/ItemFrameController.java | 5 + .../nonliving/LargeFireballController.java | 5 + .../entity/nonliving/LeashController.java | 5 + .../nonliving/MinecartChestController.java | 5 + .../nonliving/MinecartCommandController.java | 5 + .../nonliving/MinecartFurnaceController.java | 5 + .../nonliving/MinecartHopperController.java | 5 + .../nonliving/MinecartRideableController.java | 5 + .../nonliving/MinecartSpawnerController.java | 5 + .../nonliving/MinecartTNTController.java | 5 + .../entity/nonliving/PaintingController.java | 5 + .../nonliving/SmallFireballController.java | 5 + .../entity/nonliving/SnowballController.java | 5 + .../nonliving/SplashPotionController.java | 5 + .../entity/nonliving/TNTPrimedController.java | 5 + .../nonliving/ThrownExpBottleController.java | 5 + .../nonliving/WitherSkullController.java | 5 + .../v1_8_R3/util/PlayerlistTrackerEntry.java | 11 ++- 466 files changed, 2564 insertions(+), 1106 deletions(-) diff --git a/main/src/main/java/net/citizensnpcs/commands/NPCCommands.java b/main/src/main/java/net/citizensnpcs/commands/NPCCommands.java index d34cf3d7b..3d8e43603 100644 --- a/main/src/main/java/net/citizensnpcs/commands/NPCCommands.java +++ b/main/src/main/java/net/citizensnpcs/commands/NPCCommands.java @@ -505,14 +505,21 @@ public class NPCCommands { @Command( aliases = { "npc" }, - usage = "collidable", + usage = "collidable --fluids [true|false]", desc = "", modifiers = { "collidable", "pushable" }, min = 1, max = 1, permission = "citizens.npc.collidable") @Requirements(ownership = true, selected = true) - public void collidable(CommandContext args, CommandSender sender, NPC npc) throws CommandException { + public void collidable(CommandContext args, CommandSender sender, NPC npc, @Flag("fluids") Boolean fluids) + throws CommandException { + if (fluids != null) { + npc.data().setPersistent(NPC.Metadata.FLUID_PUSHABLE, fluids); + Messaging.sendTr(sender, fluids ? Messages.FLUID_PUSHABLE_SET : Messages.FLUID_PUSHABLE_UNSET, + npc.getName()); + return; + } npc.data().setPersistent(NPC.Metadata.COLLIDABLE, !npc.data().get(NPC.Metadata.COLLIDABLE, !npc.isProtected())); Messaging.sendTr(sender, npc.data(). get(NPC.Metadata.COLLIDABLE) ? Messages.COLLIDABLE_SET : Messages.COLLIDABLE_UNSET, diff --git a/main/src/main/java/net/citizensnpcs/util/Messages.java b/main/src/main/java/net/citizensnpcs/util/Messages.java index 4bb725229..d15e77dec 100644 --- a/main/src/main/java/net/citizensnpcs/util/Messages.java +++ b/main/src/main/java/net/citizensnpcs/util/Messages.java @@ -121,6 +121,8 @@ public class Messages { public static final String FAILED_TO_MOUNT_NPC = "citizens.commands.npc.mount.failed"; public static final String FAILED_TO_REMOVE = "citizens.commands.trait.failed-to-remove"; public static final String FETCHING_SKIN = "citizens.commands.npc.skin.fetching"; + public static final String FLUID_PUSHABLE_SET = "citizens.commands.npc.collidable.fluid-set"; + public static final String FLUID_PUSHABLE_UNSET = "citizens.commands.npc.collidable.fluid-unset"; public static final String FLYABLE_SET = "citizens.commands.npc.flyable.set"; public static final String FLYABLE_UNSET = "citizens.commands.npc.flyable.unset"; public static final String FOLLOW_MARGIN_SET = "citizens.commands.npc.follow.margin-set"; diff --git a/main/src/main/resources/en.json b/main/src/main/resources/en.json index b9dd69529..c4b1e3a34 100644 --- a/main/src/main/resources/en.json +++ b/main/src/main/resources/en.json @@ -99,6 +99,8 @@ "citizens.commands.npc.chunkload.unset" : "[[{0}]] will no longer force chunks to be loaded.", "citizens.commands.npc.collidable.description" : "Toggles an NPC''s collidability", "citizens.commands.npc.collidable.help" : "", + "citizens.commands.npc.collidable.fluid-set" : "[[{0}]] will now be pushable by fluids.", + "citizens.commands.npc.collidable.fluid-unset" : "[[{0}]] will no longer be pushable by fluids.", "citizens.commands.npc.collidable.set" : "[[{0}]] will now collide with entities.", "citizens.commands.npc.collidable.unset" : "[[{0}]] will no longer collide with entities.", "citizens.commands.npc.command.all-errors-cleared" : "[[{0}]] cleared all [[{1}]] errors.", diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ArmorStandController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ArmorStandController.java index 10f5e2c6c..dde3cd44c 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ArmorStandController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ArmorStandController.java @@ -76,6 +76,11 @@ public class ArmorStandController extends MobEntityController { return event.isCancelled() ? EnumInteractionResult.FAIL : EnumInteractionResult.SUCCESS; } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BatController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BatController.java index 4e081eeb4..0b0a95ec5 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BatController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BatController.java @@ -76,6 +76,11 @@ public class BatController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BlazeController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BlazeController.java index 4feb9cc01..a347edd41 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BlazeController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/BlazeController.java @@ -73,6 +73,11 @@ public class BlazeController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CaveSpiderController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CaveSpiderController.java index a6b5aa3b1..4b334fc9a 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CaveSpiderController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CaveSpiderController.java @@ -82,6 +82,11 @@ public class CaveSpiderController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ChickenController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ChickenController.java index 455009483..106a01f03 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ChickenController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ChickenController.java @@ -91,6 +91,11 @@ public class ChickenController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CowController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CowController.java index 572d4d4f3..cba456c87 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CowController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CowController.java @@ -105,6 +105,11 @@ public class CowController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CreeperController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CreeperController.java index b3c229223..f77f8dda1 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CreeperController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/CreeperController.java @@ -93,6 +93,11 @@ public class CreeperController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EnderDragonController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EnderDragonController.java index cc71127fe..76ca0095a 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EnderDragonController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EnderDragonController.java @@ -79,6 +79,11 @@ public class EnderDragonController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermanController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermanController.java index 9d2b05c0a..41dc0fd86 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermanController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermanController.java @@ -82,6 +82,11 @@ public class EndermanController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermiteController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermiteController.java index d025a8b45..dd0675e2b 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermiteController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EndermiteController.java @@ -82,6 +82,11 @@ public class EndermiteController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EntityHumanNPC.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EntityHumanNPC.java index d5b36bff9..668e17292 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EntityHumanNPC.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/EntityHumanNPC.java @@ -108,6 +108,11 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable this.bz.put(pathtype, f); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); @@ -395,7 +400,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable for (EnumItemSlot slot : EnumItemSlot.values()) { ItemStack equipment = getEquipment(slot); ItemStack cache = equipmentCache.get(slot); - if (((cache != null) || (equipment != null)) + if ((cache != null || equipment != null) && (cache == null ^ equipment == null || !ItemStack.equals(cache, equipment))) { itemChanged = true; if (cache != null) { diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GhastController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GhastController.java index 44929f364..da0d127f9 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GhastController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GhastController.java @@ -59,6 +59,11 @@ public class GhastController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GiantController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GiantController.java index c73296309..06437dbed 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GiantController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GiantController.java @@ -68,6 +68,11 @@ public class GiantController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GuardianController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GuardianController.java index 5857cc73b..a10672f88 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GuardianController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/GuardianController.java @@ -68,6 +68,11 @@ public class GuardianController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/HorseController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/HorseController.java index f39798283..085266308 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/HorseController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/HorseController.java @@ -49,8 +49,8 @@ public class HorseController extends MobEntityController { private double baseMovementSpeed; private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseNPC(World world) { this(world, null); } @@ -96,6 +96,11 @@ public class HorseController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/IronGolemController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/IronGolemController.java index 5020c88f6..0b934750f 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/IronGolemController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/IronGolemController.java @@ -68,6 +68,11 @@ public class IronGolemController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MagmaCubeController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MagmaCubeController.java index 1f45ac4dc..ecf4a8f61 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MagmaCubeController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MagmaCubeController.java @@ -74,6 +74,11 @@ public class MagmaCubeController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MushroomCowController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MushroomCowController.java index fafa71228..2ac279972 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MushroomCowController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/MushroomCowController.java @@ -87,6 +87,11 @@ public class MushroomCowController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/OcelotController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/OcelotController.java index ae14c31a9..8e9ca69ec 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/OcelotController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/OcelotController.java @@ -77,6 +77,11 @@ public class OcelotController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigController.java index 952a8ac8a..1c80c2f3a 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigController.java @@ -78,6 +78,11 @@ public class PigController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigZombieController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigZombieController.java index 9e026583a..31eacfaa0 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigZombieController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PigZombieController.java @@ -68,6 +68,11 @@ public class PigZombieController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PolarBearController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PolarBearController.java index 42b99c018..7bc91b157 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PolarBearController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/PolarBearController.java @@ -68,6 +68,11 @@ public class PolarBearController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/RabbitController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/RabbitController.java index e4dd580de..be91c5e4d 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/RabbitController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/RabbitController.java @@ -78,6 +78,11 @@ public class RabbitController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SheepController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SheepController.java index 91f8c8043..2902bbf88 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SheepController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SheepController.java @@ -77,6 +77,11 @@ public class SheepController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ShulkerController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ShulkerController.java index 34b086dc2..c4da5f551 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ShulkerController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ShulkerController.java @@ -69,6 +69,11 @@ public class ShulkerController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SilverfishController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SilverfishController.java index 84ec74041..27648916e 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SilverfishController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SilverfishController.java @@ -68,6 +68,11 @@ public class SilverfishController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SkeletonController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SkeletonController.java index f538be6a0..19e814ded 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SkeletonController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SkeletonController.java @@ -68,6 +68,11 @@ public class SkeletonController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SlimeController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SlimeController.java index 5e1b31664..a8f8f08ae 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SlimeController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SlimeController.java @@ -74,6 +74,11 @@ public class SlimeController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SnowmanController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SnowmanController.java index 596ffae54..eff55037f 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SnowmanController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SnowmanController.java @@ -68,6 +68,11 @@ public class SnowmanController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SpiderController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SpiderController.java index 3938218aa..d17e3b0f1 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SpiderController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SpiderController.java @@ -68,6 +68,11 @@ public class SpiderController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SquidController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SquidController.java index b51c442e5..e5668601c 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SquidController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/SquidController.java @@ -68,6 +68,11 @@ public class SquidController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/VillagerController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/VillagerController.java index dce2bb826..d43a6cf06 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/VillagerController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/VillagerController.java @@ -91,6 +91,11 @@ public class VillagerController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitchController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitchController.java index 620067968..2f0c70951 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitchController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitchController.java @@ -68,6 +68,11 @@ public class WitchController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitherController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitherController.java index efb7a96e3..0851f637b 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitherController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WitherController.java @@ -59,6 +59,11 @@ public class WitherController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WolfController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WolfController.java index 1d3d4a88c..bf7ca2ee4 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WolfController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/WolfController.java @@ -79,6 +79,11 @@ public class WolfController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ZombieController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ZombieController.java index 0c05431c5..9d403b823 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ZombieController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ZombieController.java @@ -68,6 +68,11 @@ public class ZombieController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bV() { return NMSImpl.getSoundEffect(npc, super.bV(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/AreaEffectCloudController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/AreaEffectCloudController.java index 1eb95408a..9e3f50f32 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/AreaEffectCloudController.java @@ -59,6 +59,11 @@ public class AreaEffectCloudController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/BoatController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/BoatController.java index 60bdc6562..e22858a56 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/BoatController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/BoatController.java @@ -60,6 +60,11 @@ public class BoatController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/DragonFireballController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/DragonFireballController.java index 2699ff828..1320413f4 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/DragonFireballController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/DragonFireballController.java @@ -60,6 +60,11 @@ public class DragonFireballController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EggController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EggController.java index f51d27749..d98a1b706 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EggController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EggController.java @@ -75,6 +75,11 @@ public class EggController extends AbstractEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EnderCrystalController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EnderCrystalController.java index 249a501f8..998ce3c00 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EnderCrystalController.java @@ -59,6 +59,11 @@ public class EnderCrystalController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EnderPearlController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EnderPearlController.java index 58a3c031e..a3ff4e5ba 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EnderPearlController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EnderPearlController.java @@ -59,6 +59,11 @@ public class EnderPearlController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EnderSignalController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EnderSignalController.java index fe721f5a3..c0b381d88 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EnderSignalController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/EnderSignalController.java @@ -59,6 +59,11 @@ public class EnderSignalController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ExperienceOrbController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ExperienceOrbController.java index f8b9ff3e0..d3871ee92 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ExperienceOrbController.java @@ -45,6 +45,11 @@ public class ExperienceOrbController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/FallingBlockController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/FallingBlockController.java index 7aad0b3b4..50860189d 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/FallingBlockController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/FallingBlockController.java @@ -67,6 +67,11 @@ public class FallingBlockController extends AbstractEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/FireworkController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/FireworkController.java index e2e42447f..b220761c9 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/FireworkController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/FireworkController.java @@ -45,6 +45,11 @@ public class FireworkController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/FishingHookController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/FishingHookController.java index 965ac0b85..d1aa47040 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/FishingHookController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/FishingHookController.java @@ -45,6 +45,11 @@ public class FishingHookController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ItemController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ItemController.java index 90a8b8eae..5d0bcc83d 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ItemController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ItemController.java @@ -58,6 +58,11 @@ public class ItemController extends AbstractEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ItemFrameController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ItemFrameController.java index 4dc963184..55db8089b 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ItemFrameController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ItemFrameController.java @@ -58,6 +58,11 @@ public class ItemFrameController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/LargeFireballController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/LargeFireballController.java index 8f7029c11..45d244343 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/LargeFireballController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/LargeFireballController.java @@ -46,6 +46,11 @@ public class LargeFireballController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/LeashController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/LeashController.java index 9683d22ea..1e18d4783 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/LeashController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/LeashController.java @@ -45,6 +45,11 @@ public class LeashController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartChestController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartChestController.java index 414a9d9c6..d83e4268d 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartChestController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartChestController.java @@ -46,6 +46,11 @@ public class MinecartChestController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartCommandController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartCommandController.java index 14b8a5205..bce54a84c 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartCommandController.java @@ -46,6 +46,11 @@ public class MinecartCommandController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartFurnaceController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartFurnaceController.java index 8cab7a1d8..6b2f611c6 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartFurnaceController.java @@ -46,6 +46,11 @@ public class MinecartFurnaceController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartHopperController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartHopperController.java index 348d838ef..6ad48b6f4 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartHopperController.java @@ -42,6 +42,11 @@ public class MinecartHopperController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartRideableController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartRideableController.java index 8a3b0e494..2a6f1ede6 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartRideableController.java @@ -46,6 +46,11 @@ public class MinecartRideableController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartSpawnerController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartSpawnerController.java index 741b6916c..b3c7270d8 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartSpawnerController.java @@ -42,6 +42,11 @@ public class MinecartSpawnerController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartTNTController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartTNTController.java index 2c214d3e5..8551faca7 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/MinecartTNTController.java @@ -42,6 +42,11 @@ public class MinecartTNTController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/PaintingController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/PaintingController.java index ab1900e76..e11a5e3e6 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/PaintingController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/PaintingController.java @@ -45,6 +45,11 @@ public class PaintingController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ShulkerBulletController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ShulkerBulletController.java index 03393ea22..8aecd1c7d 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ShulkerBulletController.java @@ -45,6 +45,11 @@ public class ShulkerBulletController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/SmallFireballController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/SmallFireballController.java index 1bde2cd5a..406642574 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/SmallFireballController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/SmallFireballController.java @@ -45,6 +45,11 @@ public class SmallFireballController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/SnowballController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/SnowballController.java index 954e4f8b9..63671a366 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/SnowballController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/SnowballController.java @@ -45,6 +45,11 @@ public class SnowballController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/SpectralArrowController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/SpectralArrowController.java index 3aa70bb5f..1e9d538aa 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/SpectralArrowController.java @@ -45,6 +45,11 @@ public class SpectralArrowController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/TNTPrimedController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/TNTPrimedController.java index 9f5398f2e..908c49f54 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/TNTPrimedController.java @@ -45,6 +45,11 @@ public class TNTPrimedController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ThrownExpBottleController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ThrownExpBottleController.java index 262a2f7b3..38d75df1b 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ThrownExpBottleController.java @@ -45,6 +45,11 @@ public class ThrownExpBottleController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ThrownPotionController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ThrownPotionController.java index 4941ea95f..e07dd3934 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/ThrownPotionController.java @@ -46,6 +46,11 @@ public class ThrownPotionController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/TippedArrowController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/TippedArrowController.java index 85c30034e..eba6daecc 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/TippedArrowController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/TippedArrowController.java @@ -45,6 +45,11 @@ public class TippedArrowController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/WitherSkullController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/WitherSkullController.java index 3922f27ab..e2ea01a17 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/WitherSkullController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/nonliving/WitherSkullController.java @@ -45,6 +45,11 @@ public class WitherSkullController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_10_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util/PlayerlistTrackerEntry.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util/PlayerlistTrackerEntry.java index 88b219948..53adcefb2 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util/PlayerlistTrackerEntry.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util/PlayerlistTrackerEntry.java @@ -2,9 +2,11 @@ package net.citizensnpcs.nms.v1_10_R1.util; import java.lang.reflect.Field; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; @@ -99,7 +101,7 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { } public static Set getSeenBy(EntityTrackerEntry tracker) { - return tracker.trackedPlayers.stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); + return tracker.trackedPlayers.stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); } private static Entity getTracker(EntityTrackerEntry entry) { diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ArmorStandController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ArmorStandController.java index 891c9359f..8969b337d 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ArmorStandController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ArmorStandController.java @@ -82,6 +82,11 @@ public class ArmorStandController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BatController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BatController.java index db3b9fd11..8757922e5 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BatController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BatController.java @@ -76,6 +76,11 @@ public class BatController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BlazeController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BlazeController.java index 254d2a5e1..85bfa1001 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BlazeController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/BlazeController.java @@ -73,6 +73,11 @@ public class BlazeController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CaveSpiderController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CaveSpiderController.java index f05fd7d86..e55e348eb 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CaveSpiderController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CaveSpiderController.java @@ -82,6 +82,11 @@ public class CaveSpiderController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ChickenController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ChickenController.java index c9f0979c7..32df2824d 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ChickenController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ChickenController.java @@ -91,6 +91,11 @@ public class ChickenController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CowController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CowController.java index 77756eb9d..97160f177 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CowController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CowController.java @@ -105,6 +105,11 @@ public class CowController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CreeperController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CreeperController.java index 7befab05c..651968dce 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CreeperController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/CreeperController.java @@ -85,6 +85,11 @@ public class CreeperController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EnderDragonController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EnderDragonController.java index bc4e166f3..9caa611c9 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EnderDragonController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EnderDragonController.java @@ -80,6 +80,11 @@ public class EnderDragonController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermanController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermanController.java index 197abcd34..0b9df5aa5 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermanController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermanController.java @@ -82,6 +82,11 @@ public class EndermanController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermiteController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermiteController.java index dbdce4fb3..8955f76d0 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermiteController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EndermiteController.java @@ -82,6 +82,11 @@ public class EndermiteController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EntityHumanNPC.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EntityHumanNPC.java index a94db2ebd..eca77574f 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EntityHumanNPC.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EntityHumanNPC.java @@ -123,6 +123,11 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable npc.update(); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); @@ -413,7 +418,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable for (EnumItemSlot slot : EnumItemSlot.values()) { ItemStack equipment = getEquipment(slot); ItemStack cache = equipmentCache.get(slot); - if (((cache != null) || (equipment != null)) + if ((cache != null || equipment != null) && (cache == null ^ equipment == null || !ItemStack.equals(cache, equipment))) { itemChanged = true; if (cache != null && !cache.isEmpty()) { diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EvokerController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EvokerController.java index a7f1c9909..1d0263aaa 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EvokerController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/EvokerController.java @@ -68,6 +68,11 @@ public class EvokerController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GhastController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GhastController.java index 8f22c4208..dbdeab48a 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GhastController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GhastController.java @@ -59,6 +59,11 @@ public class GhastController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GiantController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GiantController.java index 1b350b87a..b2f019458 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GiantController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GiantController.java @@ -68,6 +68,11 @@ public class GiantController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianController.java index 5fd8c3b74..caaf829ea 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianController.java @@ -68,6 +68,11 @@ public class GuardianController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianElderController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianElderController.java index 0eb6d1ccc..b24b35f76 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianElderController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/GuardianElderController.java @@ -68,6 +68,11 @@ public class GuardianElderController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseController.java index f0c02d44f..c959394bd 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseController.java @@ -47,8 +47,8 @@ public class HorseController extends MobEntityController { private double baseMovementSpeed; private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseNPC(World world) { this(world, null); } @@ -94,6 +94,11 @@ public class HorseController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseDonkeyController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseDonkeyController.java index 5e3da4e2d..5b6935af7 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseDonkeyController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseDonkeyController.java @@ -48,8 +48,8 @@ public class HorseDonkeyController extends MobEntityController { private double baseMovementSpeed; private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseDonkeyNPC(World world) { this(world, null); } @@ -96,6 +96,11 @@ public class HorseDonkeyController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseMuleController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseMuleController.java index 64ff61f4b..48df93811 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseMuleController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseMuleController.java @@ -48,8 +48,8 @@ public class HorseMuleController extends MobEntityController { private double baseMovementSpeed; private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseMuleNPC(World world) { this(world, null); } @@ -96,6 +96,11 @@ public class HorseMuleController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseSkeletonController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseSkeletonController.java index f3511b37d..3954065b7 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseSkeletonController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseSkeletonController.java @@ -48,8 +48,8 @@ public class HorseSkeletonController extends MobEntityController { private double baseMovementSpeed; private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseSkeletonNPC(World world) { this(world, null); } @@ -96,6 +96,11 @@ public class HorseSkeletonController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseZombieController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseZombieController.java index a91de8e32..28c898864 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseZombieController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/HorseZombieController.java @@ -48,8 +48,8 @@ public class HorseZombieController extends MobEntityController { private double baseMovementSpeed; private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseZombieNPC(World world) { this(world, null); } @@ -96,6 +96,11 @@ public class HorseZombieController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/IronGolemController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/IronGolemController.java index a7394cdb2..6ea073037 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/IronGolemController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/IronGolemController.java @@ -68,6 +68,11 @@ public class IronGolemController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/LlamaController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/LlamaController.java index 8e4fc7451..8a949eeff 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/LlamaController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/LlamaController.java @@ -88,6 +88,11 @@ public class LlamaController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MagmaCubeController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MagmaCubeController.java index d4c83b1a1..3b280b5f1 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MagmaCubeController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MagmaCubeController.java @@ -82,6 +82,11 @@ public class MagmaCubeController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MushroomCowController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MushroomCowController.java index 1cf8fb1cb..a8a2f0c0d 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MushroomCowController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/MushroomCowController.java @@ -86,6 +86,11 @@ public class MushroomCowController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/OcelotController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/OcelotController.java index 2a447fd99..f55943c04 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/OcelotController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/OcelotController.java @@ -77,6 +77,11 @@ public class OcelotController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigController.java index 71cba4d9b..e0d7baab5 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigController.java @@ -78,6 +78,11 @@ public class PigController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigZombieController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigZombieController.java index 646e95ac4..94e016a4e 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigZombieController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PigZombieController.java @@ -68,6 +68,11 @@ public class PigZombieController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PolarBearController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PolarBearController.java index e27f6b3b3..81a7a3f6b 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PolarBearController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/PolarBearController.java @@ -68,6 +68,11 @@ public class PolarBearController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/RabbitController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/RabbitController.java index 7df8c909e..8630b4b14 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/RabbitController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/RabbitController.java @@ -78,6 +78,11 @@ public class RabbitController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SheepController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SheepController.java index 608783d16..c998b3787 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SheepController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SheepController.java @@ -77,6 +77,11 @@ public class SheepController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ShulkerController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ShulkerController.java index effed1830..bf7da199b 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ShulkerController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ShulkerController.java @@ -77,6 +77,11 @@ public class ShulkerController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SilverfishController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SilverfishController.java index 9e82978a6..cd2d87de5 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SilverfishController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SilverfishController.java @@ -68,6 +68,11 @@ public class SilverfishController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonController.java index 625669df8..f060004f9 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonController.java @@ -68,6 +68,11 @@ public class SkeletonController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonStrayController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonStrayController.java index 5fcdd4ad5..059eb90fb 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonStrayController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonStrayController.java @@ -68,6 +68,11 @@ public class SkeletonStrayController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonWitherController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonWitherController.java index 690dfca55..361c264e1 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonWitherController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SkeletonWitherController.java @@ -68,6 +68,11 @@ public class SkeletonWitherController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SlimeController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SlimeController.java index df7d5fbae..86143dedc 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SlimeController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SlimeController.java @@ -82,6 +82,11 @@ public class SlimeController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SnowmanController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SnowmanController.java index dec39bd97..eef393dea 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SnowmanController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SnowmanController.java @@ -68,6 +68,11 @@ public class SnowmanController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SpiderController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SpiderController.java index 42c616a8e..a3b6e6f33 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SpiderController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SpiderController.java @@ -68,6 +68,11 @@ public class SpiderController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SquidController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SquidController.java index 1003b8e53..9c0fdd19e 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SquidController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/SquidController.java @@ -68,6 +68,11 @@ public class SquidController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VexController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VexController.java index 32902263a..a74ed1c5f 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VexController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VexController.java @@ -62,6 +62,11 @@ public class VexController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VillagerController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VillagerController.java index 46d0c8b35..00c40c624 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VillagerController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VillagerController.java @@ -97,6 +97,11 @@ public class VillagerController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VindicatorController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VindicatorController.java index b09a152c2..de247274c 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VindicatorController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/VindicatorController.java @@ -77,6 +77,11 @@ public class VindicatorController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitchController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitchController.java index 344ecf792..15b24afcf 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitchController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitchController.java @@ -68,6 +68,11 @@ public class WitchController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitherController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitherController.java index 3097a6952..b8202e93e 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitherController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WitherController.java @@ -59,6 +59,11 @@ public class WitherController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WolfController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WolfController.java index 948d5e61e..42ee7884b 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WolfController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/WolfController.java @@ -79,6 +79,11 @@ public class WolfController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieController.java index eaaa9b01c..fae6f3fb4 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieController.java @@ -68,6 +68,11 @@ public class ZombieController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieHuskController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieHuskController.java index 59772c555..ce8955ad2 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieHuskController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieHuskController.java @@ -68,6 +68,11 @@ public class ZombieHuskController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override protected SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieVillagerController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieVillagerController.java index 1b32deea8..64ed90ce2 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieVillagerController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ZombieVillagerController.java @@ -68,6 +68,11 @@ public class ZombieVillagerController extends MobEntityController { return NMS.getFallDistance(npc, super.aY()); } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public SoundEffect bW() { return NMSImpl.getSoundEffect(npc, super.bW(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/AreaEffectCloudController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/AreaEffectCloudController.java index 7b1838d9a..dbe351556 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/AreaEffectCloudController.java @@ -68,6 +68,11 @@ public class AreaEffectCloudController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/BoatController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/BoatController.java index da0d445f7..f67914129 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/BoatController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/BoatController.java @@ -69,6 +69,11 @@ public class BoatController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/DragonFireballController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/DragonFireballController.java index 79eda0012..758146598 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/DragonFireballController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/DragonFireballController.java @@ -72,6 +72,11 @@ public class DragonFireballController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EggController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EggController.java index 697645ed5..f2cea4ec8 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EggController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EggController.java @@ -87,6 +87,11 @@ public class EggController extends AbstractEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EnderCrystalController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EnderCrystalController.java index 37d5e4bb9..8277c57dc 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EnderCrystalController.java @@ -68,6 +68,11 @@ public class EnderCrystalController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EnderPearlController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EnderPearlController.java index fd28b49e3..6847a21fd 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EnderPearlController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EnderPearlController.java @@ -71,6 +71,11 @@ public class EnderPearlController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EnderSignalController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EnderSignalController.java index cd9bff49b..ad59f3890 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EnderSignalController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EnderSignalController.java @@ -68,6 +68,11 @@ public class EnderSignalController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EvokerFangsController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EvokerFangsController.java index 902b40521..9b21df2e4 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EvokerFangsController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/EvokerFangsController.java @@ -69,6 +69,11 @@ public class EvokerFangsController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ExperienceOrbController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ExperienceOrbController.java index aa8840f7b..90f0d0b53 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ExperienceOrbController.java @@ -54,6 +54,11 @@ public class ExperienceOrbController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/FallingBlockController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/FallingBlockController.java index d8692b865..0540f93a1 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/FallingBlockController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/FallingBlockController.java @@ -83,6 +83,11 @@ public class FallingBlockController extends AbstractEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/FireworkController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/FireworkController.java index 178fecffe..383bea841 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/FireworkController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/FireworkController.java @@ -54,6 +54,11 @@ public class FireworkController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/FishingHookController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/FishingHookController.java index 2dc4b0f00..f600e4db1 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/FishingHookController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/FishingHookController.java @@ -54,6 +54,11 @@ public class FishingHookController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ItemController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ItemController.java index 2af553193..2c2f3e306 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ItemController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ItemController.java @@ -67,6 +67,11 @@ public class ItemController extends AbstractEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ItemFrameController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ItemFrameController.java index 35a77364f..ca292a3d7 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ItemFrameController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ItemFrameController.java @@ -67,6 +67,11 @@ public class ItemFrameController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/LargeFireballController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/LargeFireballController.java index 5aea7e6e7..ae681eeaa 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/LargeFireballController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/LargeFireballController.java @@ -58,6 +58,11 @@ public class LargeFireballController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/LeashController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/LeashController.java index 57e197427..29eb2aa51 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/LeashController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/LeashController.java @@ -54,6 +54,11 @@ public class LeashController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/LlamaSpitController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/LlamaSpitController.java index e4bd3ff28..fa7d65668 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/LlamaSpitController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/LlamaSpitController.java @@ -75,6 +75,11 @@ public class LlamaSpitController extends AbstractEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartChestController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartChestController.java index e974a5d08..6cac0f071 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartChestController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartChestController.java @@ -55,6 +55,11 @@ public class MinecartChestController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartCommandController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartCommandController.java index cd647c259..ab8783c12 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartCommandController.java @@ -55,6 +55,11 @@ public class MinecartCommandController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartFurnaceController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartFurnaceController.java index b3a9a510c..51e6e522b 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartFurnaceController.java @@ -55,6 +55,11 @@ public class MinecartFurnaceController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartHopperController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartHopperController.java index fa20e3910..74ed3744d 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartHopperController.java @@ -51,6 +51,11 @@ public class MinecartHopperController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartRideableController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartRideableController.java index e20d902ab..c77125e7c 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartRideableController.java @@ -55,6 +55,11 @@ public class MinecartRideableController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartSpawnerController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartSpawnerController.java index 9c30ee637..921eacc69 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartSpawnerController.java @@ -51,6 +51,11 @@ public class MinecartSpawnerController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartTNTController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartTNTController.java index 7a893253e..ebc80723a 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/MinecartTNTController.java @@ -51,6 +51,11 @@ public class MinecartTNTController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/PaintingController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/PaintingController.java index b1415aaca..f6278d77e 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/PaintingController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/PaintingController.java @@ -54,6 +54,11 @@ public class PaintingController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ShulkerBulletController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ShulkerBulletController.java index 4e4a150e9..de390de93 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ShulkerBulletController.java @@ -54,6 +54,11 @@ public class ShulkerBulletController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/SmallFireballController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/SmallFireballController.java index d5fb82a31..b2a2c5281 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/SmallFireballController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/SmallFireballController.java @@ -57,6 +57,11 @@ public class SmallFireballController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/SnowballController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/SnowballController.java index e161521d4..cf1de4def 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/SnowballController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/SnowballController.java @@ -54,6 +54,11 @@ public class SnowballController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/SpectralArrowController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/SpectralArrowController.java index 7ab82ddd1..c614f2835 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/SpectralArrowController.java @@ -54,6 +54,11 @@ public class SpectralArrowController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/TNTPrimedController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/TNTPrimedController.java index ca36f6622..b07087470 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/TNTPrimedController.java @@ -54,6 +54,11 @@ public class TNTPrimedController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ThrownExpBottleController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ThrownExpBottleController.java index 038a8259b..8013fd8db 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ThrownExpBottleController.java @@ -57,6 +57,11 @@ public class ThrownExpBottleController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ThrownPotionController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ThrownPotionController.java index 7652101a7..0cc420e94 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/ThrownPotionController.java @@ -55,6 +55,11 @@ public class ThrownPotionController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/TippedArrowController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/TippedArrowController.java index baa2d4472..f5182f737 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/TippedArrowController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/TippedArrowController.java @@ -54,6 +54,11 @@ public class TippedArrowController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/WitherSkullController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/WitherSkullController.java index 50943776c..eee15be60 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/WitherSkullController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/nonliving/WitherSkullController.java @@ -54,6 +54,11 @@ public class WitherSkullController extends MobEntityController { } } + @Override + public boolean bg() { + return npc == null ? super.bg() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_11_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/PlayerlistTrackerEntry.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/PlayerlistTrackerEntry.java index 7dd6cc567..516350139 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/PlayerlistTrackerEntry.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/PlayerlistTrackerEntry.java @@ -4,9 +4,11 @@ import java.lang.invoke.MethodHandle; import java.lang.reflect.Field; import java.util.Map; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer; import com.google.common.collect.ForwardingMap; import com.google.common.collect.ForwardingSet; @@ -50,7 +52,7 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { @Override public Boolean remove(Object conn) { Boolean removed = super.remove(conn); - if (removed == true) { + if (removed) { Bukkit.getPluginManager().callEvent(new NPCUnlinkFromPlayerEvent( ((NPCHolder) tracker).getNPC(), ((EntityPlayer) conn).getBukkitEntity())); } @@ -168,10 +170,9 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } else { - return tracker.trackedPlayers.stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } + return delegate.keySet().stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); + } else + return tracker.trackedPlayers.stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); } private static Entity getTracker(EntityTrackerEntry entry) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ArmorStandController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ArmorStandController.java index 24ad3426e..0c29cf600 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ArmorStandController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ArmorStandController.java @@ -83,6 +83,11 @@ public class ArmorStandController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BatController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BatController.java index 9d1d02f51..30eb8962f 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BatController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BatController.java @@ -78,6 +78,11 @@ public class BatController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BlazeController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BlazeController.java index d867af809..807b24082 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BlazeController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BlazeController.java @@ -75,6 +75,11 @@ public class BlazeController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CaveSpiderController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CaveSpiderController.java index 5ca534cd9..44563b3f9 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CaveSpiderController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CaveSpiderController.java @@ -93,6 +93,11 @@ public class CaveSpiderController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ChickenController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ChickenController.java index 418a694e0..b401714e2 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ChickenController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ChickenController.java @@ -102,6 +102,11 @@ public class ChickenController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CowController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CowController.java index b77b1645a..97762d4b7 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CowController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CowController.java @@ -116,6 +116,11 @@ public class CowController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CreeperController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CreeperController.java index 2d54b0737..67bb3204c 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CreeperController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CreeperController.java @@ -96,6 +96,11 @@ public class CreeperController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java index 357f140e1..31a912bee 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java @@ -81,6 +81,11 @@ public class EnderDragonController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermanController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermanController.java index 61437135f..20d88f2b3 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermanController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermanController.java @@ -93,6 +93,11 @@ public class EndermanController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermiteController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermiteController.java index 4b7a44eb9..a24be6a86 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermiteController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermiteController.java @@ -93,6 +93,11 @@ public class EndermiteController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EntityHumanNPC.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EntityHumanNPC.java index 9a3e343cf..a98dddd69 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EntityHumanNPC.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EntityHumanNPC.java @@ -135,6 +135,11 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable npc.update(); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); @@ -424,7 +429,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable for (EnumItemSlot slot : EnumItemSlot.values()) { ItemStack equipment = getEquipment(slot); ItemStack cache = equipmentCache.get(slot); - if (((cache != null) || (equipment != null)) + if ((cache != null || equipment != null) && (cache == null ^ equipment == null || !ItemStack.equals(cache, equipment))) { itemChanged = true; if (cache != null && !cache.isEmpty()) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EvokerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EvokerController.java index 66f00a024..0fb13526f 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EvokerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EvokerController.java @@ -79,6 +79,11 @@ public class EvokerController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GhastController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GhastController.java index 4f6e355a8..62d5e88d6 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GhastController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GhastController.java @@ -61,6 +61,11 @@ public class GhastController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public boolean cC() { return npc != null; diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GiantController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GiantController.java index 5ac9ee55e..b67e37ac0 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GiantController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GiantController.java @@ -79,6 +79,11 @@ public class GiantController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianController.java index 8af08eee6..cd5888d8a 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianController.java @@ -79,6 +79,11 @@ public class GuardianController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianElderController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianElderController.java index 228eb9f72..f3d6fa3bd 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianElderController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianElderController.java @@ -79,6 +79,11 @@ public class GuardianElderController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseController.java index cf72bc442..b7663e794 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseController.java @@ -49,8 +49,8 @@ public class HorseController extends MobEntityController { private double baseMovementSpeed; private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseNPC(World world) { this(world, null); } @@ -105,6 +105,11 @@ public class HorseController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseDonkeyController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseDonkeyController.java index 115647b68..17bf2f729 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseDonkeyController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseDonkeyController.java @@ -49,8 +49,8 @@ public class HorseDonkeyController extends MobEntityController { private double baseMovementSpeed; private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseDonkeyNPC(World world) { this(world, null); } @@ -105,6 +105,11 @@ public class HorseDonkeyController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseMuleController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseMuleController.java index ec525b57c..07997b777 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseMuleController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseMuleController.java @@ -49,8 +49,8 @@ public class HorseMuleController extends MobEntityController { private double baseMovementSpeed; private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseMuleNPC(World world) { this(world, null); } @@ -105,6 +105,11 @@ public class HorseMuleController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseSkeletonController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseSkeletonController.java index c5a76d18b..f994fca85 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseSkeletonController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseSkeletonController.java @@ -49,8 +49,8 @@ public class HorseSkeletonController extends MobEntityController { private double baseMovementSpeed; private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseSkeletonNPC(World world) { this(world, null); } @@ -106,6 +106,11 @@ public class HorseSkeletonController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseZombieController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseZombieController.java index d9509182b..fcb41081c 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseZombieController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseZombieController.java @@ -49,8 +49,8 @@ public class HorseZombieController extends MobEntityController { private double baseMovementSpeed; private final CitizensNPC npc; - private boolean riding; + private boolean riding; public EntityHorseZombieNPC(World world) { this(world, null); } @@ -106,6 +106,11 @@ public class HorseZombieController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IllusionerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IllusionerController.java index 3f95ee6dc..2abf3ffa0 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IllusionerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IllusionerController.java @@ -79,6 +79,11 @@ public class IllusionerController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IronGolemController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IronGolemController.java index e06550047..fbf9c3b19 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IronGolemController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IronGolemController.java @@ -79,6 +79,11 @@ public class IronGolemController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/LlamaController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/LlamaController.java index 95cd15337..be240218d 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/LlamaController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/LlamaController.java @@ -106,6 +106,11 @@ public class LlamaController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MagmaCubeController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MagmaCubeController.java index 282cef22b..4f939f481 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MagmaCubeController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MagmaCubeController.java @@ -93,6 +93,11 @@ public class MagmaCubeController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MushroomCowController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MushroomCowController.java index 17bf1f384..bd6c2f5a1 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MushroomCowController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MushroomCowController.java @@ -97,6 +97,11 @@ public class MushroomCowController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java index 5fb6e3606..8a92bf794 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java @@ -88,6 +88,11 @@ public class OcelotController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ParrotController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ParrotController.java index 7c4ebfccc..2a01db998 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ParrotController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ParrotController.java @@ -71,6 +71,11 @@ public class ParrotController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigController.java index 5b8f721dc..9cff1c369 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigController.java @@ -89,6 +89,11 @@ public class PigController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigZombieController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigZombieController.java index 8c8dcc6eb..1c6cfbc70 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigZombieController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigZombieController.java @@ -79,6 +79,11 @@ public class PigZombieController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PolarBearController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PolarBearController.java index 58f7e221d..9b7b8b74e 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PolarBearController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PolarBearController.java @@ -70,6 +70,11 @@ public class PolarBearController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/RabbitController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/RabbitController.java index 8eae5cf31..252d4c9a6 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/RabbitController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/RabbitController.java @@ -89,6 +89,11 @@ public class RabbitController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SheepController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SheepController.java index 9465217a1..59596c0c5 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SheepController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SheepController.java @@ -88,6 +88,11 @@ public class SheepController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ShulkerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ShulkerController.java index d8908e712..da640c1f2 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ShulkerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ShulkerController.java @@ -88,6 +88,11 @@ public class ShulkerController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SilverfishController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SilverfishController.java index 99fcb0d8c..3784bac99 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SilverfishController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SilverfishController.java @@ -79,6 +79,11 @@ public class SilverfishController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonController.java index e7342d92f..1b49aa4d5 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonController.java @@ -79,6 +79,11 @@ public class SkeletonController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonStrayController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonStrayController.java index 6d42ed0da..a2ddec385 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonStrayController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonStrayController.java @@ -79,6 +79,11 @@ public class SkeletonStrayController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonWitherController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonWitherController.java index e25a9611c..4075429e0 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonWitherController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SkeletonWitherController.java @@ -79,6 +79,11 @@ public class SkeletonWitherController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SlimeController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SlimeController.java index d786ba6a4..2408c2f30 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SlimeController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SlimeController.java @@ -93,6 +93,11 @@ public class SlimeController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SnowmanController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SnowmanController.java index 14ff9ce21..59c8010b2 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SnowmanController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SnowmanController.java @@ -79,6 +79,11 @@ public class SnowmanController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SpiderController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SpiderController.java index b4ad056dd..4b80a850a 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SpiderController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SpiderController.java @@ -79,6 +79,11 @@ public class SpiderController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SquidController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SquidController.java index 657fef702..4e457ec50 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SquidController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/SquidController.java @@ -79,6 +79,11 @@ public class SquidController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VexController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VexController.java index 6a19fac9c..17c0e79c2 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VexController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VexController.java @@ -64,6 +64,11 @@ public class VexController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VillagerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VillagerController.java index 02cbb487e..f3fc6585a 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VillagerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VillagerController.java @@ -108,6 +108,11 @@ public class VillagerController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VindicatorController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VindicatorController.java index 8a986746a..7e760b4a6 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VindicatorController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/VindicatorController.java @@ -88,6 +88,11 @@ public class VindicatorController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitchController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitchController.java index 4a1e383a5..86eca8f31 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitchController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitchController.java @@ -79,6 +79,11 @@ public class WitchController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitherController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitherController.java index 55e5a73df..96ec395a9 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitherController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WitherController.java @@ -61,6 +61,11 @@ public class WitherController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WolfController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WolfController.java index 8aaefc43a..264b7f702 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WolfController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/WolfController.java @@ -90,6 +90,11 @@ public class WolfController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieController.java index c3371c171..19dd2212b 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieController.java @@ -79,6 +79,11 @@ public class ZombieController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieHuskController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieHuskController.java index 54aeb88ca..fd33f2df0 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieHuskController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieHuskController.java @@ -79,6 +79,11 @@ public class ZombieHuskController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override protected SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieVillagerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieVillagerController.java index ab75feaf8..9f48f89a6 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieVillagerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ZombieVillagerController.java @@ -79,6 +79,11 @@ public class ZombieVillagerController extends MobEntityController { return NMS.getFallDistance(npc, super.bg()); } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public SoundEffect cf() { return NMSImpl.getSoundEffect(npc, super.cf(), NPC.Metadata.DEATH_SOUND); diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/AreaEffectCloudController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/AreaEffectCloudController.java index 86138623b..7da2fa951 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/AreaEffectCloudController.java @@ -69,6 +69,11 @@ public class AreaEffectCloudController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/BoatController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/BoatController.java index 026d63090..9c412d48e 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/BoatController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/BoatController.java @@ -70,6 +70,11 @@ public class BoatController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/DragonFireballController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/DragonFireballController.java index c2ec529cd..122828cca 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/DragonFireballController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/DragonFireballController.java @@ -73,6 +73,11 @@ public class DragonFireballController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EggController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EggController.java index 465bd5116..49b7e4f6f 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EggController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EggController.java @@ -88,6 +88,11 @@ public class EggController extends AbstractEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderCrystalController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderCrystalController.java index 8b565cfc2..82b766173 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderCrystalController.java @@ -69,6 +69,11 @@ public class EnderCrystalController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderPearlController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderPearlController.java index 434401b75..cb358e278 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderPearlController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderPearlController.java @@ -72,6 +72,11 @@ public class EnderPearlController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderSignalController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderSignalController.java index ff8a0587a..842ad92ed 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderSignalController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderSignalController.java @@ -69,6 +69,11 @@ public class EnderSignalController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EvokerFangsController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EvokerFangsController.java index f84a77664..384aabef2 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EvokerFangsController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EvokerFangsController.java @@ -70,6 +70,11 @@ public class EvokerFangsController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ExperienceOrbController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ExperienceOrbController.java index 32ff9c159..584042546 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ExperienceOrbController.java @@ -55,6 +55,11 @@ public class ExperienceOrbController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FallingBlockController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FallingBlockController.java index d8815820e..7e5bcc2af 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FallingBlockController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FallingBlockController.java @@ -84,6 +84,11 @@ public class FallingBlockController extends AbstractEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FireworkController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FireworkController.java index 3ddd71236..f5cab425a 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FireworkController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FireworkController.java @@ -55,6 +55,11 @@ public class FireworkController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FishingHookController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FishingHookController.java index d9101be6f..d3f4db687 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FishingHookController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FishingHookController.java @@ -55,6 +55,11 @@ public class FishingHookController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemController.java index cdf69497a..cc7e6975e 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemController.java @@ -68,6 +68,11 @@ public class ItemController extends AbstractEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemFrameController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemFrameController.java index 32f3c8634..098e3ae3b 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemFrameController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemFrameController.java @@ -68,6 +68,11 @@ public class ItemFrameController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LargeFireballController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LargeFireballController.java index a10540344..b56f2e416 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LargeFireballController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LargeFireballController.java @@ -59,6 +59,11 @@ public class LargeFireballController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LeashController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LeashController.java index dfac5f3cc..68927789e 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LeashController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LeashController.java @@ -55,6 +55,11 @@ public class LeashController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LlamaSpitController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LlamaSpitController.java index e6547ecc2..8e4cad619 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LlamaSpitController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LlamaSpitController.java @@ -76,6 +76,11 @@ public class LlamaSpitController extends AbstractEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartChestController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartChestController.java index 28285fa16..126ec0364 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartChestController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartChestController.java @@ -56,6 +56,11 @@ public class MinecartChestController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartCommandController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartCommandController.java index de5a99306..68786a873 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartCommandController.java @@ -56,6 +56,11 @@ public class MinecartCommandController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartFurnaceController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartFurnaceController.java index e7a7569d7..54f141602 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartFurnaceController.java @@ -56,6 +56,11 @@ public class MinecartFurnaceController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartHopperController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartHopperController.java index 71db073a7..448747b03 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartHopperController.java @@ -52,6 +52,11 @@ public class MinecartHopperController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartRideableController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartRideableController.java index 191202dd9..7cae806a8 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartRideableController.java @@ -56,6 +56,11 @@ public class MinecartRideableController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartSpawnerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartSpawnerController.java index 83e99c911..27b2c7550 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartSpawnerController.java @@ -52,6 +52,11 @@ public class MinecartSpawnerController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartTNTController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartTNTController.java index c4e857ef2..17cc9bc2b 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartTNTController.java @@ -52,6 +52,11 @@ public class MinecartTNTController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/PaintingController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/PaintingController.java index adf849104..9df028b87 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/PaintingController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/PaintingController.java @@ -55,6 +55,11 @@ public class PaintingController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ShulkerBulletController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ShulkerBulletController.java index d672a45cf..d39dc4abf 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ShulkerBulletController.java @@ -55,6 +55,11 @@ public class ShulkerBulletController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SmallFireballController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SmallFireballController.java index 1efc4fb4b..b8ba903df 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SmallFireballController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SmallFireballController.java @@ -58,6 +58,11 @@ public class SmallFireballController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SnowballController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SnowballController.java index 29d423a2c..7a9e7608e 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SnowballController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SnowballController.java @@ -55,6 +55,11 @@ public class SnowballController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SpectralArrowController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SpectralArrowController.java index 59616fe82..4de226e2a 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SpectralArrowController.java @@ -55,6 +55,11 @@ public class SpectralArrowController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TNTPrimedController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TNTPrimedController.java index a30f46d13..cd1640080 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TNTPrimedController.java @@ -55,6 +55,11 @@ public class TNTPrimedController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownExpBottleController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownExpBottleController.java index a2daf278b..07465efdf 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownExpBottleController.java @@ -58,6 +58,11 @@ public class ThrownExpBottleController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownPotionController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownPotionController.java index e9b70ba0c..5b7864362 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownPotionController.java @@ -56,6 +56,11 @@ public class ThrownPotionController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TippedArrowController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TippedArrowController.java index 89ce9edf8..9104a1f1d 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TippedArrowController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TippedArrowController.java @@ -55,6 +55,11 @@ public class TippedArrowController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/WitherSkullController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/WitherSkullController.java index 7b07ac2c9..6538b496b 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/WitherSkullController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/WitherSkullController.java @@ -55,6 +55,11 @@ public class WitherSkullController extends MobEntityController { } } + @Override + public boolean bo() { + return npc == null ? super.bo() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_12_R1.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util/PlayerlistTrackerEntry.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util/PlayerlistTrackerEntry.java index b502d84f9..91daf726a 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util/PlayerlistTrackerEntry.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util/PlayerlistTrackerEntry.java @@ -4,9 +4,11 @@ import java.lang.invoke.MethodHandle; import java.lang.reflect.Field; import java.util.Map; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer; import com.google.common.collect.ForwardingMap; import com.google.common.collect.ForwardingSet; @@ -51,7 +53,7 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { @Override public Boolean remove(Object conn) { Boolean removed = super.remove(conn); - if (removed == true) { + if (removed) { Bukkit.getPluginManager().callEvent(new NPCUnlinkFromPlayerEvent( ((NPCHolder) tracker).getNPC(), ((EntityPlayer) conn).getBukkitEntity())); } @@ -177,10 +179,9 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } else { - return tracker.trackedPlayers.stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } + return delegate.keySet().stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); + } else + return tracker.trackedPlayers.stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); } private static Entity getTracker(EntityTrackerEntry entry) { 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 9cf974ae1..e86cd0cc2 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 @@ -418,7 +418,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable for (EnumItemSlot slot : EnumItemSlot.values()) { ItemStack equipment = getEquipment(slot); ItemStack cache = equipmentCache.get(slot); - if (((cache != null) || (equipment != null)) + if ((cache != null || equipment != null) && (cache == null ^ equipment == null || !ItemStack.equals(cache, equipment))) { itemChanged = true; if (cache != null && !cache.isEmpty()) { 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 04d85266a..79fc11d2f 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 @@ -233,9 +233,9 @@ public class ShulkerController extends MobEntityController { @Override public boolean z_() { - if (npc == null || !npc.isFlyable()) { + if (npc == null || !npc.isFlyable()) return super.z_(); - } else + else return false; } diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/PlayerControllerMove.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/PlayerControllerMove.java index 7e9568844..71f711d4f 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/PlayerControllerMove.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/PlayerControllerMove.java @@ -5,7 +5,6 @@ import java.util.Random; import net.citizensnpcs.api.util.BoundingBox; import net.citizensnpcs.nms.v1_13_R2.entity.EntityHumanNPC; import net.citizensnpcs.util.NMS; -import net.minecraft.server.v1_13_R2.AttributeInstance; import net.minecraft.server.v1_13_R2.ControllerMove; import net.minecraft.server.v1_13_R2.EntityInsentient; import net.minecraft.server.v1_13_R2.EntityLiving; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/PlayerPathfinderNormal.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/PlayerPathfinderNormal.java index 50716ed51..8ffd7956a 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/PlayerPathfinderNormal.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/PlayerPathfinderNormal.java @@ -232,7 +232,7 @@ public class PlayerPathfinderNormal extends PlayerPathfinderAbstract { var8.m = var12; var8.l = Math.max(var8.l, var13); } - if ((var12 != PathType.WALKABLE)) { + if (var12 != PathType.WALKABLE) { if (var8 == null && var4 > 0 && var12 != PathType.FENCE && var12 != PathType.TRAPDOOR) { var8 = this.a(var1, var2 + 1, var3, var4 - 1, var5, var7); if (var8 != null && (var8.m == PathType.OPEN || var8.m == PathType.WALKABLE) diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/PlayerlistTrackerEntry.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/PlayerlistTrackerEntry.java index c585fc100..4681cb957 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/PlayerlistTrackerEntry.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/PlayerlistTrackerEntry.java @@ -4,9 +4,11 @@ import java.lang.invoke.MethodHandle; import java.lang.reflect.Field; import java.util.Map; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.v1_13_R2.entity.CraftPlayer; import com.google.common.collect.ForwardingMap; import com.google.common.collect.ForwardingSet; @@ -51,7 +53,7 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { @Override public Boolean remove(Object conn) { Boolean removed = super.remove(conn); - if (removed == true) { + if (removed) { Bukkit.getPluginManager().callEvent(new NPCUnlinkFromPlayerEvent( ((NPCHolder) tracker).getNPC(), ((EntityPlayer) conn).getBukkitEntity())); } @@ -176,10 +178,9 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } else { - return tracker.trackedPlayers.stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } + return delegate.keySet().stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); + } else + return tracker.trackedPlayers.stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); } private static Entity getTracker(EntityTrackerEntry entry) { 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 42503a390..977d15d31 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 @@ -426,7 +426,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable for (EnumItemSlot slot : EnumItemSlot.values()) { ItemStack equipment = getEquipment(slot); ItemStack cache = equipmentCache.get(slot); - if (((cache != null) || (equipment != null)) + if ((cache != null || equipment != null) && (cache == null ^ equipment == null || !ItemStack.equals(cache, equipment))) { itemChanged = true; if (cache != null && !cache.isEmpty()) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java index 32fbc3a92..277843d98 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java @@ -821,9 +821,8 @@ public class NMSImpl implements NMSBridge { @Override public boolean isSneaking(org.bukkit.entity.Entity entity) { - if (entity instanceof Player) { + if (entity instanceof Player) return ((Player) entity).isSneaking(); - } return getHandle(entity).getPose() == EntityPose.SNEAKING; } diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerNavigation.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerNavigation.java index feb440cd4..671efc907 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerNavigation.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerNavigation.java @@ -187,7 +187,7 @@ public class PlayerNavigation extends NavigationAbstract { @Override protected PathEntity a(Set var0, int var1, boolean var2, int var3) { - if (var0.isEmpty() || (this.a.locY < 0.0D) || !this.a()) + if (var0.isEmpty() || this.a.locY < 0.0D || !this.a()) return null; else if (this.c != null && !this.c.b() && var0.contains(this.q)) return this.c; @@ -247,9 +247,7 @@ public class PlayerNavigation extends NavigationAbstract { double var7 = var1.x - var0.x; double var9 = var1.z - var0.z; double var11 = var7 * var7 + var9 * var9; - if (var11 < 1.0E-8D) - return false; - else { + if ((var11 >= 1.0E-8D)) { double var13 = 1.0D / Math.sqrt(var11); var7 *= var13; var9 *= var13; @@ -290,8 +288,8 @@ public class PlayerNavigation extends NavigationAbstract { } } while (this.a(var5, MathHelper.floor(var0.y), var6, var2, var3, var4, var0, var7, var9)); } - return false; } + return false; } @Override diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerPathfinderNormal.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerPathfinderNormal.java index 1134439ed..2c8fd5b7f 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerPathfinderNormal.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerPathfinderNormal.java @@ -233,7 +233,7 @@ public class PlayerPathfinderNormal extends PlayerPathfinderAbstract { var7.l = var11; var7.k = Math.max(var7.k, var12); } - if ((var11 != PathType.WALKABLE)) { + if (var11 != PathType.WALKABLE) { if ((var7 == null || var7.k < 0.0F) && var3 > 0 && var11 != PathType.FENCE && var11 != PathType.TRAPDOOR) { var7 = this.a(var0, var1 + 1, var2, var3 - 1, var4, var6); @@ -316,7 +316,7 @@ public class PlayerPathfinderNormal extends PlayerPathfinderAbstract { } private boolean a(PathPoint var0, PathPoint var1, PathPoint var2, PathPoint var3) { - if (((var3 == null) || (var2 == null) || (var1 == null)) || var3.i) + if (var3 == null || var2 == null || var1 == null || var3.i) return false; else if (var2.b <= var0.b && var1.b <= var0.b) return var3.k >= 0.0F && (var2.b < var0.b || var2.k >= 0.0F) && (var1.b < var0.b || var1.k >= 0.0F); diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerlistTracker.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerlistTracker.java index 0729f0089..dbeaf84fb 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerlistTracker.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/PlayerlistTracker.java @@ -3,9 +3,11 @@ package net.citizensnpcs.nms.v1_14_R1.util; import java.lang.invoke.MethodHandle; import java.util.Map; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.v1_14_R1.entity.CraftPlayer; import com.google.common.collect.ForwardingMap; import com.google.common.collect.ForwardingSet; @@ -52,7 +54,7 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker { @Override public Boolean remove(Object conn) { Boolean removed = super.remove(conn); - if (removed == true) { + if (removed) { Bukkit.getPluginManager().callEvent(new NPCUnlinkFromPlayerEvent( ((NPCHolder) tracker).getNPC(), ((EntityPlayer) conn).getBukkitEntity())); } @@ -163,10 +165,9 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } else { - return tracker.trackedPlayers.stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } + return delegate.keySet().stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); + } else + return tracker.trackedPlayers.stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); } private static Entity getTracker(EntityTracker entry) { 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 d4b28860a..75bcb82a6 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 @@ -427,7 +427,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable for (EnumItemSlot slot : EnumItemSlot.values()) { ItemStack equipment = getEquipment(slot); ItemStack cache = equipmentCache.get(slot); - if (((cache != null) || (equipment != null)) + if ((cache != null || equipment != null) && (cache == null ^ equipment == null || !ItemStack.equals(cache, equipment))) { if (cache != null && !cache.isEmpty()) { this.getAttributeMap().a(cache.a(slot)); diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/NMSImpl.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/NMSImpl.java index 44ea6850f..6a2227302 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/NMSImpl.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/NMSImpl.java @@ -836,9 +836,8 @@ public class NMSImpl implements NMSBridge { @Override public boolean isSneaking(org.bukkit.entity.Entity entity) { - if (entity instanceof Player) { + if (entity instanceof Player) return ((Player) entity).isSneaking(); - } return getHandle(entity).getPose() == EntityPose.CROUCHING; } diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/PlayerNavigation.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/PlayerNavigation.java index 800686169..cba542a74 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/PlayerNavigation.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/PlayerNavigation.java @@ -197,7 +197,7 @@ public class PlayerNavigation extends NavigationAbstract { @Override protected PathEntity a(Set var0, int var1, boolean var2, int var3) { - if (var0.isEmpty() || (this.a.locY() < 0.0D) || !this.a()) + if (var0.isEmpty() || this.a.locY() < 0.0D || !this.a()) return null; else if (this.c != null && !this.c.b() && var0.contains(this.q)) return this.c; @@ -257,9 +257,7 @@ public class PlayerNavigation extends NavigationAbstract { double var7 = var1.x - var0.x; double var9 = var1.z - var0.z; double var11 = var7 * var7 + var9 * var9; - if (var11 < 1.0E-8D) - return false; - else { + if ((var11 >= 1.0E-8D)) { double var13 = 1.0D / Math.sqrt(var11); var7 *= var13; var9 *= var13; @@ -300,8 +298,8 @@ public class PlayerNavigation extends NavigationAbstract { } } while (this.a(var5, MathHelper.floor(var0.y), var6, var2, var3, var4, var0, var7, var9)); } - return false; } + return false; } @Override diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/PlayerPathfinderNormal.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/PlayerPathfinderNormal.java index 7eb8f8232..2284490dc 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/PlayerPathfinderNormal.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/PlayerPathfinderNormal.java @@ -179,7 +179,7 @@ public class PlayerPathfinderNormal extends PlayerPathfinderAbstract { var7.l = var11; var7.k = Math.max(var7.k, var12); } - if ((var11 != PathType.WALKABLE)) { + if (var11 != PathType.WALKABLE) { if ((var7 == null || var7.k < 0.0F) && var3 > 0 && var11 != PathType.FENCE && var11 != PathType.TRAPDOOR) { var7 = this.a(var0, var1 + 1, var2, var3 - 1, var4, var6); @@ -262,7 +262,7 @@ public class PlayerPathfinderNormal extends PlayerPathfinderAbstract { } private boolean a(PathPoint var0, PathPoint var1, PathPoint var2, PathPoint var3) { - if (((var3 == null) || (var2 == null) || (var1 == null)) || var3.i) + if (var3 == null || var2 == null || var1 == null || var3.i) return false; else if (var2.b <= var0.b && var1.b <= var0.b) return var3.k >= 0.0F && (var2.b < var0.b || var2.k >= 0.0F) && (var1.b < var0.b || var1.k >= 0.0F); diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/PlayerlistTracker.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/PlayerlistTracker.java index e16118e4c..aafe804c5 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/PlayerlistTracker.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/PlayerlistTracker.java @@ -3,9 +3,11 @@ package net.citizensnpcs.nms.v1_15_R1.util; import java.lang.invoke.MethodHandle; import java.util.Map; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer; import com.google.common.collect.ForwardingMap; import com.google.common.collect.ForwardingSet; @@ -52,7 +54,7 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker { @Override public Boolean remove(Object conn) { Boolean removed = super.remove(conn); - if (removed == true) { + if (removed) { Bukkit.getPluginManager().callEvent(new NPCUnlinkFromPlayerEvent( ((NPCHolder) tracker).getNPC(), ((EntityPlayer) conn).getBukkitEntity())); } @@ -163,10 +165,9 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } else { - return tracker.trackedPlayers.stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } + return delegate.keySet().stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); + } else + return tracker.trackedPlayers.stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); } private static Entity getTracker(EntityTracker entry) { 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 c869e57cd..c3d355ee6 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 @@ -388,7 +388,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable for (EnumItemSlot slot : EnumItemSlot.values()) { ItemStack equipment = getEquipment(slot); ItemStack cache = equipmentCache.get(slot); - if (((cache != null) || (equipment != null)) + if ((cache != null || equipment != null) && (cache == null ^ equipment == null || !ItemStack.equals(cache, equipment))) { if (cache != null && !cache.isEmpty()) { this.getAttributeMap().a(cache.a(slot)); diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java index 7ea57ff47..98c73e60e 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java @@ -860,9 +860,8 @@ public class NMSImpl implements NMSBridge { @Override public boolean isSneaking(org.bukkit.entity.Entity entity) { - if (entity instanceof Player) { + if (entity instanceof Player) return ((Player) entity).isSneaking(); - } return getHandle(entity).getPose() == EntityPose.CROUCHING; } diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/PlayerlistTracker.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/PlayerlistTracker.java index 8910c2cf3..219752933 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/PlayerlistTracker.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/PlayerlistTracker.java @@ -3,9 +3,11 @@ package net.citizensnpcs.nms.v1_16_R3.util; import java.lang.invoke.MethodHandle; import java.util.Map; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer; import com.google.common.collect.ForwardingMap; import com.google.common.collect.ForwardingSet; @@ -52,7 +54,7 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker { @Override public Boolean remove(Object conn) { Boolean removed = super.remove(conn); - if (removed == true) { + if (removed) { Bukkit.getPluginManager().callEvent(new NPCUnlinkFromPlayerEvent( ((NPCHolder) tracker).getNPC(), ((EntityPlayer) conn).getBukkitEntity())); } @@ -163,10 +165,9 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } else { - return tracker.trackedPlayers.stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } + return delegate.keySet().stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); + } else + return tracker.trackedPlayers.stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); } private static Entity getTracker(EntityTracker entry) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/util/EntityMoveControl.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/util/EntityMoveControl.java index df2895200..827ed668f 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/util/EntityMoveControl.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/util/EntityMoveControl.java @@ -100,10 +100,9 @@ public class EntityMoveControl extends MoveControl { double dY = this.ty - this.entity.getY(); double dXZ = Math.sqrt(dX * dX + dZ * dZ); double dXYZ = Math.sqrt(dX * dX + dY * dY + dZ * dZ); - if (dXYZ < 2.500000277905201E-7) { + if (dXYZ < 2.500000277905201E-7) // this.entity.zza = 0.0F; return; - } if (dXZ > 0.4) { float f = (float) Math.toDegrees(Mth.atan2(dZ, dX)) - 90.0F; entity.setYRot(rotlerp(this.entity.getYRot(), f, 90.0F)); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/util/NMSImpl.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/util/NMSImpl.java index e034ce19a..ba776ef5f 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/util/NMSImpl.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/util/NMSImpl.java @@ -862,9 +862,8 @@ public class NMSImpl implements NMSBridge { @Override public boolean isSneaking(org.bukkit.entity.Entity entity) { - if (entity instanceof Player) { + if (entity instanceof Player) return ((Player) entity).isSneaking(); - } return getHandle(entity).getPose() == Pose.CROUCHING; } diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityMoveControl.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityMoveControl.java index 0da2853dc..00170fe77 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityMoveControl.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityMoveControl.java @@ -100,10 +100,9 @@ public class EntityMoveControl extends MoveControl { double dY = this.ty - this.entity.getY(); double dXZ = Math.sqrt(dX * dX + dZ * dZ); double dXYZ = Math.sqrt(dX * dX + dY * dY + dZ * dZ); - if (dXYZ < 2.500000277905201E-7) { + if (dXYZ < 2.500000277905201E-7) // this.entity.zza = 0.0F; return; - } if (dXZ > 0.4) { float f = (float) Math.toDegrees(Mth.atan2(dZ, dX)) - 90.0F; entity.setYRot(rotlerp(this.entity.getYRot(), f, 90.0F)); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityNavigation.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityNavigation.java index 4713a413e..7e2af58db 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityNavigation.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityNavigation.java @@ -156,7 +156,7 @@ public class EntityNavigation extends PathNavigation { } return true; } - + private boolean canWalkOn(int var0, int var1, int var2, int var3, int var4, int var5, Vec3 var6, double var7, double var9) { int var11 = var0 - var3 / 2; @@ -471,8 +471,7 @@ public class EntityNavigation extends PathNavigation { @Override public boolean shouldRecomputePath(BlockPos var0) { - if (this.hasDelayedRecomputation - || ((this.path == null) || this.path.isDone() || (this.path.getNodeCount() == 0))) + if (this.hasDelayedRecomputation || this.path == null || this.path.isDone() || this.path.getNodeCount() == 0) return false; else { Node var1 = this.path.getEndNode(); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/NMSImpl.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/NMSImpl.java index aa89070a2..6ce859a82 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/NMSImpl.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/NMSImpl.java @@ -869,9 +869,8 @@ public class NMSImpl implements NMSBridge { @Override public boolean isSneaking(org.bukkit.entity.Entity entity) { - if (entity instanceof Player) { + if (entity instanceof Player) return ((Player) entity).isSneaking(); - } return getHandle(entity).getPose() == Pose.CROUCHING; } diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityMoveControl.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityMoveControl.java index 049f1b639..625cee044 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityMoveControl.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityMoveControl.java @@ -100,10 +100,9 @@ public class EntityMoveControl extends MoveControl { double dY = this.ty - this.entity.getY(); double dXZ = Math.sqrt(dX * dX + dZ * dZ); double dXYZ = Math.sqrt(dX * dX + dY * dY + dZ * dZ); - if (dXYZ < 2.500000277905201E-7) { + if (dXYZ < 2.500000277905201E-7) // this.entity.zza = 0.0F; return; - } if (dXZ > 0.4) { float f = (float) Math.toDegrees(Mth.atan2(dZ, dX)) - 90.0F; entity.setYRot(rotlerp(this.entity.getYRot(), f, 90.0F)); diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNavigation.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNavigation.java index 223b7edcc..a68efd6db 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNavigation.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNavigation.java @@ -154,7 +154,7 @@ public class EntityNavigation extends PathNavigation { } return true; } - + private boolean canWalkOn(int var0, int var1, int var2, int var3, int var4, int var5, Vec3 var6, double var7, double var9) { int var11 = var0 - var3 / 2; @@ -351,7 +351,7 @@ public class EntityNavigation extends PathNavigation { } protected boolean hasValidPathType(BlockPathTypes var0) { - if ((var0 == BlockPathTypes.WATER) || (var0 == BlockPathTypes.LAVA)) + if (var0 == BlockPathTypes.WATER || var0 == BlockPathTypes.LAVA) return false; else return var0 != BlockPathTypes.OPEN; @@ -474,8 +474,7 @@ public class EntityNavigation extends PathNavigation { @Override public boolean shouldRecomputePath(BlockPos var0) { - if (this.hasDelayedRecomputation - || ((this.path == null) || this.path.isDone() || (this.path.getNodeCount() == 0))) + if (this.hasDelayedRecomputation || this.path == null || this.path.isDone() || this.path.getNodeCount() == 0) return false; else { Node var1 = this.path.getEndNode(); diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNodeEvaluator.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNodeEvaluator.java index 28f711e05..a3afb19bc 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNodeEvaluator.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNodeEvaluator.java @@ -399,7 +399,7 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { } protected boolean isDiagonalValid(Node var0, Node var1, Node var2, Node var3) { - if (((var3 == null) || (var2 == null) || (var1 == null)) || var3.closed) + if (var3 == null || var2 == null || var1 == null || var3.closed) return false; else if (var2.y <= var0.y && var1.y <= var0.y) { if (var1.type != BlockPathTypes.WALKABLE_DOOR && var2.type != BlockPathTypes.WALKABLE_DOOR diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/NMSImpl.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/NMSImpl.java index bd22f51e2..31fce2040 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/NMSImpl.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/NMSImpl.java @@ -916,9 +916,8 @@ public class NMSImpl implements NMSBridge { @Override public boolean isSneaking(org.bukkit.entity.Entity entity) { - if (entity instanceof Player) { + if (entity instanceof Player) return ((Player) entity).isSneaking(); - } return getHandle(entity).getPose() == Pose.CROUCHING; } @@ -1202,12 +1201,13 @@ public class NMSImpl implements NMSBridge { GameProfile playerProfile = null; for (int i = 0; i < list.size(); i++) { ClientboundPlayerInfoUpdatePacket.Entry npcInfo = list.get(i); - if (npcInfo == null) + if (npcInfo == null) { continue; - + } MirrorTrait trait = mirrorTraits.apply(npcInfo.profileId()); - if (trait == null || !trait.isMirroring(player)) + if (trait == null || !trait.isMirroring(player)) { continue; + } boolean disableTablist = trait.getNPC().shouldRemoveFromTabList(); if (disableTablist != npcInfo.listed()) { @@ -1229,9 +1229,9 @@ public class NMSImpl implements NMSBridge { continue; } Collection textures = playerProfile.getProperties().get("textures"); - if (textures == null || textures.size() == 0) + if (textures == null || textures.size() == 0) { continue; - + } npcInfo.profile().getProperties().clear(); for (String key : playerProfile.getProperties().keySet()) { npcInfo.profile().getProperties().putAll(key, playerProfile.getProperties().get(key)); @@ -1414,7 +1414,7 @@ public class NMSImpl implements NMSBridge { Preconditions.checkNotNull(recipient); Preconditions.checkNotNull(skinnableNPCs); sendPacket(recipient, new ClientboundPlayerInfoRemovePacket( - skinnableNPCs.stream().map(e -> e.getUniqueId()).collect(Collectors.toList()))); + skinnableNPCs.stream().map((Function) Player::getUniqueId).collect(Collectors.toList()))); } @Override diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityMoveControl.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityMoveControl.java index 228a05e40..318472713 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityMoveControl.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityMoveControl.java @@ -98,10 +98,9 @@ public class EntityMoveControl extends MoveControl { double dY = this.ty - this.entity.getY(); double dXZ = Math.sqrt(dX * dX + dZ * dZ); double dXYZ = Math.sqrt(dX * dX + dY * dY + dZ * dZ); - if (dXYZ < 2.500000277905201E-7) { + if (dXYZ < 2.500000277905201E-7) // this.entity.zza = 0.0F; return; - } if (dXZ > 0.4) { float f = (float) Math.toDegrees(Mth.atan2(dZ, dX)) - 90.0F; entity.setYRot(rotlerp(this.entity.getYRot(), f, 90.0F)); diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityNavigation.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityNavigation.java index cc29ca3db..a3391d278 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityNavigation.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityNavigation.java @@ -146,25 +146,24 @@ public class EntityNavigation extends PathNavigation { public Path createPath(BlockPos var0, int var1) { LevelChunk var2 = this.level.getChunkSource().getChunkNow(SectionPos.blockToSectionCoord(var0.getX()), SectionPos.blockToSectionCoord(var0.getZ())); - if (var2 == null) { + if (var2 == null) return null; - } else { + else { BlockPos var3; if (var2.getBlockState(var0).isAir()) { for (var3 = var0.below(); var3.getY() > this.level.getMinBuildHeight() && var2.getBlockState(var3).isAir(); var3 = var3.below()) { } - if (var3.getY() > this.level.getMinBuildHeight()) { + if (var3.getY() > this.level.getMinBuildHeight()) return supercreatePath(var3.above(), var1); - } while (var3.getY() < this.level.getMaxBuildHeight() && var2.getBlockState(var3).isAir()) { var3 = var3.above(); } var0 = var3; } - if (!var2.getBlockState(var0).isSolid()) { + if (!var2.getBlockState(var0).isSolid()) return supercreatePath(var0, var1); - } else { + else { for (var3 = var0.above(); var3.getY() < this.level.getMaxBuildHeight() && var2.getBlockState(var3).isSolid(); var3 = var3.above()) { } @@ -326,13 +325,10 @@ public class EntityNavigation extends PathNavigation { } protected boolean hasValidPathType(PathType var0) { - if (var0 == PathType.WATER) { + if ((var0 == PathType.WATER) || (var0 == PathType.LAVA)) return false; - } else if (var0 == PathType.LAVA) { - return false; - } else { + else return var0 != PathType.OPEN; - } } @Override @@ -443,8 +439,7 @@ public class EntityNavigation extends PathNavigation { @Override public boolean shouldRecomputePath(BlockPos var0) { - if (this.hasDelayedRecomputation - || ((this.path == null) || this.path.isDone() || (this.path.getNodeCount() == 0))) + if (this.hasDelayedRecomputation || this.path == null || this.path.isDone() || this.path.getNodeCount() == 0) return false; else { Node var1 = this.path.getEndNode(); @@ -458,11 +453,11 @@ public class EntityNavigation extends PathNavigation { if (this.path.getNextNodeIndex() + 1 >= this.path.getNodeCount()) return false; Vec3 var1 = Vec3.atBottomCenterOf(this.path.getNextNodePos()); - if (!var0.closerThan(var1, 2.0)) { + if (!var0.closerThan(var1, 2.0)) return false; - } else if (this.canMoveDirectly(var0, this.path.getNextEntityPos(this.mob))) { + else if (this.canMoveDirectly(var0, this.path.getNextEntityPos(this.mob))) return true; - } else { + else { Vec3 var2 = Vec3.atBottomCenterOf(this.path.getNodePos(this.path.getNextNodeIndex() + 1)); Vec3 var3 = var1.subtract(var0); Vec3 var4 = var2.subtract(var0); @@ -470,9 +465,9 @@ public class EntityNavigation extends PathNavigation { double var7 = var4.lengthSqr(); boolean var9 = var7 < var5; boolean var10 = var5 < 0.5; - if (!var9 && !var10) { + if (!var9 && !var10) return false; - } else { + else { Vec3 var11 = var3.normalize(); Vec3 var12 = var4.normalize(); return var12.dot(var11) < 0.0; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityNodeEvaluator.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityNodeEvaluator.java index 112e9ecf8..3d69e8a62 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityNodeEvaluator.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityNodeEvaluator.java @@ -45,9 +45,8 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { for (int var4 = 1; var4 <= var3; ++var4) { var1 = var1.move(var2); - if (this.hasCollisions(var1)) { + if (this.hasCollisions(var1)) return false; - } } return true; } @@ -70,9 +69,9 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { Node var8 = null; BlockPos.MutableBlockPos var9 = new BlockPos.MutableBlockPos(); double var10 = this.getFloorLevel(var9.set(var0, var1, var2)); - if (var10 - var4 > this.getMobJumpHeight()) { + if (var10 - var4 > this.getMobJumpHeight()) return null; - } else { + else { PathType var12 = this.getCachedPathType(var0, var1, var2); float var13 = this.mvmt.getPathfindingMalus(var12); if (var13 >= 0.0F) { @@ -94,10 +93,8 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { } else if (doesBlockHavePartialCollision(var12) && var8 == null) { var8 = this.getClosedNode(var0, var1, var2, var12); } - return var8; - } else { - return var8; } + return var8; } } @@ -109,9 +106,7 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { } protected PathType getCachedPathType(int var0, int var1, int var2) { - return (PathType) this.pathTypesByPosCacheByMob.computeIfAbsent(BlockPos.asLong(var0, var1, var2), (var3) -> { - return this.getPathTypeOfMob(this.currentContext, var0, var1, var2, this.mob); - }); + return (PathType) this.pathTypesByPosCacheByMob.computeIfAbsent(BlockPos.asLong(var0, var1, var2), var3 -> this.getPathTypeOfMob(this.currentContext, var0, var1, var2, this.mob)); } private Node getClosedNode(int var0, int var1, int var2, PathType var3) { @@ -185,58 +180,54 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { public PathType getPathTypeOfMob(PathfindingContext var0, int var1, int var2, int var3, LivingEntity var4) { Set var5 = this.getPathTypeWithinMobBB(var0, var1, var2, var3); - if (var5.contains(PathType.FENCE)) { + if (var5.contains(PathType.FENCE)) return PathType.FENCE; - } else if (var5.contains(PathType.UNPASSABLE_RAIL)) { + else if (var5.contains(PathType.UNPASSABLE_RAIL)) return PathType.UNPASSABLE_RAIL; - } else { + else { PathType var6 = PathType.BLOCKED; Iterator var88 = var5.iterator(); while (var88.hasNext()) { PathType var8 = var88.next(); - if (mvmt.getPathfindingMalus(var8) < 0.0F) { + if (mvmt.getPathfindingMalus(var8) < 0.0F) return var8; - } if (mvmt.getPathfindingMalus(var8) >= mvmt.getPathfindingMalus(var6)) { var6 = var8; } } if (this.entityWidth <= 1 && var6 != PathType.OPEN && mvmt.getPathfindingMalus(var6) == 0.0F - && this.getPathType(var0, var1, var2, var3) == PathType.OPEN) { + && this.getPathType(var0, var1, var2, var3) == PathType.OPEN) return PathType.OPEN; - } else { + else return var6; - } } } @Override public PathType getPathTypeOfMob(PathfindingContext var0, int var1, int var2, int var3, Mob var4) { Set var5 = this.getPathTypeWithinMobBB(var0, var1, var2, var3); - if (var5.contains(PathType.FENCE)) { + if (var5.contains(PathType.FENCE)) return PathType.FENCE; - } else if (var5.contains(PathType.UNPASSABLE_RAIL)) { + else if (var5.contains(PathType.UNPASSABLE_RAIL)) return PathType.UNPASSABLE_RAIL; - } else { + else { PathType var6 = PathType.BLOCKED; Iterator var88 = var5.iterator(); while (var88.hasNext()) { PathType var8 = var88.next(); - if (var4.getPathfindingMalus(var8) < 0.0F) { + if (var4.getPathfindingMalus(var8) < 0.0F) return var8; - } if (var4.getPathfindingMalus(var8) >= var4.getPathfindingMalus(var6)) { var6 = var8; } } if (this.entityWidth <= 1 && var6 != PathType.OPEN && var4.getPathfindingMalus(var6) == 0.0F - && this.getPathType(var0, var1, var2, var3) == PathType.OPEN) { + && this.getPathType(var0, var1, var2, var3) == PathType.OPEN) return PathType.OPEN; - } else { + else return var6; - } } } @@ -315,9 +306,8 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { if (this.canStartAt(var1.set(var4.minX, var0, var4.minZ)) || this.canStartAt(var1.set(var4.minX, var0, var4.maxZ)) || this.canStartAt(var1.set(var4.maxX, var0, var4.minZ)) - || this.canStartAt(var1.set(var4.maxX, var0, var4.maxZ))) { + || this.canStartAt(var1.set(var4.maxX, var0, var4.maxZ))) return this.getStartNode(var1); - } } return this.getStartNode(new BlockPos(var3.getX(), var0, var3.getZ())); } @@ -335,9 +325,7 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { } private boolean hasCollisions(AABB var0) { - return this.collisionCache.computeIfAbsent(var0, (var1) -> { - return !this.currentContext.level().noCollision(this.mob, var0); - }); + return this.collisionCache.computeIfAbsent(var0, var1 -> !this.currentContext.level().noCollision(this.mob, var0)); } protected boolean isAmphibious() { @@ -345,15 +333,10 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { } protected boolean isDiagonalValid(Node var0) { - if (var0 != null && !var0.closed) { - if (var0.type == PathType.WALKABLE_DOOR) { - return false; - } else { - return var0.costMalus >= 0.0F; - } - } else { + if (((var0 == null) || var0.closed) || (var0.type == PathType.WALKABLE_DOOR)) return false; - } + else + return var0.costMalus >= 0.0F; } protected boolean isDiagonalValid(Node var0, Node var1, Node var2) { @@ -363,12 +346,10 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { && this.mob.getBbWidth() < 0.5; return (var2.y < var0.y || var2.costMalus >= 0.0F || var3) && (var1.y < var0.y || var1.costMalus >= 0.0F || var3); - } else { + } else return false; - } - } else { + } else return false; - } } protected boolean isNeighborValid(Node var0, Node var1) { @@ -389,15 +370,13 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { private Node tryFindFirstGroundNodeBelow(int var0, int var1, int var2) { for (int var3 = var1 - 1; var3 >= this.mob.level().getMinBuildHeight(); --var3) { - if (var1 - var3 > this.mob.getMaxFallDistance()) { + if (var1 - var3 > this.mob.getMaxFallDistance()) return this.getBlockedNode(var0, var3, var2); - } PathType var4 = this.getCachedPathType(var0, var3, var2); float var5 = this.mvmt.getPathfindingMalus(var4); if (var4 != PathType.OPEN) { - if (var5 >= 0.0F) { + if (var5 >= 0.0F) return this.getNodeAndUpdateCostToMax(var0, var3, var2, var4, var5); - } return this.getBlockedNode(var0, var3, var2); } } @@ -409,9 +388,8 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { while (var1 > this.mob.level().getMinBuildHeight()) { PathType var4 = this.getCachedPathType(var0, var1, var2); - if (var4 != PathType.WATER) { + if (var4 != PathType.WATER) return var3; - } var3 = this.getNodeAndUpdateCostToMax(var0, var1, var2, var4, this.mvmt.getPathfindingMalus(var4)); --var1; } @@ -421,13 +399,11 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { private Node tryJumpOn(int var0, int var1, int var2, int var3, double var4, Direction var6, PathType var7, BlockPos.MutableBlockPos var8) { Node var9 = this.findAcceptedNode(var0, var1 + 1, var2, var3 - 1, var4, var6, var7); - if (var9 == null) { + if (var9 == null) return null; - } else if (this.mob.getBbWidth() >= 1.0F) { + else if ((this.mob.getBbWidth() >= 1.0F) || (var9.type != PathType.OPEN && var9.type != PathType.WALKABLE)) return var9; - } else if (var9.type != PathType.OPEN && var9.type != PathType.WALKABLE) { - return var9; - } else { + else { double var10 = var0 - var6.getStepX() + 0.5; double var12 = var2 - var6.getStepZ() + 0.5; double var14 = this.mob.getBbWidth() / 2.0; @@ -446,18 +422,14 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { for (int var7 = -1; var7 <= 1; ++var7) { if (var5 != 0 || var7 != 0) { PathType var8 = var0.getPathTypeFromState(var1 + var5, var2 + var6, var3 + var7); - if (var8 == PathType.DAMAGE_OTHER) { + if (var8 == PathType.DAMAGE_OTHER) return PathType.DANGER_OTHER; - } - if (var8 == PathType.DAMAGE_FIRE || var8 == PathType.LAVA) { + if (var8 == PathType.DAMAGE_FIRE || var8 == PathType.LAVA) return PathType.DANGER_FIRE; - } - if (var8 == PathType.WATER) { + if (var8 == PathType.WATER) return PathType.WATER_BORDER; - } - if (var8 == PathType.DAMAGE_CAUTIOUS) { + if (var8 == PathType.DAMAGE_CAUTIOUS) return PathType.DAMAGE_CAUTIOUS; - } } } } @@ -511,9 +483,8 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { var10000 = checkNeighbourBlocks(var0, var2, var3, var4, PathType.WALKABLE); } return var10000; - } else { + } else return var5; - } } public static final double SPACE_BETWEEN_WALL_POSTS = 0.5; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityNodeEvaluatorBase.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityNodeEvaluatorBase.java index 80c7cb774..dd0098e79 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityNodeEvaluatorBase.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityNodeEvaluatorBase.java @@ -60,9 +60,7 @@ public abstract class EntityNodeEvaluatorBase extends NodeEvaluator { @Override protected Node getNode(int var0, int var1, int var2) { - return (Node) this.nodes.computeIfAbsent(Node.createHash(var0, var1, var2), (var3) -> { - return new Node(var0, var1, var2); - }); + return (Node) this.nodes.computeIfAbsent(Node.createHash(var0, var1, var2), var3 -> new Node(var0, var1, var2)); } @Override diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityPathfinder.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityPathfinder.java index f20bbd3ca..e67f58c4a 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityPathfinder.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityPathfinder.java @@ -43,12 +43,10 @@ public class EntityPathfinder extends PathFinder { this.openSet.clear(); this.nodeEvaluator.prepare(var0, var1); Node var6 = this.nodeEvaluator.getStart(); - if (var6 == null) { + if (var6 == null) return null; - } else { - Map var7 = var2.stream().collect(Collectors.toMap((var0x) -> { - return this.nodeEvaluator.getTarget(var0x.getX(), var0x.getY(), var0x.getZ()); - }, Function.identity())); + else { + Map var7 = var2.stream().collect(Collectors.toMap(var0x -> this.nodeEvaluator.getTarget(var0x.getX(), var0x.getY(), var0x.getZ()), Function.identity())); Path var8 = this.findPath(var0.getProfiler(), var6, var7, var3, var4, var5); this.nodeEvaluator.done(); return var8; @@ -60,12 +58,10 @@ public class EntityPathfinder extends PathFinder { this.openSet.clear(); this.nodeEvaluator.prepare(var0, var1); Node var6 = this.nodeEvaluator.getStart(); - if (var6 == null) { + if (var6 == null) return null; - } else { - Map var7 = var2.stream().collect(Collectors.toMap((var0x) -> { - return this.nodeEvaluator.getTarget(var0x.getX(), var0x.getY(), var0x.getZ()); - }, Function.identity())); + else { + Map var7 = var2.stream().collect(Collectors.toMap(var0x -> this.nodeEvaluator.getTarget(var0x.getX(), var0x.getY(), var0x.getZ()), Function.identity())); Path var8 = this.findPath(var0.getProfiler(), var6, var7, var3, var4, var5); this.nodeEvaluator.done(); return var8; @@ -104,7 +100,7 @@ public class EntityPathfinder extends PathFinder { if (!var9.isEmpty()) { break; } - if (!(var11.distanceTo(var1) >= range)) { + if ((var11.distanceTo(var1) < range)) { int var12 = this.nodeEvaluator.getNeighbors(this.neighbors, var11); for (int i = 0; i < var12; ++i) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityPathfindingContext.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityPathfindingContext.java index 78e9c55d4..bda1c75f9 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityPathfindingContext.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/EntityPathfindingContext.java @@ -66,50 +66,45 @@ public class EntityPathfindingContext extends PathfindingContext { static PathType getPathTypeFromState(BlockGetter var0, BlockPos var1) { BlockState var2 = var0.getBlockState(var1); Block var3 = var2.getBlock(); - if (var2.isAir()) { + if (var2.isAir()) return PathType.OPEN; - } else if (!var2.is(BlockTags.TRAPDOORS) && !var2.is(Blocks.LILY_PAD) && !var2.is(Blocks.BIG_DRIPLEAF)) { - if (var2.is(Blocks.POWDER_SNOW)) { + else if (!var2.is(BlockTags.TRAPDOORS) && !var2.is(Blocks.LILY_PAD) && !var2.is(Blocks.BIG_DRIPLEAF)) { + if (var2.is(Blocks.POWDER_SNOW)) return PathType.POWDER_SNOW; - } else if (!var2.is(Blocks.CACTUS) && !var2.is(Blocks.SWEET_BERRY_BUSH)) { - if (var2.is(Blocks.HONEY_BLOCK)) { + else if (!var2.is(Blocks.CACTUS) && !var2.is(Blocks.SWEET_BERRY_BUSH)) { + if (var2.is(Blocks.HONEY_BLOCK)) return PathType.STICKY_HONEY; - } else if (var2.is(Blocks.COCOA)) { + else if (var2.is(Blocks.COCOA)) return PathType.COCOA; - } else if (!var2.is(Blocks.WITHER_ROSE) && !var2.is(Blocks.POINTED_DRIPSTONE)) { + else if (!var2.is(Blocks.WITHER_ROSE) && !var2.is(Blocks.POINTED_DRIPSTONE)) { FluidState var4 = var2.getFluidState(); - if (var4.is(FluidTags.LAVA)) { + if (var4.is(FluidTags.LAVA)) return PathType.LAVA; - } else if (isBurningBlock(var2)) { + else if (isBurningBlock(var2)) return PathType.DAMAGE_FIRE; - } else if (var3 instanceof DoorBlock) { + else if (var3 instanceof DoorBlock) { DoorBlock var5 = (DoorBlock) var3; - if (var2.getValue(DoorBlock.OPEN)) { + if (var2.getValue(DoorBlock.OPEN)) return PathType.DOOR_OPEN; - } else { + else return var5.type().canOpenByHand() ? PathType.DOOR_WOOD_CLOSED : PathType.DOOR_IRON_CLOSED; - } - } else if (var3 instanceof BaseRailBlock) { + } else if (var3 instanceof BaseRailBlock) return PathType.RAIL; - } else if (var3 instanceof LeavesBlock) { + else if (var3 instanceof LeavesBlock) return PathType.LEAVES; - } else if (var2.is(BlockTags.FENCES) || var2.is(BlockTags.WALLS) - || var3 instanceof FenceGateBlock && !(Boolean) var2.getValue(FenceGateBlock.OPEN)) { + else if (var2.is(BlockTags.FENCES) || var2.is(BlockTags.WALLS) + || var3 instanceof FenceGateBlock && !(Boolean) var2.getValue(FenceGateBlock.OPEN)) return PathType.FENCE; - } else if (!var2.isPathfindable(PathComputationType.LAND)) { + else if (!var2.isPathfindable(PathComputationType.LAND)) return PathType.BLOCKED; - } else { + else return var4.is(FluidTags.WATER) ? PathType.WATER : PathType.OPEN; - } - } else { + } else return PathType.DAMAGE_CAUTIOUS; - } - } else { + } else return PathType.DAMAGE_OTHER; - } - } else { + } else return PathType.TRAPDOOR; - } } static boolean isBurningBlock(BlockState var0) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/NMSImpl.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/NMSImpl.java index 0c3562fb8..d5305eff7 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/NMSImpl.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/util/NMSImpl.java @@ -1188,13 +1188,13 @@ public class NMSImpl implements NMSBridge { GameProfile playerProfile = null; for (int i = 0; i < list.size(); i++) { ClientboundPlayerInfoUpdatePacket.Entry npcInfo = list.get(i); - if (npcInfo == null) + if (npcInfo == null) { continue; - + } MirrorTrait trait = mirrorTraits.apply(npcInfo.profileId()); - if (trait == null || !trait.isMirroring(player)) + if (trait == null || !trait.isMirroring(player)) { continue; - + } boolean disableTablist = trait.getNPC().shouldRemoveFromTabList(); if (disableTablist != npcInfo.listed()) { @@ -1216,9 +1216,9 @@ public class NMSImpl implements NMSBridge { continue; } Collection textures = playerProfile.getProperties().get("textures"); - if (textures == null || textures.size() == 0) + if (textures == null || textures.size() == 0) { continue; - + } npcInfo.profile().getProperties().clear(); for (String key : playerProfile.getProperties().keySet()) { npcInfo.profile().getProperties().putAll(key, playerProfile.getProperties().get(key)); @@ -1308,9 +1308,9 @@ public class NMSImpl implements NMSBridge { while ((search = search.getSuperclass()) != null && Entity.class.isAssignableFrom(search)) { net.minecraft.world.entity.EntityType type = ENTITY_REGISTRY.findType(search); ResourceLocation key = ENTITY_REGISTRY.getKey(type); - if (key == null || type == null) + if (key == null || type == null) { continue; - + } CITIZENS_ENTITY_TYPES.put(clazz, type); int code = ENTITY_REGISTRY.getId(type); ENTITY_REGISTRY.put(code, key, type); @@ -1401,7 +1401,7 @@ public class NMSImpl implements NMSBridge { Preconditions.checkNotNull(recipient); Preconditions.checkNotNull(players); sendPacket(recipient, new ClientboundPlayerInfoRemovePacket( - players.stream().map(e -> e.getUniqueId()).collect(Collectors.toList()))); + players.stream().map((Function) Player::getUniqueId).collect(Collectors.toList()))); } @Override diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ArmorStandController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ArmorStandController.java index 355045903..752d7046c 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ArmorStandController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ArmorStandController.java @@ -61,6 +61,13 @@ public class ArmorStandController extends MobEntityController { } } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public MobAI getAI() { return ai; @@ -115,13 +122,6 @@ public class ArmorStandController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/AxolotlController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/AxolotlController.java index eb7080a84..0737894a8 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/AxolotlController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/AxolotlController.java @@ -91,6 +91,13 @@ public class AxolotlController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -210,13 +217,6 @@ public class AxolotlController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BatController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BatController.java index 4a7636932..34ea0cbae 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BatController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BatController.java @@ -67,6 +67,13 @@ public class BatController extends MobEntityController { return super.canRide(entity); } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -167,13 +174,6 @@ public class BatController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { if (npc == null) diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BeeController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BeeController.java index 335965578..81c2f48b9 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BeeController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BeeController.java @@ -64,6 +64,13 @@ public class BeeController extends MobEntityController { return super.canRide(entity); } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -164,13 +171,6 @@ public class BeeController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { if (npc == null) diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BlazeController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BlazeController.java index c5b3b3bbb..6f9899800 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BlazeController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BlazeController.java @@ -64,6 +64,13 @@ public class BlazeController extends MobEntityController { return super.canRide(entity); } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -159,13 +166,6 @@ public class BlazeController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { if (npc == null) diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BoggedController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BoggedController.java index 1045d4e04..eb2a24d31 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BoggedController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BoggedController.java @@ -74,6 +74,13 @@ public class BoggedController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -194,13 +201,6 @@ public class BoggedController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BreezeController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BreezeController.java index f2b34f72e..9f59be1e1 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BreezeController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/BreezeController.java @@ -74,6 +74,13 @@ public class BreezeController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -194,13 +201,6 @@ public class BreezeController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CamelController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CamelController.java index 334d523c7..07640f35d 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CamelController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CamelController.java @@ -91,6 +91,13 @@ public class CamelController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -238,13 +245,6 @@ public class CamelController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CatController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CatController.java index 29c81988e..6f8c6097e 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CatController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CatController.java @@ -74,6 +74,13 @@ public class CatController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -194,13 +201,6 @@ public class CatController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CaveSpiderController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CaveSpiderController.java index 1fb18a13a..6610931f0 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CaveSpiderController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CaveSpiderController.java @@ -73,6 +73,13 @@ public class CaveSpiderController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -193,13 +200,6 @@ public class CaveSpiderController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ChickenController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ChickenController.java index 7872d10f2..f5e0b7c5c 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ChickenController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ChickenController.java @@ -82,6 +82,13 @@ public class ChickenController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -202,13 +209,6 @@ public class ChickenController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CodController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CodController.java index 69ab20183..6df3ef763 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CodController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CodController.java @@ -98,6 +98,13 @@ public class CodController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -230,13 +237,6 @@ public class CodController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CowController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CowController.java index f95692320..9845afba2 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CowController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CowController.java @@ -79,6 +79,13 @@ public class CowController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -209,13 +216,6 @@ public class CowController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CreeperController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CreeperController.java index b522a1404..0e4bdb841 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CreeperController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/CreeperController.java @@ -77,6 +77,13 @@ public class CreeperController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -208,13 +215,6 @@ public class CreeperController extends MobEntityController { this.allowPowered = allowPowered; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void thunderHit(ServerLevel worldserver, LightningBolt entitylightning) { if (npc == null || allowPowered) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/DolphinController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/DolphinController.java index caa162129..c4a62c80c 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/DolphinController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/DolphinController.java @@ -83,6 +83,13 @@ public class DolphinController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -190,13 +197,6 @@ public class DolphinController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null && npc.isProtected()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/DrownedController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/DrownedController.java index e28d35d5b..f2e8ff192 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/DrownedController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/DrownedController.java @@ -73,6 +73,13 @@ public class DrownedController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -184,13 +191,6 @@ public class DrownedController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EndermanController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EndermanController.java index 7d8f3533a..a13d366f6 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EndermanController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EndermanController.java @@ -76,6 +76,13 @@ public class EndermanController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -204,13 +211,6 @@ public class EndermanController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EndermiteController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EndermiteController.java index c3708a6ea..37dcb8c7c 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EndermiteController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EndermiteController.java @@ -73,6 +73,13 @@ public class EndermiteController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -193,13 +200,6 @@ public class EndermiteController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EvokerController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EvokerController.java index ab72ca622..a8963092c 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EvokerController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EvokerController.java @@ -67,6 +67,13 @@ public class EvokerController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -178,13 +185,6 @@ public class EvokerController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/FoxController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/FoxController.java index cf6bdc3f1..e420158ae 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/FoxController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/FoxController.java @@ -71,6 +71,13 @@ public class FoxController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -201,13 +208,6 @@ public class FoxController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/FrogController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/FrogController.java index fce308edb..852fb61ef 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/FrogController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/FrogController.java @@ -71,6 +71,13 @@ public class FrogController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -191,13 +198,6 @@ public class FrogController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GhastController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GhastController.java index 440c99243..0f621571b 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GhastController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GhastController.java @@ -58,6 +58,13 @@ public class GhastController extends MobEntityController { return super.canRide(entity); } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -159,13 +166,6 @@ public class GhastController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { if (npc == null) diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GiantController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GiantController.java index 3dfa47207..6b97b44f6 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GiantController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GiantController.java @@ -67,6 +67,13 @@ public class GiantController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -187,13 +194,6 @@ public class GiantController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GlowSquidController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GlowSquidController.java index cd5ddc43c..357681c1e 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GlowSquidController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GlowSquidController.java @@ -67,6 +67,13 @@ public class GlowSquidController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -187,13 +194,6 @@ public class GlowSquidController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GoatController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GoatController.java index 0cdcf6f0d..bb2e07547 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GoatController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GoatController.java @@ -68,6 +68,13 @@ public class GoatController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -188,13 +195,6 @@ public class GoatController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GuardianController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GuardianController.java index 6a67cc18c..373fa4978 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GuardianController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GuardianController.java @@ -82,6 +82,13 @@ public class GuardianController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -193,13 +200,6 @@ public class GuardianController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GuardianElderController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GuardianElderController.java index 09691b17a..f9fd6ab14 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GuardianElderController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/GuardianElderController.java @@ -82,6 +82,13 @@ public class GuardianElderController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -193,13 +200,6 @@ public class GuardianElderController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HoglinController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HoglinController.java index 3e9030ad0..3cf1f6b09 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HoglinController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HoglinController.java @@ -70,6 +70,13 @@ public class HoglinController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -184,13 +191,6 @@ public class HoglinController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseController.java index 8012bc9ee..8a72f0e80 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseController.java @@ -85,6 +85,13 @@ public class HorseController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -232,13 +239,6 @@ public class HorseController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseDonkeyController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseDonkeyController.java index 32c1b7448..c63edaa52 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseDonkeyController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseDonkeyController.java @@ -87,6 +87,13 @@ public class HorseDonkeyController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -234,13 +241,6 @@ public class HorseDonkeyController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseMuleController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseMuleController.java index c9ca42a34..453718f7e 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseMuleController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseMuleController.java @@ -87,6 +87,13 @@ public class HorseMuleController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -234,13 +241,6 @@ public class HorseMuleController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseSkeletonController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseSkeletonController.java index 4b9e457eb..d38f28b4e 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseSkeletonController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseSkeletonController.java @@ -86,6 +86,13 @@ public class HorseSkeletonController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -233,13 +240,6 @@ public class HorseSkeletonController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseZombieController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseZombieController.java index 1a797568e..76eb753eb 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseZombieController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/HorseZombieController.java @@ -87,6 +87,13 @@ public class HorseZombieController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -234,13 +241,6 @@ public class HorseZombieController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/IllusionerController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/IllusionerController.java index 8bd0df668..3c396c5cc 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/IllusionerController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/IllusionerController.java @@ -67,6 +67,13 @@ public class IllusionerController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -178,13 +185,6 @@ public class IllusionerController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/IronGolemController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/IronGolemController.java index a8eb515fa..c2e50984a 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/IronGolemController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/IronGolemController.java @@ -67,6 +67,13 @@ public class IronGolemController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -187,13 +194,6 @@ public class IronGolemController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/LlamaController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/LlamaController.java index 9af49119d..96d19afeb 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/LlamaController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/LlamaController.java @@ -87,6 +87,13 @@ public class LlamaController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -234,13 +241,6 @@ public class LlamaController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/MagmaCubeController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/MagmaCubeController.java index 863ecdf38..ef0fe6689 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/MagmaCubeController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/MagmaCubeController.java @@ -77,6 +77,13 @@ public class MagmaCubeController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -195,13 +202,6 @@ public class MagmaCubeController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/MushroomCowController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/MushroomCowController.java index 8d55d4ea4..988b3bab5 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/MushroomCowController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/MushroomCowController.java @@ -71,6 +71,13 @@ public class MushroomCowController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -198,13 +205,6 @@ public class MushroomCowController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/OcelotController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/OcelotController.java index 20ef24fb5..bde0bf532 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/OcelotController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/OcelotController.java @@ -69,6 +69,13 @@ public class OcelotController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -194,13 +201,6 @@ public class OcelotController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PandaController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PandaController.java index 78f4de508..5973c8ef9 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PandaController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PandaController.java @@ -68,6 +68,13 @@ public class PandaController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -188,13 +195,6 @@ public class PandaController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ParrotController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ParrotController.java index fb1ce9c12..7115864c0 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ParrotController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ParrotController.java @@ -61,6 +61,13 @@ public class ParrotController extends MobEntityController { return super.canRide(entity); } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -169,13 +176,6 @@ public class ParrotController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { if (npc == null) diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PhantomController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PhantomController.java index 89eb0aff1..ddb8a9872 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PhantomController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PhantomController.java @@ -102,6 +102,13 @@ public class PhantomController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -225,13 +232,6 @@ public class PhantomController extends MobEntityController { return npc != null ? false : super.shouldDespawnInPeaceful(); } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PigController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PigController.java index 31cadf85a..154a7e300 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PigController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PigController.java @@ -70,6 +70,13 @@ public class PigController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -196,13 +203,6 @@ public class PigController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void thunderHit(ServerLevel worldserver, LightningBolt entitylightning) { if (npc == null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PigZombieController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PigZombieController.java index 0a28830e7..94585e882 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PigZombieController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PigZombieController.java @@ -67,6 +67,13 @@ public class PigZombieController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -178,13 +185,6 @@ public class PigZombieController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PiglinBruteController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PiglinBruteController.java index 1e9515385..d30975c23 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PiglinBruteController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PiglinBruteController.java @@ -67,6 +67,13 @@ public class PiglinBruteController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -181,13 +188,6 @@ public class PiglinBruteController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PiglinController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PiglinController.java index e4df64cd1..d9da8ef8b 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PiglinController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PiglinController.java @@ -72,6 +72,13 @@ public class PiglinController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -196,13 +203,6 @@ public class PiglinController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PillagerController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PillagerController.java index e44d1baa7..fc4c1f6be 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PillagerController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PillagerController.java @@ -68,6 +68,13 @@ public class PillagerController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -188,13 +195,6 @@ public class PillagerController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PolarBearController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PolarBearController.java index b9a2e245b..eece06fce 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PolarBearController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PolarBearController.java @@ -59,6 +59,13 @@ public class PolarBearController extends MobEntityController { return super.canRide(entity); } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -164,13 +171,6 @@ public class PolarBearController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { if (npc == null) diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PufferFishController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PufferFishController.java index 79a301eb6..eacf79386 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PufferFishController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/PufferFishController.java @@ -98,6 +98,13 @@ public class PufferFishController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -232,13 +239,6 @@ public class PufferFishController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/RabbitController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/RabbitController.java index 63fbce1d5..e244f7e16 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/RabbitController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/RabbitController.java @@ -69,6 +69,13 @@ public class RabbitController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -214,13 +221,6 @@ public class RabbitController extends MobEntityController { } } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/RavagerController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/RavagerController.java index 5236f09a4..e0565054c 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/RavagerController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/RavagerController.java @@ -68,6 +68,13 @@ public class RavagerController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -193,13 +200,6 @@ public class RavagerController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SalmonController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SalmonController.java index 0b801dc55..9cc417c27 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SalmonController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SalmonController.java @@ -92,6 +92,13 @@ public class SalmonController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -222,13 +229,6 @@ public class SalmonController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SheepController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SheepController.java index 7ae6510e6..3bc5b52a6 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SheepController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SheepController.java @@ -68,6 +68,13 @@ public class SheepController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -188,13 +195,6 @@ public class SheepController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ShulkerController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ShulkerController.java index 783f1f3d0..114ea4f25 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ShulkerController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ShulkerController.java @@ -75,6 +75,13 @@ public class ShulkerController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -196,13 +203,6 @@ public class ShulkerController extends MobEntityController { return npc == null || npc.useMinecraftAI() ? super.teleportSomewhere() : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SilverfishController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SilverfishController.java index 74ae26dc5..46dea4095 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SilverfishController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SilverfishController.java @@ -67,6 +67,13 @@ public class SilverfishController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -187,13 +194,6 @@ public class SilverfishController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SkeletonController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SkeletonController.java index 7fe1d1b8b..83cfefaae 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SkeletonController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SkeletonController.java @@ -67,6 +67,13 @@ public class SkeletonController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -187,13 +194,6 @@ public class SkeletonController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SkeletonStrayController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SkeletonStrayController.java index 894d54ff0..e018cc23c 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SkeletonStrayController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SkeletonStrayController.java @@ -67,6 +67,13 @@ public class SkeletonStrayController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -187,13 +194,6 @@ public class SkeletonStrayController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SkeletonWitherController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SkeletonWitherController.java index b939d5dac..f0ccf9aac 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SkeletonWitherController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SkeletonWitherController.java @@ -67,6 +67,13 @@ public class SkeletonWitherController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -187,13 +194,6 @@ public class SkeletonWitherController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SlimeController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SlimeController.java index cc16d48b0..e5870e472 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SlimeController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SlimeController.java @@ -79,6 +79,13 @@ public class SlimeController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -197,13 +204,6 @@ public class SlimeController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SnifferController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SnifferController.java index 24ff7b025..7496d0485 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SnifferController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SnifferController.java @@ -73,6 +73,13 @@ public class SnifferController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -203,13 +210,6 @@ public class SnifferController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SnowmanController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SnowmanController.java index f64b0a390..5a7c52e5e 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SnowmanController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SnowmanController.java @@ -67,6 +67,13 @@ public class SnowmanController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -187,13 +194,6 @@ public class SnowmanController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SpiderController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SpiderController.java index c5c46be36..1281f0962 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SpiderController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SpiderController.java @@ -67,6 +67,13 @@ public class SpiderController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -187,13 +194,6 @@ public class SpiderController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SquidController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SquidController.java index d37845271..7bf4dffb4 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SquidController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/SquidController.java @@ -67,6 +67,13 @@ public class SquidController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -187,13 +194,6 @@ public class SquidController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/StriderController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/StriderController.java index 4fc7288dd..8e926e1a9 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/StriderController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/StriderController.java @@ -67,6 +67,13 @@ public class StriderController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -178,13 +185,6 @@ public class StriderController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TadpoleController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TadpoleController.java index ce76f38ae..a08a3b95e 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TadpoleController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TadpoleController.java @@ -93,6 +93,13 @@ public class TadpoleController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -222,13 +229,6 @@ public class TadpoleController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TraderLlamaController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TraderLlamaController.java index 4dae2ee9f..1159835f1 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TraderLlamaController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TraderLlamaController.java @@ -80,6 +80,13 @@ public class TraderLlamaController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -206,13 +213,6 @@ public class TraderLlamaController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TropicalFishController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TropicalFishController.java index 61b0bdb93..c93044006 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TropicalFishController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TropicalFishController.java @@ -92,6 +92,13 @@ public class TropicalFishController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -224,13 +231,6 @@ public class TropicalFishController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TurtleController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TurtleController.java index d9c224ded..7b3afe159 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TurtleController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/TurtleController.java @@ -81,6 +81,13 @@ public class TurtleController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -200,13 +207,6 @@ public class TurtleController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/VexController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/VexController.java index 1c45bc2a3..c6e4e0bf0 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/VexController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/VexController.java @@ -61,6 +61,13 @@ public class VexController extends MobEntityController { return super.canRide(entity); } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -157,13 +164,6 @@ public class VexController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { if (npc == null) diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/VillagerController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/VillagerController.java index 985b4d909..e72dfc2fc 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/VillagerController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/VillagerController.java @@ -80,6 +80,13 @@ public class VillagerController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -226,13 +233,6 @@ public class VillagerController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void thunderHit(ServerLevel worldserver, LightningBolt entitylightning) { if (npc == null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/VindicatorController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/VindicatorController.java index d376fca32..6b7b2021d 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/VindicatorController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/VindicatorController.java @@ -68,6 +68,13 @@ public class VindicatorController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -188,13 +195,6 @@ public class VindicatorController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WanderingTraderController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WanderingTraderController.java index 22c4c584f..018faff50 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WanderingTraderController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WanderingTraderController.java @@ -78,6 +78,13 @@ public class WanderingTraderController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -230,13 +237,6 @@ public class WanderingTraderController extends MobEntityController { this.blockTrades = blocked; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void thunderHit(ServerLevel worldserver, LightningBolt entitylightning) { if (npc == null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WardenController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WardenController.java index f85ee0d71..52c11ba00 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WardenController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WardenController.java @@ -70,6 +70,13 @@ public class WardenController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -185,13 +192,6 @@ public class WardenController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WitchController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WitchController.java index 406a21860..ccf2a3709 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WitchController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WitchController.java @@ -67,6 +67,13 @@ public class WitchController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -187,13 +194,6 @@ public class WitchController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WitherController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WitherController.java index 0e709678b..ef409c022 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WitherController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WitherController.java @@ -58,6 +58,13 @@ public class WitherController extends MobEntityController { return super.canRide(entity); } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -169,13 +176,6 @@ public class WitherController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public boolean updateFluidHeightAndDoFluidPushing(TagKey tagkey, double d0) { if (npc == null) diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WolfController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WolfController.java index 8161b1cd9..2ab187525 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WolfController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/WolfController.java @@ -70,6 +70,13 @@ public class WolfController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -195,13 +202,6 @@ public class WolfController extends MobEntityController { return npc == null || this.equals(entityliving) ? super.setTarget(entityliving, reason, fire) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZoglinController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZoglinController.java index c9a524932..dc62c3f3d 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZoglinController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZoglinController.java @@ -67,6 +67,13 @@ public class ZoglinController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -180,13 +187,6 @@ public class ZoglinController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZombieController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZombieController.java index 1edf0c72c..0524cd684 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZombieController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZombieController.java @@ -67,6 +67,13 @@ public class ZombieController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -178,13 +185,6 @@ public class ZombieController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZombieHuskController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZombieHuskController.java index ae16a58aa..c533bf43a 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZombieHuskController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZombieHuskController.java @@ -67,6 +67,13 @@ public class ZombieHuskController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -178,13 +185,6 @@ public class ZombieHuskController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZombieVillagerController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZombieVillagerController.java index 2b9417922..d1d8e438b 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZombieVillagerController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ZombieVillagerController.java @@ -67,6 +67,13 @@ public class ZombieVillagerController extends MobEntityController { return false; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public void checkDespawn() { if (npc == null) { @@ -178,13 +185,6 @@ public class ZombieVillagerController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void travel(Vec3 vec3d) { if (npc == null || !npc.isFlyable()) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/AreaEffectCloudController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/AreaEffectCloudController.java index 846f3f841..7fae82308 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/AreaEffectCloudController.java @@ -53,6 +53,13 @@ public class AreaEffectCloudController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -97,13 +104,6 @@ public class AreaEffectCloudController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/BlockDisplayController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/BlockDisplayController.java index 0bd0a6f5f..656fd4d50 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/BlockDisplayController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/BlockDisplayController.java @@ -66,6 +66,14 @@ public class BlockDisplayController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -110,14 +118,6 @@ public class BlockDisplayController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/BoatController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/BoatController.java index f9153b6e1..7a9c49666 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/BoatController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/BoatController.java @@ -66,6 +66,13 @@ public class BoatController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -163,13 +170,6 @@ public class BoatController extends MobEntityController { return m; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/BreezeWindChargeController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/BreezeWindChargeController.java index c4ddb8720..d32692d7e 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/BreezeWindChargeController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/BreezeWindChargeController.java @@ -53,6 +53,13 @@ public class BreezeWindChargeController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -97,13 +104,6 @@ public class BreezeWindChargeController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ChestBoatController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ChestBoatController.java index 1cbc32d91..c25fd3c29 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ChestBoatController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ChestBoatController.java @@ -67,6 +67,13 @@ public class ChestBoatController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -164,13 +171,6 @@ public class ChestBoatController extends MobEntityController { return m; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/DragonFireballController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/DragonFireballController.java index 342d393ef..0a583a335 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/DragonFireballController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/DragonFireballController.java @@ -53,6 +53,13 @@ public class DragonFireballController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -106,13 +113,6 @@ public class DragonFireballController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EggController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EggController.java index e6eab0d1d..e3e9b036a 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EggController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EggController.java @@ -68,6 +68,13 @@ public class EggController extends AbstractEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -112,13 +119,6 @@ public class EggController extends AbstractEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EnderCrystalController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EnderCrystalController.java index a973f2178..015c20e90 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EnderCrystalController.java @@ -53,6 +53,13 @@ public class EnderCrystalController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -97,13 +104,6 @@ public class EnderCrystalController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EnderPearlController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EnderPearlController.java index 544fb72c1..a7b42d51a 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EnderPearlController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EnderPearlController.java @@ -54,6 +54,13 @@ public class EnderPearlController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -98,13 +105,6 @@ public class EnderPearlController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EvokerFangsController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EvokerFangsController.java index 664f3dbb5..1a297ab5f 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EvokerFangsController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EvokerFangsController.java @@ -51,6 +51,13 @@ public class EvokerFangsController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -105,13 +112,6 @@ public class EvokerFangsController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ExperienceOrbController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ExperienceOrbController.java index 3938d9104..9123e51dd 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ExperienceOrbController.java @@ -47,6 +47,13 @@ public class ExperienceOrbController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -91,13 +98,6 @@ public class ExperienceOrbController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EyeOfEnderController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EyeOfEnderController.java index ce77179b3..7bcbc6661 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EyeOfEnderController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/EyeOfEnderController.java @@ -54,6 +54,13 @@ public class EyeOfEnderController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -98,13 +105,6 @@ public class EyeOfEnderController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/FallingBlockController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/FallingBlockController.java index 459b3b5e0..3d7e1ed74 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/FallingBlockController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/FallingBlockController.java @@ -64,6 +64,13 @@ public class FallingBlockController extends AbstractEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -117,13 +124,6 @@ public class FallingBlockController extends AbstractEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/FireworkController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/FireworkController.java index eb0ed06b7..c4c46020c 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/FireworkController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/FireworkController.java @@ -48,6 +48,13 @@ public class FireworkController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -92,13 +99,6 @@ public class FireworkController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/FishingHookController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/FishingHookController.java index 8a5f20616..4ce48bb12 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/FishingHookController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/FishingHookController.java @@ -74,6 +74,13 @@ public class FishingHookController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public double distanceToSqr(Entity entity) { if (entity == getPlayerOwner()) @@ -125,13 +132,6 @@ public class FishingHookController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/InteractionController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/InteractionController.java index b3e522ac0..32bb19e6d 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/InteractionController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/InteractionController.java @@ -47,6 +47,13 @@ public class InteractionController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -91,13 +98,6 @@ public class InteractionController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ItemController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ItemController.java index 0c2d3410d..1edfa9487 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ItemController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ItemController.java @@ -60,6 +60,13 @@ public class ItemController extends AbstractEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -111,13 +118,6 @@ public class ItemController extends AbstractEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ItemDisplayController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ItemDisplayController.java index 6a1ba9dc7..c1e2e6787 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ItemDisplayController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ItemDisplayController.java @@ -60,6 +60,13 @@ public class ItemDisplayController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -104,13 +111,6 @@ public class ItemDisplayController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/LargeFireballController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/LargeFireballController.java index c8da83897..5a601ac35 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/LargeFireballController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/LargeFireballController.java @@ -47,6 +47,13 @@ public class LargeFireballController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -100,13 +107,6 @@ public class LargeFireballController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/LeashController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/LeashController.java index bb2e0c94c..8db399bb9 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/LeashController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/LeashController.java @@ -48,6 +48,13 @@ public class LeashController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -97,13 +104,6 @@ public class LeashController extends MobEntityController { return npc == null || !npc.isProtected() ? super.survives() : true; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/LlamaSpitController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/LlamaSpitController.java index 2a35e4ed3..549e84778 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/LlamaSpitController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/LlamaSpitController.java @@ -65,6 +65,13 @@ public class LlamaSpitController extends AbstractEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -109,13 +116,6 @@ public class LlamaSpitController extends AbstractEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MarkerController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MarkerController.java index 700a2328a..a03d7b33c 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MarkerController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MarkerController.java @@ -47,6 +47,13 @@ public class MarkerController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -91,13 +98,6 @@ public class MarkerController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartChestController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartChestController.java index 2431d0042..d46dc0f92 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartChestController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartChestController.java @@ -48,6 +48,13 @@ public class MinecartChestController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -92,13 +99,6 @@ public class MinecartChestController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartCommandController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartCommandController.java index 465c5f409..67ccd1787 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartCommandController.java @@ -48,6 +48,13 @@ public class MinecartCommandController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -92,13 +99,6 @@ public class MinecartCommandController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartFurnaceController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartFurnaceController.java index 57de0ffdc..bb3757228 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartFurnaceController.java @@ -48,6 +48,13 @@ public class MinecartFurnaceController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -92,13 +99,6 @@ public class MinecartFurnaceController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartHopperController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartHopperController.java index 88b6510cf..7e9f3e2c7 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartHopperController.java @@ -43,6 +43,13 @@ public class MinecartHopperController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public NPC getNPC() { return npc; @@ -79,13 +86,6 @@ public class MinecartHopperController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartRideableController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartRideableController.java index 22d32d6cb..2788f6a05 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartRideableController.java @@ -47,6 +47,13 @@ public class MinecartRideableController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -91,13 +98,6 @@ public class MinecartRideableController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartSpawnerController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartSpawnerController.java index ca5d295a4..b8358a334 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartSpawnerController.java @@ -43,6 +43,13 @@ public class MinecartSpawnerController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public NPC getNPC() { return npc; @@ -79,13 +86,6 @@ public class MinecartSpawnerController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/OminousItemSpawnerController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/OminousItemSpawnerController.java index 0e7ad278b..2c7b31942 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/OminousItemSpawnerController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/OminousItemSpawnerController.java @@ -59,6 +59,13 @@ public class OminousItemSpawnerController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -103,13 +110,6 @@ public class OminousItemSpawnerController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/PaintingController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/PaintingController.java index 518196c6a..0bba9bd7f 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/PaintingController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/PaintingController.java @@ -47,6 +47,13 @@ public class PaintingController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -96,13 +103,6 @@ public class PaintingController extends MobEntityController { return npc == null || !npc.isProtected() ? super.survives() : true; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ShulkerBulletController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ShulkerBulletController.java index cc693b2c3..3b1258eb8 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ShulkerBulletController.java @@ -47,6 +47,13 @@ public class ShulkerBulletController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -91,13 +98,6 @@ public class ShulkerBulletController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/SmallFireballController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/SmallFireballController.java index 9b467340b..847fd82dc 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/SmallFireballController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/SmallFireballController.java @@ -47,6 +47,13 @@ public class SmallFireballController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -91,13 +98,6 @@ public class SmallFireballController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/SnowballController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/SnowballController.java index 1034366d7..9e74f78c7 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/SnowballController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/SnowballController.java @@ -47,6 +47,13 @@ public class SnowballController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -91,13 +98,6 @@ public class SnowballController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/SpectralArrowController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/SpectralArrowController.java index 955393dc5..3a1eb116e 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/SpectralArrowController.java @@ -48,6 +48,13 @@ public class SpectralArrowController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -92,13 +99,6 @@ public class SpectralArrowController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/TNTPrimedController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/TNTPrimedController.java index 44f4614f1..065271f2a 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/TNTPrimedController.java @@ -48,6 +48,13 @@ public class TNTPrimedController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -92,13 +99,6 @@ public class TNTPrimedController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/TextDisplayController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/TextDisplayController.java index 9395bb7b2..1d76a37ab 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/TextDisplayController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/TextDisplayController.java @@ -47,6 +47,13 @@ public class TextDisplayController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -91,13 +98,6 @@ public class TextDisplayController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { super.tick(); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ThrownExpBottleController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ThrownExpBottleController.java index cb773e533..5371d01df 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ThrownExpBottleController.java @@ -48,6 +48,13 @@ public class ThrownExpBottleController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -92,13 +99,6 @@ public class ThrownExpBottleController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ThrownPotionController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ThrownPotionController.java index afb0bafef..14a3f16d0 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ThrownPotionController.java @@ -48,6 +48,13 @@ public class ThrownPotionController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -96,13 +103,6 @@ public class ThrownPotionController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ThrownTridentController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ThrownTridentController.java index 0ac2a7217..97ea7a3f2 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ThrownTridentController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ThrownTridentController.java @@ -48,6 +48,13 @@ public class ThrownTridentController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -92,13 +99,6 @@ public class ThrownTridentController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/TippedArrowController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/TippedArrowController.java index c6fc6c55d..a2a12d742 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/TippedArrowController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/TippedArrowController.java @@ -47,6 +47,13 @@ public class TippedArrowController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -91,13 +98,6 @@ public class TippedArrowController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/WindChargeController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/WindChargeController.java index b85c92c41..755e8f1c5 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/WindChargeController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/WindChargeController.java @@ -47,6 +47,13 @@ public class WindChargeController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -91,13 +98,6 @@ public class WindChargeController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/WitherSkullController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/WitherSkullController.java index 77683cded..b193014ad 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/WitherSkullController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/WitherSkullController.java @@ -47,6 +47,13 @@ public class WitherSkullController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public Entity changeDimension(DimensionTransition transition) { + if (npc == null) + return super.changeDimension(transition); + return NMSImpl.teleportAcrossWorld(this, transition); + } + @Override public CraftEntity getBukkitEntity() { if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) { @@ -91,13 +98,6 @@ public class WitherSkullController extends MobEntityController { return npc == null ? super.save(save) : false; } - @Override - public Entity changeDimension(DimensionTransition transition) { - if (npc == null) - return super.changeDimension(transition); - return NMSImpl.teleportAcrossWorld(this, transition); - } - @Override public void tick() { if (npc != null) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityMoveControl.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityMoveControl.java index f076811a8..95c5bfac1 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityMoveControl.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityMoveControl.java @@ -98,10 +98,9 @@ public class EntityMoveControl extends MoveControl { double dY = this.ty - this.entity.getY(); double dXZ = Math.sqrt(dX * dX + dZ * dZ); double dXYZ = Math.sqrt(dX * dX + dY * dY + dZ * dZ); - if (dXYZ < 2.500000277905201E-7) { + if (dXYZ < 2.500000277905201E-7) // this.entity.zza = 0.0F; return; - } if (dXZ > 0.4) { float f = (float) Math.toDegrees(Mth.atan2(dZ, dX)) - 90.0F; entity.setYRot(rotlerp(this.entity.getYRot(), f, 90.0F)); diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityNavigation.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityNavigation.java index c5fbb217d..4113f3bf5 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityNavigation.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityNavigation.java @@ -325,7 +325,7 @@ public class EntityNavigation extends PathNavigation { } protected boolean hasValidPathType(PathType var0) { - if ((var0 == PathType.WATER) || (var0 == PathType.LAVA)) + if (var0 == PathType.WATER || var0 == PathType.LAVA) return false; else return var0 != PathType.OPEN; diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityNodeEvaluator.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityNodeEvaluator.java index 888630575..887b951e3 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityNodeEvaluator.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityNodeEvaluator.java @@ -106,7 +106,8 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { } protected PathType getCachedPathType(int var0, int var1, int var2) { - return (PathType) this.pathTypesByPosCacheByMob.computeIfAbsent(BlockPos.asLong(var0, var1, var2), var3 -> this.getPathTypeOfMob(this.currentContext, var0, var1, var2, this.mob)); + return (PathType) this.pathTypesByPosCacheByMob.computeIfAbsent(BlockPos.asLong(var0, var1, var2), + var3 -> this.getPathTypeOfMob(this.currentContext, var0, var1, var2, this.mob)); } private Node getClosedNode(int var0, int var1, int var2, PathType var3) { @@ -325,7 +326,8 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { } private boolean hasCollisions(AABB var0) { - return this.collisionCache.computeIfAbsent(var0, var1 -> !this.currentContext.level().noCollision(this.mob, var0)); + return this.collisionCache.computeIfAbsent(var0, + var1 -> !this.currentContext.level().noCollision(this.mob, var0)); } protected boolean isAmphibious() { @@ -333,7 +335,7 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { } protected boolean isDiagonalValid(Node var0) { - if (((var0 == null) || var0.closed) || (var0.type == PathType.WALKABLE_DOOR)) + if (var0 == null || var0.closed || var0.type == PathType.WALKABLE_DOOR) return false; else return var0.costMalus >= 0.0F; @@ -401,7 +403,7 @@ public class EntityNodeEvaluator extends EntityNodeEvaluatorBase { Node var9 = this.findAcceptedNode(var0, var1 + 1, var2, var3 - 1, var4, var6, var7); if (var9 == null) return null; - else if ((this.mob.getBbWidth() >= 1.0F) || (var9.type != PathType.OPEN && var9.type != PathType.WALKABLE)) + else if (this.mob.getBbWidth() >= 1.0F || var9.type != PathType.OPEN && var9.type != PathType.WALKABLE) return var9; else { double var10 = var0 - var6.getStepX() + 0.5; diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityPathfinder.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityPathfinder.java index 877f148ff..7ac740d6d 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityPathfinder.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/EntityPathfinder.java @@ -46,7 +46,10 @@ public class EntityPathfinder extends PathFinder { if (var6 == null) return null; else { - Map var7 = var2.stream().collect(Collectors.toMap(var0x -> this.nodeEvaluator.getTarget(var0x.getX(), var0x.getY(), var0x.getZ()), Function.identity())); + Map var7 = var2.stream() + .collect(Collectors.toMap( + var0x -> this.nodeEvaluator.getTarget(var0x.getX(), var0x.getY(), var0x.getZ()), + Function.identity())); Path var8 = this.findPath(var0.getProfiler(), var6, var7, var3, var4, var5); this.nodeEvaluator.done(); return var8; @@ -61,7 +64,10 @@ public class EntityPathfinder extends PathFinder { if (var6 == null) return null; else { - Map var7 = var2.stream().collect(Collectors.toMap(var0x -> this.nodeEvaluator.getTarget(var0x.getX(), var0x.getY(), var0x.getZ()), Function.identity())); + Map var7 = var2.stream() + .collect(Collectors.toMap( + var0x -> this.nodeEvaluator.getTarget(var0x.getX(), var0x.getY(), var0x.getZ()), + Function.identity())); Path var8 = this.findPath(var0.getProfiler(), var6, var7, var3, var4, var5); this.nodeEvaluator.done(); return var8; @@ -100,7 +106,7 @@ public class EntityPathfinder extends PathFinder { if (!var9.isEmpty()) { break; } - if ((var11.distanceTo(var1) < range)) { + if (var11.distanceTo(var1) < range) { int var12 = this.nodeEvaluator.getNeighbors(this.neighbors, var11); for (int i = 0; i < var12; ++i) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/NMSImpl.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/NMSImpl.java index d4f55602d..8b919c7c9 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/NMSImpl.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/util/NMSImpl.java @@ -437,7 +437,7 @@ public class NMSImpl implements NMSBridge { (float) source.getAttributeValue(Attributes.ATTACK_KNOCKBACK)); if (k > 0) { target.knockback(k * 0.5F, Mth.sin(source.getYRot() * 0.017453292F), - (-Mth.cos(source.getYRot() * 0.017453292F)), source, KnockbackCause.ENTITY_ATTACK); + -Mth.cos(source.getYRot() * 0.017453292F), source, KnockbackCause.ENTITY_ATTACK); source.setDeltaMovement(source.getDeltaMovement().multiply(0.6, 1, 0.6)); } source.setLastHurtMob(target); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/ArmorStandController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/ArmorStandController.java index da18641f5..e7df85da8 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/ArmorStandController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/ArmorStandController.java @@ -73,6 +73,11 @@ public class ArmorStandController extends MobEntityController { return !event.isCancelled(); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/BatController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/BatController.java index f61d900fe..3b0a1a736 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/BatController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/BatController.java @@ -75,6 +75,11 @@ public class BatController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/BlazeController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/BlazeController.java index e80278b7d..cc07de5d0 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/BlazeController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/BlazeController.java @@ -72,6 +72,11 @@ public class BlazeController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/CaveSpiderController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/CaveSpiderController.java index 98e6ec410..899b9884b 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/CaveSpiderController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/CaveSpiderController.java @@ -81,6 +81,11 @@ public class CaveSpiderController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/ChickenController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/ChickenController.java index 34861a7ab..300f83a90 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/ChickenController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/ChickenController.java @@ -90,6 +90,11 @@ public class ChickenController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/CowController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/CowController.java index 985e7506c..a2037fddf 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/CowController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/CowController.java @@ -104,6 +104,11 @@ public class CowController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/CreeperController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/CreeperController.java index 4030689f8..62a1f5d9b 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/CreeperController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/CreeperController.java @@ -90,6 +90,11 @@ public class CreeperController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EnderDragonController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EnderDragonController.java index b09755db4..64d5fbf17 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EnderDragonController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EnderDragonController.java @@ -77,6 +77,11 @@ public class EnderDragonController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EndermanController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EndermanController.java index 0758290aa..685b2f0ea 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EndermanController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EndermanController.java @@ -81,6 +81,11 @@ public class EndermanController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EndermiteController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EndermiteController.java index bba68aabc..df00cf6f7 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EndermiteController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EndermiteController.java @@ -81,6 +81,11 @@ public class EndermiteController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EntityHumanNPC.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EntityHumanNPC.java index 4d9053901..c61894195 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EntityHumanNPC.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/EntityHumanNPC.java @@ -103,6 +103,11 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable : !npc.isProtected(); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override protected String bo() { return NMSImpl.getSoundEffect(npc, super.bo(), NPC.Metadata.HURT_SOUND); @@ -387,7 +392,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable for (int slot = 0; slot < 5; slot++) { ItemStack equipment = getEquipment(slot); ItemStack cache = equipmentCache.get(slot); - if (((cache != null) || (equipment != null)) + if ((cache != null || equipment != null) && (cache == null ^ equipment == null || !ItemStack.matches(cache, equipment))) { itemChanged = true; if (cache != null) { diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/GhastController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/GhastController.java index c70da7bbd..fef39d551 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/GhastController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/GhastController.java @@ -58,6 +58,11 @@ public class GhastController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/GiantController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/GiantController.java index 44787f170..d6d04e880 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/GiantController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/GiantController.java @@ -67,6 +67,11 @@ public class GiantController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/GuardianController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/GuardianController.java index e808c1d05..00d3d1ac0 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/GuardianController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/GuardianController.java @@ -67,6 +67,11 @@ public class GuardianController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/HorseController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/HorseController.java index 069cd38aa..49994e829 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/HorseController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/HorseController.java @@ -48,6 +48,7 @@ public class HorseController extends MobEntityController { private double baseMovementSpeed; private final CitizensNPC npc; + private boolean riding; public EntityHorseNPC(World world) { @@ -95,6 +96,11 @@ public class HorseController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/IronGolemController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/IronGolemController.java index 8ea3540c7..c31664f77 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/IronGolemController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/IronGolemController.java @@ -67,6 +67,11 @@ public class IronGolemController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/MagmaCubeController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/MagmaCubeController.java index c361a83b6..6dca521fd 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/MagmaCubeController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/MagmaCubeController.java @@ -73,6 +73,11 @@ public class MagmaCubeController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/MushroomCowController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/MushroomCowController.java index 4216a62eb..64d7e6940 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/MushroomCowController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/MushroomCowController.java @@ -84,6 +84,11 @@ public class MushroomCowController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/OcelotController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/OcelotController.java index 196525b08..53fead836 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/OcelotController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/OcelotController.java @@ -76,6 +76,11 @@ public class OcelotController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/PigController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/PigController.java index 43fcf98f2..e039e7c3b 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/PigController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/PigController.java @@ -77,6 +77,11 @@ public class PigController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/PigZombieController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/PigZombieController.java index 1132c7381..52aec569d 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/PigZombieController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/PigZombieController.java @@ -67,6 +67,11 @@ public class PigZombieController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/RabbitController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/RabbitController.java index 4c629701d..10b86d4e8 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/RabbitController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/RabbitController.java @@ -77,6 +77,11 @@ public class RabbitController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SheepController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SheepController.java index 3e56419e9..f9ba02b07 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SheepController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SheepController.java @@ -76,6 +76,11 @@ public class SheepController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SilverfishController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SilverfishController.java index 4835fbbe1..c2b84cb29 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SilverfishController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SilverfishController.java @@ -67,6 +67,11 @@ public class SilverfishController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SkeletonController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SkeletonController.java index a758380ab..f71c0cab2 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SkeletonController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SkeletonController.java @@ -67,6 +67,11 @@ public class SkeletonController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SlimeController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SlimeController.java index 0d3300f70..d225a771a 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SlimeController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SlimeController.java @@ -73,6 +73,11 @@ public class SlimeController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SnowmanController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SnowmanController.java index a3f258c39..69adf490c 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SnowmanController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SnowmanController.java @@ -67,6 +67,11 @@ public class SnowmanController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SpiderController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SpiderController.java index 58ae0ce64..6e061c328 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SpiderController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SpiderController.java @@ -67,6 +67,11 @@ public class SpiderController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SquidController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SquidController.java index 9f400b653..3d6ff94e9 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SquidController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/SquidController.java @@ -67,6 +67,11 @@ public class SquidController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/VillagerController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/VillagerController.java index 0d0648ce1..1097e3a88 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/VillagerController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/VillagerController.java @@ -88,6 +88,11 @@ public class VillagerController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/WitchController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/WitchController.java index 17c07714e..4c56ad124 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/WitchController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/WitchController.java @@ -67,6 +67,11 @@ public class WitchController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/WitherController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/WitherController.java index afe73c7d9..4a84f9add 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/WitherController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/WitherController.java @@ -58,6 +58,11 @@ public class WitherController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/WolfController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/WolfController.java index 5e00df43d..b7b9a3615 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/WolfController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/WolfController.java @@ -78,6 +78,11 @@ public class WolfController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/ZombieController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/ZombieController.java index b113c062d..af3c3ca95 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/ZombieController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/ZombieController.java @@ -67,6 +67,11 @@ public class ZombieController extends MobEntityController { return NMS.getFallDistance(npc, super.aE()); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public float bE() { return NMS.getJumpPower(npc, super.bE()); diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ArrowController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ArrowController.java index a7fb4106d..60be59aae 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ArrowController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ArrowController.java @@ -59,6 +59,11 @@ public class ArrowController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/BoatController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/BoatController.java index 808d5c8e4..7a3ae81e8 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/BoatController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/BoatController.java @@ -53,6 +53,7 @@ public class BoatController extends MobEntityController { public static class EntityBoatNPC extends EntityBoat implements NPCHolder { private double b; + private final CitizensNPC npc; public EntityBoatNPC(World world) { @@ -69,6 +70,11 @@ public class BoatController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EggController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EggController.java index ea2b90a0d..6ebef2095 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EggController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EggController.java @@ -75,6 +75,11 @@ public class EggController extends AbstractEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EnderCrystalController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EnderCrystalController.java index c47f04d84..f44e03854 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EnderCrystalController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EnderCrystalController.java @@ -59,6 +59,11 @@ public class EnderCrystalController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EnderPearlController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EnderPearlController.java index 2b21f1bc5..5bd30c6eb 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EnderPearlController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EnderPearlController.java @@ -59,6 +59,11 @@ public class EnderPearlController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EnderSignalController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EnderSignalController.java index 5f6cdea48..228f37884 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EnderSignalController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/EnderSignalController.java @@ -59,6 +59,11 @@ public class EnderSignalController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ExperienceOrbController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ExperienceOrbController.java index 1b154b54b..cecfe66bb 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ExperienceOrbController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ExperienceOrbController.java @@ -45,6 +45,11 @@ public class ExperienceOrbController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/FallingBlockController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/FallingBlockController.java index 59b1e31e0..896a1a4cd 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/FallingBlockController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/FallingBlockController.java @@ -67,6 +67,11 @@ public class FallingBlockController extends AbstractEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/FireworkController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/FireworkController.java index 91a1c685c..17abbf0f9 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/FireworkController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/FireworkController.java @@ -45,6 +45,11 @@ public class FireworkController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/FishingHookController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/FishingHookController.java index 02053806b..f53621e53 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/FishingHookController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/FishingHookController.java @@ -45,6 +45,11 @@ public class FishingHookController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ItemController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ItemController.java index 266a3f158..1c199f750 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ItemController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ItemController.java @@ -58,6 +58,11 @@ public class ItemController extends AbstractEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ItemFrameController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ItemFrameController.java index 6b212fb7d..9181a28a5 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ItemFrameController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ItemFrameController.java @@ -58,6 +58,11 @@ public class ItemFrameController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/LargeFireballController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/LargeFireballController.java index 03bd78aec..52e423fd5 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/LargeFireballController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/LargeFireballController.java @@ -46,6 +46,11 @@ public class LargeFireballController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/LeashController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/LeashController.java index 2fad0fe3c..16b1556fd 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/LeashController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/LeashController.java @@ -45,6 +45,11 @@ public class LeashController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartChestController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartChestController.java index 5451aab31..e521ba636 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartChestController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartChestController.java @@ -46,6 +46,11 @@ public class MinecartChestController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartCommandController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartCommandController.java index 81bdf4925..627f192ec 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartCommandController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartCommandController.java @@ -46,6 +46,11 @@ public class MinecartCommandController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartFurnaceController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartFurnaceController.java index e0c981b65..307f884cf 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartFurnaceController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartFurnaceController.java @@ -46,6 +46,11 @@ public class MinecartFurnaceController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartHopperController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartHopperController.java index cec319a79..5f232e900 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartHopperController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartHopperController.java @@ -42,6 +42,11 @@ public class MinecartHopperController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartRideableController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartRideableController.java index 06af690f2..68e98b15a 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartRideableController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartRideableController.java @@ -46,6 +46,11 @@ public class MinecartRideableController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartSpawnerController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartSpawnerController.java index d5c906186..b1ffbd49a 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartSpawnerController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartSpawnerController.java @@ -42,6 +42,11 @@ public class MinecartSpawnerController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartTNTController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartTNTController.java index d844710ff..c2e06a602 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartTNTController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/MinecartTNTController.java @@ -42,6 +42,11 @@ public class MinecartTNTController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/PaintingController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/PaintingController.java index 5cb6f16f0..dd69116f6 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/PaintingController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/PaintingController.java @@ -45,6 +45,11 @@ public class PaintingController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/SmallFireballController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/SmallFireballController.java index 635e9faa9..ade813c8c 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/SmallFireballController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/SmallFireballController.java @@ -45,6 +45,11 @@ public class SmallFireballController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/SnowballController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/SnowballController.java index 02a5262d4..a6e8da085 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/SnowballController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/SnowballController.java @@ -45,6 +45,11 @@ public class SnowballController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/SplashPotionController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/SplashPotionController.java index a969d4d50..850472b86 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/SplashPotionController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/SplashPotionController.java @@ -45,6 +45,11 @@ public class SplashPotionController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/TNTPrimedController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/TNTPrimedController.java index 32148b729..721afe92c 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/TNTPrimedController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/TNTPrimedController.java @@ -45,6 +45,11 @@ public class TNTPrimedController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ThrownExpBottleController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ThrownExpBottleController.java index 75e87bd75..97f747273 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ThrownExpBottleController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/ThrownExpBottleController.java @@ -45,6 +45,11 @@ public class ThrownExpBottleController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/WitherSkullController.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/WitherSkullController.java index 005e6532e..6fb658827 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/WitherSkullController.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/entity/nonliving/WitherSkullController.java @@ -45,6 +45,11 @@ public class WitherSkullController extends MobEntityController { super.a(NMSBoundingBox.makeBB(npc, bb)); } + @Override + public boolean aL() { + return npc == null ? super.aL() : npc.isPushableByFluids(); + } + @Override public void collide(net.minecraft.server.v1_8_R3.Entity entity) { // this method is called by both the entities involved - cancelling diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/PlayerlistTrackerEntry.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/PlayerlistTrackerEntry.java index 13d2c4455..bfd525578 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/PlayerlistTrackerEntry.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/PlayerlistTrackerEntry.java @@ -4,9 +4,11 @@ import java.lang.invoke.MethodHandle; import java.lang.reflect.Field; import java.util.Map; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import org.bukkit.Bukkit; +import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer; import com.google.common.collect.ForwardingMap; import com.google.common.collect.ForwardingSet; @@ -49,7 +51,7 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { @Override public Boolean remove(Object conn) { Boolean removed = super.remove(conn); - if (removed == true) { + if (removed) { Bukkit.getPluginManager().callEvent(new NPCUnlinkFromPlayerEvent( ((NPCHolder) tracker).getNPC(), ((EntityPlayer) conn).getBukkitEntity())); } @@ -161,10 +163,9 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } else { - return tracker.trackedPlayers.stream().map(p -> p.getBukkitEntity()).collect(Collectors.toSet()); - } + return delegate.keySet().stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); + } else + return tracker.trackedPlayers.stream().map((Function) EntityPlayer::getBukkitEntity).collect(Collectors.toSet()); } private static boolean getU(EntityTrackerEntry entry) {