From efb590c45bd4ce4a1b94acace03ebc277cb5ec63 Mon Sep 17 00:00:00 2001 From: fullwall Date: Mon, 26 Aug 2024 01:02:07 +0800 Subject: [PATCH] Make tracker replacement more durable at the cost of adding a custom filter to all entity classes. Also fixes early player tracker replacement in 1.20.6 and above --- .../main/java/net/citizensnpcs/npc/CitizensNPC.java | 12 +++--------- main/src/main/java/net/citizensnpcs/util/NMS.java | 13 ++++++++----- .../nms/v1_10_R1/entity/ArmorStandController.java | 7 +++++++ .../nms/v1_10_R1/entity/BatController.java | 6 ++++++ .../nms/v1_10_R1/entity/BlazeController.java | 6 ++++++ .../nms/v1_10_R1/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_10_R1/entity/ChickenController.java | 6 ++++++ .../nms/v1_10_R1/entity/CowController.java | 6 ++++++ .../nms/v1_10_R1/entity/CreeperController.java | 6 ++++++ .../nms/v1_10_R1/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_10_R1/entity/EndermanController.java | 6 ++++++ .../nms/v1_10_R1/entity/EndermiteController.java | 6 ++++++ .../nms/v1_10_R1/entity/EntityHumanNPC.java | 11 ++--------- .../nms/v1_10_R1/entity/GhastController.java | 6 ++++++ .../nms/v1_10_R1/entity/GiantController.java | 6 ++++++ .../nms/v1_10_R1/entity/GuardianController.java | 6 ++++++ .../nms/v1_10_R1/entity/HorseController.java | 7 +++++++ .../nms/v1_10_R1/entity/IronGolemController.java | 6 ++++++ .../nms/v1_10_R1/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_10_R1/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_10_R1/entity/OcelotController.java | 6 ++++++ .../nms/v1_10_R1/entity/PigController.java | 6 ++++++ .../nms/v1_10_R1/entity/PigZombieController.java | 6 ++++++ .../nms/v1_10_R1/entity/PolarBearController.java | 6 ++++++ .../nms/v1_10_R1/entity/RabbitController.java | 6 ++++++ .../nms/v1_10_R1/entity/SheepController.java | 6 ++++++ .../nms/v1_10_R1/entity/ShulkerController.java | 6 ++++++ .../nms/v1_10_R1/entity/SilverfishController.java | 6 ++++++ .../nms/v1_10_R1/entity/SkeletonController.java | 6 ++++++ .../nms/v1_10_R1/entity/SlimeController.java | 6 ++++++ .../nms/v1_10_R1/entity/SnowmanController.java | 6 ++++++ .../nms/v1_10_R1/entity/SpiderController.java | 6 ++++++ .../nms/v1_10_R1/entity/SquidController.java | 6 ++++++ .../nms/v1_10_R1/entity/VillagerController.java | 6 ++++++ .../nms/v1_10_R1/entity/WitchController.java | 6 ++++++ .../nms/v1_10_R1/entity/WitherController.java | 6 ++++++ .../nms/v1_10_R1/entity/WolfController.java | 6 ++++++ .../nms/v1_10_R1/entity/ZombieController.java | 6 ++++++ .../entity/nonliving/AreaEffectCloudController.java | 7 +++++++ .../v1_10_R1/entity/nonliving/BoatController.java | 7 +++++++ .../entity/nonliving/DragonFireballController.java | 7 +++++++ .../v1_10_R1/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EnderSignalController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 7 +++++++ .../v1_10_R1/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_10_R1/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/ShulkerBulletController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SpectralArrowController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/ThrownPotionController.java | 7 +++++++ .../entity/nonliving/TippedArrowController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../net/citizensnpcs/nms/v1_10_R1/util/NMSImpl.java | 3 --- .../nms/v1_10_R1/util/PlayerlistTrackerEntry.java | 4 +++- .../nms/v1_11_R1/entity/ArmorStandController.java | 7 +++++++ .../nms/v1_11_R1/entity/BatController.java | 6 ++++++ .../nms/v1_11_R1/entity/BlazeController.java | 6 ++++++ .../nms/v1_11_R1/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_11_R1/entity/ChickenController.java | 6 ++++++ .../nms/v1_11_R1/entity/CowController.java | 6 ++++++ .../nms/v1_11_R1/entity/CreeperController.java | 6 ++++++ .../nms/v1_11_R1/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_11_R1/entity/EndermanController.java | 6 ++++++ .../nms/v1_11_R1/entity/EndermiteController.java | 6 ++++++ .../nms/v1_11_R1/entity/EntityHumanNPC.java | 11 ++--------- .../nms/v1_11_R1/entity/EvokerController.java | 6 ++++++ .../nms/v1_11_R1/entity/GhastController.java | 6 ++++++ .../nms/v1_11_R1/entity/GiantController.java | 6 ++++++ .../nms/v1_11_R1/entity/GuardianController.java | 6 ++++++ .../v1_11_R1/entity/GuardianElderController.java | 6 ++++++ .../nms/v1_11_R1/entity/HorseController.java | 7 +++++++ .../nms/v1_11_R1/entity/HorseDonkeyController.java | 7 +++++++ .../nms/v1_11_R1/entity/HorseMuleController.java | 7 +++++++ .../v1_11_R1/entity/HorseSkeletonController.java | 7 +++++++ .../nms/v1_11_R1/entity/HorseZombieController.java | 7 +++++++ .../nms/v1_11_R1/entity/IronGolemController.java | 6 ++++++ .../nms/v1_11_R1/entity/LlamaController.java | 6 ++++++ .../nms/v1_11_R1/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_11_R1/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_11_R1/entity/OcelotController.java | 6 ++++++ .../nms/v1_11_R1/entity/PigController.java | 6 ++++++ .../nms/v1_11_R1/entity/PigZombieController.java | 6 ++++++ .../nms/v1_11_R1/entity/PolarBearController.java | 6 ++++++ .../nms/v1_11_R1/entity/RabbitController.java | 6 ++++++ .../nms/v1_11_R1/entity/SheepController.java | 6 ++++++ .../nms/v1_11_R1/entity/ShulkerController.java | 6 ++++++ .../nms/v1_11_R1/entity/SilverfishController.java | 6 ++++++ .../nms/v1_11_R1/entity/SkeletonController.java | 6 ++++++ .../v1_11_R1/entity/SkeletonStrayController.java | 6 ++++++ .../v1_11_R1/entity/SkeletonWitherController.java | 6 ++++++ .../nms/v1_11_R1/entity/SlimeController.java | 6 ++++++ .../nms/v1_11_R1/entity/SnowmanController.java | 6 ++++++ .../nms/v1_11_R1/entity/SpiderController.java | 6 ++++++ .../nms/v1_11_R1/entity/SquidController.java | 6 ++++++ .../nms/v1_11_R1/entity/VexController.java | 6 ++++++ .../nms/v1_11_R1/entity/VillagerController.java | 6 ++++++ .../nms/v1_11_R1/entity/VindicatorController.java | 6 ++++++ .../nms/v1_11_R1/entity/WitchController.java | 6 ++++++ .../nms/v1_11_R1/entity/WitherController.java | 6 ++++++ .../nms/v1_11_R1/entity/WolfController.java | 6 ++++++ .../nms/v1_11_R1/entity/ZombieController.java | 6 ++++++ .../nms/v1_11_R1/entity/ZombieHuskController.java | 6 ++++++ .../v1_11_R1/entity/ZombieVillagerController.java | 6 ++++++ .../entity/nonliving/AreaEffectCloudController.java | 7 +++++++ .../v1_11_R1/entity/nonliving/BoatController.java | 7 +++++++ .../entity/nonliving/DragonFireballController.java | 7 +++++++ .../v1_11_R1/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EnderSignalController.java | 7 +++++++ .../entity/nonliving/EvokerFangsController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 7 +++++++ .../v1_11_R1/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_11_R1/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/LlamaSpitController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/ShulkerBulletController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SpectralArrowController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/ThrownPotionController.java | 7 +++++++ .../entity/nonliving/TippedArrowController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../net/citizensnpcs/nms/v1_11_R1/util/NMSImpl.java | 3 --- .../nms/v1_11_R1/util/PlayerlistTrackerEntry.java | 8 ++++++-- .../nms/v1_12_R1/entity/ArmorStandController.java | 7 +++++++ .../nms/v1_12_R1/entity/BatController.java | 6 ++++++ .../nms/v1_12_R1/entity/BlazeController.java | 6 ++++++ .../nms/v1_12_R1/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_12_R1/entity/ChickenController.java | 6 ++++++ .../nms/v1_12_R1/entity/CowController.java | 6 ++++++ .../nms/v1_12_R1/entity/CreeperController.java | 6 ++++++ .../nms/v1_12_R1/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_12_R1/entity/EndermanController.java | 6 ++++++ .../nms/v1_12_R1/entity/EndermiteController.java | 6 ++++++ .../nms/v1_12_R1/entity/EntityHumanNPC.java | 12 ++---------- .../nms/v1_12_R1/entity/EvokerController.java | 6 ++++++ .../nms/v1_12_R1/entity/GhastController.java | 6 ++++++ .../nms/v1_12_R1/entity/GiantController.java | 6 ++++++ .../nms/v1_12_R1/entity/GuardianController.java | 6 ++++++ .../v1_12_R1/entity/GuardianElderController.java | 6 ++++++ .../nms/v1_12_R1/entity/HorseController.java | 7 +++++++ .../nms/v1_12_R1/entity/HorseDonkeyController.java | 7 +++++++ .../nms/v1_12_R1/entity/HorseMuleController.java | 7 +++++++ .../v1_12_R1/entity/HorseSkeletonController.java | 7 +++++++ .../nms/v1_12_R1/entity/HorseZombieController.java | 7 +++++++ .../nms/v1_12_R1/entity/IllusionerController.java | 6 ++++++ .../nms/v1_12_R1/entity/IronGolemController.java | 6 ++++++ .../nms/v1_12_R1/entity/LlamaController.java | 6 ++++++ .../nms/v1_12_R1/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_12_R1/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_12_R1/entity/OcelotController.java | 6 ++++++ .../nms/v1_12_R1/entity/ParrotController.java | 6 ++++++ .../nms/v1_12_R1/entity/PigController.java | 6 ++++++ .../nms/v1_12_R1/entity/PigZombieController.java | 6 ++++++ .../nms/v1_12_R1/entity/PolarBearController.java | 6 ++++++ .../nms/v1_12_R1/entity/RabbitController.java | 6 ++++++ .../nms/v1_12_R1/entity/SheepController.java | 6 ++++++ .../nms/v1_12_R1/entity/ShulkerController.java | 6 ++++++ .../nms/v1_12_R1/entity/SilverfishController.java | 6 ++++++ .../nms/v1_12_R1/entity/SkeletonController.java | 6 ++++++ .../v1_12_R1/entity/SkeletonStrayController.java | 6 ++++++ .../v1_12_R1/entity/SkeletonWitherController.java | 6 ++++++ .../nms/v1_12_R1/entity/SlimeController.java | 6 ++++++ .../nms/v1_12_R1/entity/SnowmanController.java | 6 ++++++ .../nms/v1_12_R1/entity/SpiderController.java | 6 ++++++ .../nms/v1_12_R1/entity/SquidController.java | 6 ++++++ .../nms/v1_12_R1/entity/VexController.java | 6 ++++++ .../nms/v1_12_R1/entity/VillagerController.java | 6 ++++++ .../nms/v1_12_R1/entity/VindicatorController.java | 6 ++++++ .../nms/v1_12_R1/entity/WitchController.java | 6 ++++++ .../nms/v1_12_R1/entity/WitherController.java | 6 ++++++ .../nms/v1_12_R1/entity/WolfController.java | 6 ++++++ .../nms/v1_12_R1/entity/ZombieController.java | 6 ++++++ .../nms/v1_12_R1/entity/ZombieHuskController.java | 6 ++++++ .../v1_12_R1/entity/ZombieVillagerController.java | 6 ++++++ .../entity/nonliving/AreaEffectCloudController.java | 7 +++++++ .../v1_12_R1/entity/nonliving/BoatController.java | 7 +++++++ .../entity/nonliving/DragonFireballController.java | 7 +++++++ .../v1_12_R1/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EnderSignalController.java | 7 +++++++ .../entity/nonliving/EvokerFangsController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 7 +++++++ .../v1_12_R1/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_12_R1/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/LlamaSpitController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/ShulkerBulletController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SpectralArrowController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/ThrownPotionController.java | 7 +++++++ .../entity/nonliving/TippedArrowController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../net/citizensnpcs/nms/v1_12_R1/util/NMSImpl.java | 3 --- .../nms/v1_12_R1/util/PlayerlistTrackerEntry.java | 8 ++++++-- .../nms/v1_13_R2/entity/ArmorStandController.java | 7 +++++++ .../nms/v1_13_R2/entity/BatController.java | 6 ++++++ .../nms/v1_13_R2/entity/BlazeController.java | 6 ++++++ .../nms/v1_13_R2/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_13_R2/entity/ChickenController.java | 6 ++++++ .../nms/v1_13_R2/entity/CodController.java | 6 ++++++ .../nms/v1_13_R2/entity/CowController.java | 6 ++++++ .../nms/v1_13_R2/entity/CreeperController.java | 6 ++++++ .../nms/v1_13_R2/entity/DolphinController.java | 6 ++++++ .../nms/v1_13_R2/entity/DrownedController.java | 6 ++++++ .../nms/v1_13_R2/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_13_R2/entity/EndermanController.java | 6 ++++++ .../nms/v1_13_R2/entity/EndermiteController.java | 6 ++++++ .../nms/v1_13_R2/entity/EntityHumanNPC.java | 12 ++---------- .../nms/v1_13_R2/entity/EvokerController.java | 6 ++++++ .../nms/v1_13_R2/entity/GhastController.java | 6 ++++++ .../nms/v1_13_R2/entity/GiantController.java | 6 ++++++ .../nms/v1_13_R2/entity/GuardianController.java | 6 ++++++ .../v1_13_R2/entity/GuardianElderController.java | 6 ++++++ .../nms/v1_13_R2/entity/HorseController.java | 6 ++++++ .../nms/v1_13_R2/entity/HorseDonkeyController.java | 6 ++++++ .../nms/v1_13_R2/entity/HorseMuleController.java | 6 ++++++ .../v1_13_R2/entity/HorseSkeletonController.java | 6 ++++++ .../nms/v1_13_R2/entity/HorseZombieController.java | 6 ++++++ .../nms/v1_13_R2/entity/IllusionerController.java | 6 ++++++ .../nms/v1_13_R2/entity/IronGolemController.java | 6 ++++++ .../nms/v1_13_R2/entity/LlamaController.java | 6 ++++++ .../nms/v1_13_R2/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_13_R2/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_13_R2/entity/OcelotController.java | 6 ++++++ .../nms/v1_13_R2/entity/ParrotController.java | 6 ++++++ .../nms/v1_13_R2/entity/PhantomController.java | 6 ++++++ .../nms/v1_13_R2/entity/PigController.java | 6 ++++++ .../nms/v1_13_R2/entity/PigZombieController.java | 6 ++++++ .../nms/v1_13_R2/entity/PolarBearController.java | 6 ++++++ .../nms/v1_13_R2/entity/PufferFishController.java | 6 ++++++ .../nms/v1_13_R2/entity/RabbitController.java | 6 ++++++ .../nms/v1_13_R2/entity/SalmonController.java | 6 ++++++ .../nms/v1_13_R2/entity/SheepController.java | 6 ++++++ .../nms/v1_13_R2/entity/ShulkerController.java | 6 ++++++ .../nms/v1_13_R2/entity/SilverfishController.java | 6 ++++++ .../nms/v1_13_R2/entity/SkeletonController.java | 6 ++++++ .../v1_13_R2/entity/SkeletonStrayController.java | 6 ++++++ .../v1_13_R2/entity/SkeletonWitherController.java | 6 ++++++ .../nms/v1_13_R2/entity/SlimeController.java | 6 ++++++ .../nms/v1_13_R2/entity/SnowmanController.java | 6 ++++++ .../nms/v1_13_R2/entity/SpiderController.java | 6 ++++++ .../nms/v1_13_R2/entity/SquidController.java | 6 ++++++ .../nms/v1_13_R2/entity/TropicalFishController.java | 6 ++++++ .../nms/v1_13_R2/entity/TurtleController.java | 6 ++++++ .../nms/v1_13_R2/entity/VexController.java | 6 ++++++ .../nms/v1_13_R2/entity/VillagerController.java | 6 ++++++ .../nms/v1_13_R2/entity/VindicatorController.java | 6 ++++++ .../nms/v1_13_R2/entity/WitchController.java | 6 ++++++ .../nms/v1_13_R2/entity/WitherController.java | 6 ++++++ .../nms/v1_13_R2/entity/WolfController.java | 6 ++++++ .../nms/v1_13_R2/entity/ZombieController.java | 6 ++++++ .../nms/v1_13_R2/entity/ZombieHuskController.java | 6 ++++++ .../v1_13_R2/entity/ZombieVillagerController.java | 6 ++++++ .../entity/nonliving/AreaEffectCloudController.java | 7 +++++++ .../v1_13_R2/entity/nonliving/BoatController.java | 7 +++++++ .../entity/nonliving/DragonFireballController.java | 7 +++++++ .../v1_13_R2/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EnderSignalController.java | 7 +++++++ .../entity/nonliving/EvokerFangsController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 6 ++++++ .../v1_13_R2/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_13_R2/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/LlamaSpitController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/ShulkerBulletController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SpectralArrowController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/ThrownPotionController.java | 7 +++++++ .../entity/nonliving/ThrownTridentController.java | 7 +++++++ .../entity/nonliving/TippedArrowController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../net/citizensnpcs/nms/v1_13_R2/util/NMSImpl.java | 3 --- .../nms/v1_13_R2/util/PlayerlistTrackerEntry.java | 8 ++++++-- .../nms/v1_14_R1/entity/ArmorStandController.java | 6 ++++++ .../nms/v1_14_R1/entity/BatController.java | 6 ++++++ .../nms/v1_14_R1/entity/BlazeController.java | 6 ++++++ .../nms/v1_14_R1/entity/CatController.java | 6 ++++++ .../nms/v1_14_R1/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_14_R1/entity/ChickenController.java | 6 ++++++ .../nms/v1_14_R1/entity/CodController.java | 6 ++++++ .../nms/v1_14_R1/entity/CowController.java | 6 ++++++ .../nms/v1_14_R1/entity/CreeperController.java | 6 ++++++ .../nms/v1_14_R1/entity/DolphinController.java | 6 ++++++ .../nms/v1_14_R1/entity/DrownedController.java | 6 ++++++ .../nms/v1_14_R1/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_14_R1/entity/EndermanController.java | 6 ++++++ .../nms/v1_14_R1/entity/EndermiteController.java | 6 ++++++ .../nms/v1_14_R1/entity/EntityHumanNPC.java | 12 ++---------- .../nms/v1_14_R1/entity/EvokerController.java | 6 ++++++ .../nms/v1_14_R1/entity/FoxController.java | 6 ++++++ .../nms/v1_14_R1/entity/GhastController.java | 6 ++++++ .../nms/v1_14_R1/entity/GiantController.java | 6 ++++++ .../nms/v1_14_R1/entity/GuardianController.java | 6 ++++++ .../v1_14_R1/entity/GuardianElderController.java | 6 ++++++ .../nms/v1_14_R1/entity/HorseController.java | 6 ++++++ .../nms/v1_14_R1/entity/HorseDonkeyController.java | 6 ++++++ .../nms/v1_14_R1/entity/HorseMuleController.java | 6 ++++++ .../v1_14_R1/entity/HorseSkeletonController.java | 6 ++++++ .../nms/v1_14_R1/entity/HorseZombieController.java | 6 ++++++ .../nms/v1_14_R1/entity/IllusionerController.java | 6 ++++++ .../nms/v1_14_R1/entity/IronGolemController.java | 6 ++++++ .../nms/v1_14_R1/entity/LlamaController.java | 6 ++++++ .../nms/v1_14_R1/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_14_R1/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_14_R1/entity/OcelotController.java | 6 ++++++ .../nms/v1_14_R1/entity/PandaController.java | 6 ++++++ .../nms/v1_14_R1/entity/ParrotController.java | 6 ++++++ .../nms/v1_14_R1/entity/PhantomController.java | 6 ++++++ .../nms/v1_14_R1/entity/PigController.java | 6 ++++++ .../nms/v1_14_R1/entity/PigZombieController.java | 6 ++++++ .../nms/v1_14_R1/entity/PillagerController.java | 6 ++++++ .../nms/v1_14_R1/entity/PolarBearController.java | 6 ++++++ .../nms/v1_14_R1/entity/PufferFishController.java | 6 ++++++ .../nms/v1_14_R1/entity/RabbitController.java | 6 ++++++ .../nms/v1_14_R1/entity/RavagerController.java | 6 ++++++ .../nms/v1_14_R1/entity/SalmonController.java | 6 ++++++ .../nms/v1_14_R1/entity/SheepController.java | 6 ++++++ .../nms/v1_14_R1/entity/ShulkerController.java | 6 ++++++ .../nms/v1_14_R1/entity/SilverfishController.java | 6 ++++++ .../nms/v1_14_R1/entity/SkeletonController.java | 6 ++++++ .../v1_14_R1/entity/SkeletonStrayController.java | 6 ++++++ .../v1_14_R1/entity/SkeletonWitherController.java | 6 ++++++ .../nms/v1_14_R1/entity/SlimeController.java | 6 ++++++ .../nms/v1_14_R1/entity/SnowmanController.java | 6 ++++++ .../nms/v1_14_R1/entity/SpiderController.java | 6 ++++++ .../nms/v1_14_R1/entity/SquidController.java | 6 ++++++ .../nms/v1_14_R1/entity/TraderLlamaController.java | 6 ++++++ .../nms/v1_14_R1/entity/TropicalFishController.java | 6 ++++++ .../nms/v1_14_R1/entity/TurtleController.java | 6 ++++++ .../nms/v1_14_R1/entity/VexController.java | 6 ++++++ .../nms/v1_14_R1/entity/VillagerController.java | 6 ++++++ .../nms/v1_14_R1/entity/VindicatorController.java | 6 ++++++ .../v1_14_R1/entity/WanderingTraderController.java | 6 ++++++ .../nms/v1_14_R1/entity/WitchController.java | 6 ++++++ .../nms/v1_14_R1/entity/WitherController.java | 6 ++++++ .../nms/v1_14_R1/entity/WolfController.java | 6 ++++++ .../nms/v1_14_R1/entity/ZombieController.java | 6 ++++++ .../nms/v1_14_R1/entity/ZombieHuskController.java | 6 ++++++ .../v1_14_R1/entity/ZombieVillagerController.java | 6 ++++++ .../entity/nonliving/AreaEffectCloudController.java | 7 +++++++ .../v1_14_R1/entity/nonliving/BoatController.java | 7 +++++++ .../entity/nonliving/DragonFireballController.java | 7 +++++++ .../v1_14_R1/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EnderSignalController.java | 7 +++++++ .../entity/nonliving/EvokerFangsController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 5 +++++ .../v1_14_R1/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_14_R1/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/LlamaSpitController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/ShulkerBulletController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SpectralArrowController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/ThrownPotionController.java | 7 +++++++ .../entity/nonliving/ThrownTridentController.java | 7 +++++++ .../entity/nonliving/TippedArrowController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java | 3 --- .../nms/v1_14_R1/util/PlayerNavigation.java | 2 +- .../nms/v1_14_R1/util/PlayerlistTracker.java | 8 ++++++-- .../nms/v1_15_R1/entity/ArmorStandController.java | 6 ++++++ .../nms/v1_15_R1/entity/BatController.java | 6 ++++++ .../nms/v1_15_R1/entity/BeeController.java | 6 ++++++ .../nms/v1_15_R1/entity/BlazeController.java | 6 ++++++ .../nms/v1_15_R1/entity/CatController.java | 6 ++++++ .../nms/v1_15_R1/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_15_R1/entity/ChickenController.java | 6 ++++++ .../nms/v1_15_R1/entity/CodController.java | 6 ++++++ .../nms/v1_15_R1/entity/CowController.java | 6 ++++++ .../nms/v1_15_R1/entity/CreeperController.java | 6 ++++++ .../nms/v1_15_R1/entity/DolphinController.java | 6 ++++++ .../nms/v1_15_R1/entity/DrownedController.java | 6 ++++++ .../nms/v1_15_R1/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_15_R1/entity/EndermanController.java | 6 ++++++ .../nms/v1_15_R1/entity/EndermiteController.java | 6 ++++++ .../nms/v1_15_R1/entity/EntityHumanNPC.java | 12 ++---------- .../nms/v1_15_R1/entity/EvokerController.java | 6 ++++++ .../nms/v1_15_R1/entity/FoxController.java | 6 ++++++ .../nms/v1_15_R1/entity/GhastController.java | 6 ++++++ .../nms/v1_15_R1/entity/GiantController.java | 6 ++++++ .../nms/v1_15_R1/entity/GuardianController.java | 6 ++++++ .../v1_15_R1/entity/GuardianElderController.java | 6 ++++++ .../nms/v1_15_R1/entity/HorseController.java | 6 ++++++ .../nms/v1_15_R1/entity/HorseDonkeyController.java | 6 ++++++ .../nms/v1_15_R1/entity/HorseMuleController.java | 6 ++++++ .../v1_15_R1/entity/HorseSkeletonController.java | 6 ++++++ .../nms/v1_15_R1/entity/HorseZombieController.java | 6 ++++++ .../nms/v1_15_R1/entity/IllusionerController.java | 6 ++++++ .../nms/v1_15_R1/entity/IronGolemController.java | 6 ++++++ .../nms/v1_15_R1/entity/LlamaController.java | 6 ++++++ .../nms/v1_15_R1/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_15_R1/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_15_R1/entity/OcelotController.java | 6 ++++++ .../nms/v1_15_R1/entity/PandaController.java | 6 ++++++ .../nms/v1_15_R1/entity/ParrotController.java | 6 ++++++ .../nms/v1_15_R1/entity/PhantomController.java | 6 ++++++ .../nms/v1_15_R1/entity/PigController.java | 6 ++++++ .../nms/v1_15_R1/entity/PigZombieController.java | 6 ++++++ .../nms/v1_15_R1/entity/PillagerController.java | 6 ++++++ .../nms/v1_15_R1/entity/PolarBearController.java | 6 ++++++ .../nms/v1_15_R1/entity/PufferFishController.java | 6 ++++++ .../nms/v1_15_R1/entity/RabbitController.java | 6 ++++++ .../nms/v1_15_R1/entity/RavagerController.java | 6 ++++++ .../nms/v1_15_R1/entity/SalmonController.java | 6 ++++++ .../nms/v1_15_R1/entity/SheepController.java | 6 ++++++ .../nms/v1_15_R1/entity/ShulkerController.java | 6 ++++++ .../nms/v1_15_R1/entity/SilverfishController.java | 6 ++++++ .../nms/v1_15_R1/entity/SkeletonController.java | 6 ++++++ .../v1_15_R1/entity/SkeletonStrayController.java | 6 ++++++ .../v1_15_R1/entity/SkeletonWitherController.java | 6 ++++++ .../nms/v1_15_R1/entity/SlimeController.java | 6 ++++++ .../nms/v1_15_R1/entity/SnowmanController.java | 6 ++++++ .../nms/v1_15_R1/entity/SpiderController.java | 6 ++++++ .../nms/v1_15_R1/entity/SquidController.java | 6 ++++++ .../nms/v1_15_R1/entity/TraderLlamaController.java | 6 ++++++ .../nms/v1_15_R1/entity/TropicalFishController.java | 6 ++++++ .../nms/v1_15_R1/entity/TurtleController.java | 6 ++++++ .../nms/v1_15_R1/entity/VexController.java | 6 ++++++ .../nms/v1_15_R1/entity/VillagerController.java | 6 ++++++ .../nms/v1_15_R1/entity/VindicatorController.java | 6 ++++++ .../v1_15_R1/entity/WanderingTraderController.java | 6 ++++++ .../nms/v1_15_R1/entity/WitchController.java | 6 ++++++ .../nms/v1_15_R1/entity/WitherController.java | 6 ++++++ .../nms/v1_15_R1/entity/WolfController.java | 6 ++++++ .../nms/v1_15_R1/entity/ZombieController.java | 6 ++++++ .../nms/v1_15_R1/entity/ZombieHuskController.java | 6 ++++++ .../v1_15_R1/entity/ZombieVillagerController.java | 6 ++++++ .../entity/nonliving/AreaEffectCloudController.java | 7 +++++++ .../v1_15_R1/entity/nonliving/BoatController.java | 7 +++++++ .../entity/nonliving/DragonFireballController.java | 7 +++++++ .../v1_15_R1/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EnderSignalController.java | 7 +++++++ .../entity/nonliving/EvokerFangsController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 5 +++++ .../v1_15_R1/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_15_R1/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/LlamaSpitController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/ShulkerBulletController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SpectralArrowController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/ThrownPotionController.java | 7 +++++++ .../entity/nonliving/ThrownTridentController.java | 7 +++++++ .../entity/nonliving/TippedArrowController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../net/citizensnpcs/nms/v1_15_R1/util/NMSImpl.java | 3 --- .../nms/v1_15_R1/util/PlayerNavigation.java | 2 +- .../nms/v1_15_R1/util/PlayerlistTracker.java | 8 ++++++-- .../nms/v1_16_R3/entity/ArmorStandController.java | 7 +++++++ .../nms/v1_16_R3/entity/BatController.java | 6 ++++++ .../nms/v1_16_R3/entity/BeeController.java | 6 ++++++ .../nms/v1_16_R3/entity/BlazeController.java | 6 ++++++ .../nms/v1_16_R3/entity/CatController.java | 6 ++++++ .../nms/v1_16_R3/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_16_R3/entity/ChickenController.java | 6 ++++++ .../nms/v1_16_R3/entity/CodController.java | 6 ++++++ .../nms/v1_16_R3/entity/CowController.java | 6 ++++++ .../nms/v1_16_R3/entity/CreeperController.java | 6 ++++++ .../nms/v1_16_R3/entity/DolphinController.java | 6 ++++++ .../nms/v1_16_R3/entity/DrownedController.java | 6 ++++++ .../nms/v1_16_R3/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_16_R3/entity/EndermanController.java | 6 ++++++ .../nms/v1_16_R3/entity/EndermiteController.java | 6 ++++++ .../nms/v1_16_R3/entity/EntityHumanNPC.java | 13 ++----------- .../nms/v1_16_R3/entity/EvokerController.java | 6 ++++++ .../nms/v1_16_R3/entity/FoxController.java | 6 ++++++ .../nms/v1_16_R3/entity/GhastController.java | 6 ++++++ .../nms/v1_16_R3/entity/GiantController.java | 6 ++++++ .../nms/v1_16_R3/entity/GuardianController.java | 6 ++++++ .../v1_16_R3/entity/GuardianElderController.java | 6 ++++++ .../nms/v1_16_R3/entity/HoglinController.java | 6 ++++++ .../nms/v1_16_R3/entity/HorseController.java | 6 ++++++ .../nms/v1_16_R3/entity/HorseDonkeyController.java | 6 ++++++ .../nms/v1_16_R3/entity/HorseMuleController.java | 6 ++++++ .../v1_16_R3/entity/HorseSkeletonController.java | 6 ++++++ .../nms/v1_16_R3/entity/HorseZombieController.java | 6 ++++++ .../nms/v1_16_R3/entity/IllusionerController.java | 6 ++++++ .../nms/v1_16_R3/entity/IronGolemController.java | 6 ++++++ .../nms/v1_16_R3/entity/LlamaController.java | 6 ++++++ .../nms/v1_16_R3/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_16_R3/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_16_R3/entity/OcelotController.java | 6 ++++++ .../nms/v1_16_R3/entity/PandaController.java | 6 ++++++ .../nms/v1_16_R3/entity/ParrotController.java | 6 ++++++ .../nms/v1_16_R3/entity/PhantomController.java | 6 ++++++ .../nms/v1_16_R3/entity/PigController.java | 6 ++++++ .../nms/v1_16_R3/entity/PigZombieController.java | 6 ++++++ .../nms/v1_16_R3/entity/PiglinBruteController.java | 6 ++++++ .../nms/v1_16_R3/entity/PiglinController.java | 6 ++++++ .../nms/v1_16_R3/entity/PillagerController.java | 6 ++++++ .../nms/v1_16_R3/entity/PolarBearController.java | 6 ++++++ .../nms/v1_16_R3/entity/PufferFishController.java | 6 ++++++ .../nms/v1_16_R3/entity/RabbitController.java | 6 ++++++ .../nms/v1_16_R3/entity/RavagerController.java | 6 ++++++ .../nms/v1_16_R3/entity/SalmonController.java | 6 ++++++ .../nms/v1_16_R3/entity/SheepController.java | 6 ++++++ .../nms/v1_16_R3/entity/ShulkerController.java | 6 ++++++ .../nms/v1_16_R3/entity/SilverfishController.java | 6 ++++++ .../nms/v1_16_R3/entity/SkeletonController.java | 6 ++++++ .../v1_16_R3/entity/SkeletonStrayController.java | 6 ++++++ .../v1_16_R3/entity/SkeletonWitherController.java | 6 ++++++ .../nms/v1_16_R3/entity/SlimeController.java | 6 ++++++ .../nms/v1_16_R3/entity/SnowmanController.java | 6 ++++++ .../nms/v1_16_R3/entity/SpiderController.java | 6 ++++++ .../nms/v1_16_R3/entity/SquidController.java | 6 ++++++ .../nms/v1_16_R3/entity/StriderController.java | 6 ++++++ .../nms/v1_16_R3/entity/TraderLlamaController.java | 6 ++++++ .../nms/v1_16_R3/entity/TropicalFishController.java | 6 ++++++ .../nms/v1_16_R3/entity/TurtleController.java | 6 ++++++ .../nms/v1_16_R3/entity/VexController.java | 6 ++++++ .../nms/v1_16_R3/entity/VillagerController.java | 6 ++++++ .../nms/v1_16_R3/entity/VindicatorController.java | 6 ++++++ .../v1_16_R3/entity/WanderingTraderController.java | 6 ++++++ .../nms/v1_16_R3/entity/WitchController.java | 6 ++++++ .../nms/v1_16_R3/entity/WitherController.java | 6 ++++++ .../nms/v1_16_R3/entity/WolfController.java | 6 ++++++ .../nms/v1_16_R3/entity/ZoglinController.java | 6 ++++++ .../nms/v1_16_R3/entity/ZombieController.java | 6 ++++++ .../nms/v1_16_R3/entity/ZombieHuskController.java | 6 ++++++ .../v1_16_R3/entity/ZombieVillagerController.java | 6 ++++++ .../entity/nonliving/AreaEffectCloudController.java | 7 +++++++ .../v1_16_R3/entity/nonliving/BoatController.java | 7 +++++++ .../entity/nonliving/DragonFireballController.java | 7 +++++++ .../v1_16_R3/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EnderSignalController.java | 7 +++++++ .../entity/nonliving/EvokerFangsController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 5 +++++ .../v1_16_R3/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_16_R3/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/LlamaSpitController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/ShulkerBulletController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SpectralArrowController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/ThrownPotionController.java | 7 +++++++ .../entity/nonliving/ThrownTridentController.java | 7 +++++++ .../entity/nonliving/TippedArrowController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java | 4 ---- .../nms/v1_16_R3/util/PlayerlistTracker.java | 8 ++++++-- .../nms/v1_17_R1/entity/ArmorStandController.java | 7 +++++++ .../nms/v1_17_R1/entity/AxolotlController.java | 6 ++++++ .../nms/v1_17_R1/entity/BatController.java | 6 ++++++ .../nms/v1_17_R1/entity/BeeController.java | 6 ++++++ .../nms/v1_17_R1/entity/BlazeController.java | 6 ++++++ .../nms/v1_17_R1/entity/CatController.java | 6 ++++++ .../nms/v1_17_R1/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_17_R1/entity/ChickenController.java | 6 ++++++ .../nms/v1_17_R1/entity/CodController.java | 6 ++++++ .../nms/v1_17_R1/entity/CowController.java | 6 ++++++ .../nms/v1_17_R1/entity/CreeperController.java | 6 ++++++ .../nms/v1_17_R1/entity/DolphinController.java | 6 ++++++ .../nms/v1_17_R1/entity/DrownedController.java | 6 ++++++ .../nms/v1_17_R1/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_17_R1/entity/EndermanController.java | 6 ++++++ .../nms/v1_17_R1/entity/EndermiteController.java | 6 ++++++ .../nms/v1_17_R1/entity/EntityHumanNPC.java | 12 ++---------- .../nms/v1_17_R1/entity/EvokerController.java | 6 ++++++ .../nms/v1_17_R1/entity/FoxController.java | 6 ++++++ .../nms/v1_17_R1/entity/GhastController.java | 6 ++++++ .../nms/v1_17_R1/entity/GiantController.java | 6 ++++++ .../nms/v1_17_R1/entity/GlowSquidController.java | 6 ++++++ .../nms/v1_17_R1/entity/GoatController.java | 6 ++++++ .../nms/v1_17_R1/entity/GuardianController.java | 6 ++++++ .../v1_17_R1/entity/GuardianElderController.java | 6 ++++++ .../nms/v1_17_R1/entity/HoglinController.java | 6 ++++++ .../nms/v1_17_R1/entity/HorseController.java | 6 ++++++ .../nms/v1_17_R1/entity/HorseDonkeyController.java | 6 ++++++ .../nms/v1_17_R1/entity/HorseMuleController.java | 6 ++++++ .../v1_17_R1/entity/HorseSkeletonController.java | 6 ++++++ .../nms/v1_17_R1/entity/HorseZombieController.java | 6 ++++++ .../nms/v1_17_R1/entity/IllusionerController.java | 6 ++++++ .../nms/v1_17_R1/entity/IronGolemController.java | 6 ++++++ .../nms/v1_17_R1/entity/LlamaController.java | 6 ++++++ .../nms/v1_17_R1/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_17_R1/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_17_R1/entity/OcelotController.java | 6 ++++++ .../nms/v1_17_R1/entity/PandaController.java | 6 ++++++ .../nms/v1_17_R1/entity/ParrotController.java | 6 ++++++ .../nms/v1_17_R1/entity/PhantomController.java | 6 ++++++ .../nms/v1_17_R1/entity/PigController.java | 6 ++++++ .../nms/v1_17_R1/entity/PigZombieController.java | 6 ++++++ .../nms/v1_17_R1/entity/PiglinBruteController.java | 6 ++++++ .../nms/v1_17_R1/entity/PiglinController.java | 6 ++++++ .../nms/v1_17_R1/entity/PillagerController.java | 6 ++++++ .../nms/v1_17_R1/entity/PolarBearController.java | 6 ++++++ .../nms/v1_17_R1/entity/PufferFishController.java | 6 ++++++ .../nms/v1_17_R1/entity/RabbitController.java | 6 ++++++ .../nms/v1_17_R1/entity/RavagerController.java | 6 ++++++ .../nms/v1_17_R1/entity/SalmonController.java | 6 ++++++ .../nms/v1_17_R1/entity/SheepController.java | 6 ++++++ .../nms/v1_17_R1/entity/ShulkerController.java | 6 ++++++ .../nms/v1_17_R1/entity/SilverfishController.java | 6 ++++++ .../nms/v1_17_R1/entity/SkeletonController.java | 6 ++++++ .../v1_17_R1/entity/SkeletonStrayController.java | 6 ++++++ .../v1_17_R1/entity/SkeletonWitherController.java | 6 ++++++ .../nms/v1_17_R1/entity/SlimeController.java | 6 ++++++ .../nms/v1_17_R1/entity/SnowmanController.java | 6 ++++++ .../nms/v1_17_R1/entity/SpiderController.java | 6 ++++++ .../nms/v1_17_R1/entity/SquidController.java | 6 ++++++ .../nms/v1_17_R1/entity/StriderController.java | 6 ++++++ .../nms/v1_17_R1/entity/TraderLlamaController.java | 6 ++++++ .../nms/v1_17_R1/entity/TropicalFishController.java | 6 ++++++ .../nms/v1_17_R1/entity/TurtleController.java | 6 ++++++ .../nms/v1_17_R1/entity/VexController.java | 6 ++++++ .../nms/v1_17_R1/entity/VillagerController.java | 6 ++++++ .../nms/v1_17_R1/entity/VindicatorController.java | 6 ++++++ .../v1_17_R1/entity/WanderingTraderController.java | 6 ++++++ .../nms/v1_17_R1/entity/WitchController.java | 6 ++++++ .../nms/v1_17_R1/entity/WitherController.java | 6 ++++++ .../nms/v1_17_R1/entity/WolfController.java | 6 ++++++ .../nms/v1_17_R1/entity/ZoglinController.java | 6 ++++++ .../nms/v1_17_R1/entity/ZombieController.java | 6 ++++++ .../nms/v1_17_R1/entity/ZombieHuskController.java | 6 ++++++ .../v1_17_R1/entity/ZombieVillagerController.java | 6 ++++++ .../entity/nonliving/AreaEffectCloudController.java | 7 +++++++ .../v1_17_R1/entity/nonliving/BoatController.java | 6 ++++++ .../entity/nonliving/DragonFireballController.java | 7 +++++++ .../v1_17_R1/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EnderSignalController.java | 7 +++++++ .../entity/nonliving/EvokerFangsController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 12 +++++++++--- .../entity/nonliving/GlowItemFrameController.java | 7 +++++++ .../v1_17_R1/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_17_R1/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/LlamaSpitController.java | 7 +++++++ .../v1_17_R1/entity/nonliving/MarkerController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/ShulkerBulletController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SpectralArrowController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/ThrownPotionController.java | 7 +++++++ .../entity/nonliving/ThrownTridentController.java | 7 +++++++ .../entity/nonliving/TippedArrowController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../net/citizensnpcs/nms/v1_17_R1/util/NMSImpl.java | 4 ---- .../nms/v1_18_R2/entity/ArmorStandController.java | 7 +++++++ .../nms/v1_18_R2/entity/AxolotlController.java | 6 ++++++ .../nms/v1_18_R2/entity/BatController.java | 6 ++++++ .../nms/v1_18_R2/entity/BeeController.java | 6 ++++++ .../nms/v1_18_R2/entity/BlazeController.java | 6 ++++++ .../nms/v1_18_R2/entity/CatController.java | 6 ++++++ .../nms/v1_18_R2/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_18_R2/entity/ChickenController.java | 6 ++++++ .../nms/v1_18_R2/entity/CodController.java | 6 ++++++ .../nms/v1_18_R2/entity/CowController.java | 6 ++++++ .../nms/v1_18_R2/entity/CreeperController.java | 6 ++++++ .../nms/v1_18_R2/entity/DolphinController.java | 6 ++++++ .../nms/v1_18_R2/entity/DrownedController.java | 6 ++++++ .../nms/v1_18_R2/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_18_R2/entity/EndermanController.java | 6 ++++++ .../nms/v1_18_R2/entity/EndermiteController.java | 6 ++++++ .../nms/v1_18_R2/entity/EntityHumanNPC.java | 12 ++---------- .../nms/v1_18_R2/entity/EvokerController.java | 6 ++++++ .../nms/v1_18_R2/entity/FoxController.java | 6 ++++++ .../nms/v1_18_R2/entity/GhastController.java | 6 ++++++ .../nms/v1_18_R2/entity/GiantController.java | 6 ++++++ .../nms/v1_18_R2/entity/GlowSquidController.java | 6 ++++++ .../nms/v1_18_R2/entity/GoatController.java | 6 ++++++ .../nms/v1_18_R2/entity/GuardianController.java | 6 ++++++ .../v1_18_R2/entity/GuardianElderController.java | 6 ++++++ .../nms/v1_18_R2/entity/HoglinController.java | 6 ++++++ .../nms/v1_18_R2/entity/HorseController.java | 6 ++++++ .../nms/v1_18_R2/entity/HorseDonkeyController.java | 6 ++++++ .../nms/v1_18_R2/entity/HorseMuleController.java | 6 ++++++ .../v1_18_R2/entity/HorseSkeletonController.java | 6 ++++++ .../nms/v1_18_R2/entity/HorseZombieController.java | 6 ++++++ .../nms/v1_18_R2/entity/IllusionerController.java | 6 ++++++ .../nms/v1_18_R2/entity/IronGolemController.java | 6 ++++++ .../nms/v1_18_R2/entity/LlamaController.java | 6 ++++++ .../nms/v1_18_R2/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_18_R2/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_18_R2/entity/OcelotController.java | 6 ++++++ .../nms/v1_18_R2/entity/PandaController.java | 6 ++++++ .../nms/v1_18_R2/entity/ParrotController.java | 6 ++++++ .../nms/v1_18_R2/entity/PhantomController.java | 6 ++++++ .../nms/v1_18_R2/entity/PigController.java | 6 ++++++ .../nms/v1_18_R2/entity/PigZombieController.java | 6 ++++++ .../nms/v1_18_R2/entity/PiglinBruteController.java | 6 ++++++ .../nms/v1_18_R2/entity/PiglinController.java | 6 ++++++ .../nms/v1_18_R2/entity/PillagerController.java | 6 ++++++ .../nms/v1_18_R2/entity/PolarBearController.java | 6 ++++++ .../nms/v1_18_R2/entity/PufferFishController.java | 6 ++++++ .../nms/v1_18_R2/entity/RabbitController.java | 6 ++++++ .../nms/v1_18_R2/entity/RavagerController.java | 6 ++++++ .../nms/v1_18_R2/entity/SalmonController.java | 6 ++++++ .../nms/v1_18_R2/entity/SheepController.java | 6 ++++++ .../nms/v1_18_R2/entity/ShulkerController.java | 6 ++++++ .../nms/v1_18_R2/entity/SilverfishController.java | 6 ++++++ .../nms/v1_18_R2/entity/SkeletonController.java | 6 ++++++ .../v1_18_R2/entity/SkeletonStrayController.java | 6 ++++++ .../v1_18_R2/entity/SkeletonWitherController.java | 6 ++++++ .../nms/v1_18_R2/entity/SlimeController.java | 6 ++++++ .../nms/v1_18_R2/entity/SnowmanController.java | 6 ++++++ .../nms/v1_18_R2/entity/SpiderController.java | 6 ++++++ .../nms/v1_18_R2/entity/SquidController.java | 6 ++++++ .../nms/v1_18_R2/entity/StriderController.java | 6 ++++++ .../nms/v1_18_R2/entity/TraderLlamaController.java | 6 ++++++ .../nms/v1_18_R2/entity/TropicalFishController.java | 6 ++++++ .../nms/v1_18_R2/entity/TurtleController.java | 6 ++++++ .../nms/v1_18_R2/entity/VexController.java | 6 ++++++ .../nms/v1_18_R2/entity/VillagerController.java | 6 ++++++ .../nms/v1_18_R2/entity/VindicatorController.java | 6 ++++++ .../v1_18_R2/entity/WanderingTraderController.java | 6 ++++++ .../nms/v1_18_R2/entity/WitchController.java | 6 ++++++ .../nms/v1_18_R2/entity/WitherController.java | 6 ++++++ .../nms/v1_18_R2/entity/WolfController.java | 6 ++++++ .../nms/v1_18_R2/entity/ZoglinController.java | 6 ++++++ .../nms/v1_18_R2/entity/ZombieController.java | 6 ++++++ .../nms/v1_18_R2/entity/ZombieHuskController.java | 6 ++++++ .../v1_18_R2/entity/ZombieVillagerController.java | 6 ++++++ .../entity/nonliving/AreaEffectCloudController.java | 7 +++++++ .../v1_18_R2/entity/nonliving/BoatController.java | 6 ++++++ .../entity/nonliving/DragonFireballController.java | 7 +++++++ .../v1_18_R2/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EnderSignalController.java | 7 +++++++ .../entity/nonliving/EvokerFangsController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 12 +++++++++--- .../entity/nonliving/GlowItemFrameController.java | 7 +++++++ .../v1_18_R2/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_18_R2/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/LlamaSpitController.java | 7 +++++++ .../v1_18_R2/entity/nonliving/MarkerController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/ShulkerBulletController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SpectralArrowController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/ThrownPotionController.java | 7 +++++++ .../entity/nonliving/ThrownTridentController.java | 7 +++++++ .../entity/nonliving/TippedArrowController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../nms/v1_18_R2/util/EntityNavigation.java | 2 +- .../net/citizensnpcs/nms/v1_18_R2/util/NMSImpl.java | 4 ---- .../nms/v1_19_R3/entity/AllayController.java | 6 ++++++ .../nms/v1_19_R3/entity/ArmorStandController.java | 7 +++++++ .../nms/v1_19_R3/entity/AxolotlController.java | 6 ++++++ .../nms/v1_19_R3/entity/BatController.java | 6 ++++++ .../nms/v1_19_R3/entity/BeeController.java | 6 ++++++ .../nms/v1_19_R3/entity/BlazeController.java | 6 ++++++ .../nms/v1_19_R3/entity/CamelController.java | 6 ++++++ .../nms/v1_19_R3/entity/CatController.java | 6 ++++++ .../nms/v1_19_R3/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_19_R3/entity/ChickenController.java | 6 ++++++ .../nms/v1_19_R3/entity/CodController.java | 6 ++++++ .../nms/v1_19_R3/entity/CowController.java | 6 ++++++ .../nms/v1_19_R3/entity/CreeperController.java | 6 ++++++ .../nms/v1_19_R3/entity/DolphinController.java | 6 ++++++ .../nms/v1_19_R3/entity/DrownedController.java | 6 ++++++ .../nms/v1_19_R3/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_19_R3/entity/EndermanController.java | 6 ++++++ .../nms/v1_19_R3/entity/EndermiteController.java | 6 ++++++ .../nms/v1_19_R3/entity/EntityHumanNPC.java | 5 +++++ .../nms/v1_19_R3/entity/EvokerController.java | 6 ++++++ .../nms/v1_19_R3/entity/FoxController.java | 6 ++++++ .../nms/v1_19_R3/entity/FrogController.java | 6 ++++++ .../nms/v1_19_R3/entity/GhastController.java | 6 ++++++ .../nms/v1_19_R3/entity/GiantController.java | 6 ++++++ .../nms/v1_19_R3/entity/GlowSquidController.java | 6 ++++++ .../nms/v1_19_R3/entity/GoatController.java | 6 ++++++ .../nms/v1_19_R3/entity/GuardianController.java | 6 ++++++ .../v1_19_R3/entity/GuardianElderController.java | 6 ++++++ .../nms/v1_19_R3/entity/HoglinController.java | 6 ++++++ .../nms/v1_19_R3/entity/HorseController.java | 6 ++++++ .../nms/v1_19_R3/entity/HorseDonkeyController.java | 6 ++++++ .../nms/v1_19_R3/entity/HorseMuleController.java | 6 ++++++ .../v1_19_R3/entity/HorseSkeletonController.java | 6 ++++++ .../nms/v1_19_R3/entity/HorseZombieController.java | 6 ++++++ .../nms/v1_19_R3/entity/IllusionerController.java | 6 ++++++ .../nms/v1_19_R3/entity/IronGolemController.java | 6 ++++++ .../nms/v1_19_R3/entity/LlamaController.java | 6 ++++++ .../nms/v1_19_R3/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_19_R3/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_19_R3/entity/OcelotController.java | 6 ++++++ .../nms/v1_19_R3/entity/PandaController.java | 6 ++++++ .../nms/v1_19_R3/entity/ParrotController.java | 6 ++++++ .../nms/v1_19_R3/entity/PhantomController.java | 6 ++++++ .../nms/v1_19_R3/entity/PigController.java | 6 ++++++ .../nms/v1_19_R3/entity/PigZombieController.java | 6 ++++++ .../nms/v1_19_R3/entity/PiglinBruteController.java | 6 ++++++ .../nms/v1_19_R3/entity/PiglinController.java | 6 ++++++ .../nms/v1_19_R3/entity/PillagerController.java | 6 ++++++ .../nms/v1_19_R3/entity/PolarBearController.java | 6 ++++++ .../nms/v1_19_R3/entity/PufferFishController.java | 6 ++++++ .../nms/v1_19_R3/entity/RabbitController.java | 6 ++++++ .../nms/v1_19_R3/entity/RavagerController.java | 6 ++++++ .../nms/v1_19_R3/entity/SalmonController.java | 6 ++++++ .../nms/v1_19_R3/entity/SheepController.java | 6 ++++++ .../nms/v1_19_R3/entity/ShulkerController.java | 6 ++++++ .../nms/v1_19_R3/entity/SilverfishController.java | 6 ++++++ .../nms/v1_19_R3/entity/SkeletonController.java | 6 ++++++ .../v1_19_R3/entity/SkeletonStrayController.java | 6 ++++++ .../v1_19_R3/entity/SkeletonWitherController.java | 6 ++++++ .../nms/v1_19_R3/entity/SlimeController.java | 6 ++++++ .../nms/v1_19_R3/entity/SnifferController.java | 6 ++++++ .../nms/v1_19_R3/entity/SnowmanController.java | 6 ++++++ .../nms/v1_19_R3/entity/SpiderController.java | 6 ++++++ .../nms/v1_19_R3/entity/SquidController.java | 6 ++++++ .../nms/v1_19_R3/entity/StriderController.java | 6 ++++++ .../nms/v1_19_R3/entity/TadpoleController.java | 6 ++++++ .../nms/v1_19_R3/entity/TraderLlamaController.java | 6 ++++++ .../nms/v1_19_R3/entity/TropicalFishController.java | 6 ++++++ .../nms/v1_19_R3/entity/TurtleController.java | 6 ++++++ .../nms/v1_19_R3/entity/VexController.java | 6 ++++++ .../nms/v1_19_R3/entity/VillagerController.java | 6 ++++++ .../nms/v1_19_R3/entity/VindicatorController.java | 6 ++++++ .../v1_19_R3/entity/WanderingTraderController.java | 6 ++++++ .../nms/v1_19_R3/entity/WardenController.java | 6 ++++++ .../nms/v1_19_R3/entity/WitchController.java | 6 ++++++ .../nms/v1_19_R3/entity/WitherController.java | 6 ++++++ .../nms/v1_19_R3/entity/WolfController.java | 6 ++++++ .../nms/v1_19_R3/entity/ZoglinController.java | 6 ++++++ .../nms/v1_19_R3/entity/ZombieController.java | 6 ++++++ .../nms/v1_19_R3/entity/ZombieHuskController.java | 6 ++++++ .../v1_19_R3/entity/ZombieVillagerController.java | 6 ++++++ .../entity/nonliving/AreaEffectCloudController.java | 7 +++++++ .../entity/nonliving/BlockDisplayController.java | 7 +++++++ .../v1_19_R3/entity/nonliving/BoatController.java | 6 ++++++ .../entity/nonliving/ChestBoatController.java | 6 ++++++ .../entity/nonliving/DragonFireballController.java | 7 +++++++ .../v1_19_R3/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EnderSignalController.java | 7 +++++++ .../entity/nonliving/EvokerFangsController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 6 ++++++ .../entity/nonliving/GlowItemFrameController.java | 7 +++++++ .../entity/nonliving/InteractionController.java | 7 +++++++ .../v1_19_R3/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemDisplayController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_19_R3/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/LlamaSpitController.java | 7 +++++++ .../v1_19_R3/entity/nonliving/MarkerController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/ShulkerBulletController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SpectralArrowController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/TextDisplayController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/ThrownPotionController.java | 7 +++++++ .../entity/nonliving/ThrownTridentController.java | 7 +++++++ .../entity/nonliving/TippedArrowController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../nms/v1_19_R3/util/EntityNavigation.java | 2 +- .../net/citizensnpcs/nms/v1_19_R3/util/NMSImpl.java | 10 +++++----- .../nms/v1_20_R4/entity/AllayController.java | 6 ++++++ .../nms/v1_20_R4/entity/ArmadilloController.java | 6 ++++++ .../nms/v1_20_R4/entity/ArmorStandController.java | 7 +++++++ .../nms/v1_20_R4/entity/AxolotlController.java | 6 ++++++ .../nms/v1_20_R4/entity/BatController.java | 6 ++++++ .../nms/v1_20_R4/entity/BeeController.java | 6 ++++++ .../nms/v1_20_R4/entity/BlazeController.java | 6 ++++++ .../nms/v1_20_R4/entity/BoggedController.java | 6 ++++++ .../nms/v1_20_R4/entity/BreezeController.java | 6 ++++++ .../nms/v1_20_R4/entity/CamelController.java | 6 ++++++ .../nms/v1_20_R4/entity/CatController.java | 6 ++++++ .../nms/v1_20_R4/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_20_R4/entity/ChickenController.java | 6 ++++++ .../nms/v1_20_R4/entity/CodController.java | 6 ++++++ .../nms/v1_20_R4/entity/CowController.java | 6 ++++++ .../nms/v1_20_R4/entity/CreeperController.java | 6 ++++++ .../nms/v1_20_R4/entity/DolphinController.java | 6 ++++++ .../nms/v1_20_R4/entity/DrownedController.java | 6 ++++++ .../nms/v1_20_R4/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_20_R4/entity/EndermanController.java | 6 ++++++ .../nms/v1_20_R4/entity/EndermiteController.java | 6 ++++++ .../nms/v1_20_R4/entity/EntityHumanNPC.java | 5 +++++ .../nms/v1_20_R4/entity/EvokerController.java | 6 ++++++ .../nms/v1_20_R4/entity/FoxController.java | 6 ++++++ .../nms/v1_20_R4/entity/FrogController.java | 6 ++++++ .../nms/v1_20_R4/entity/GhastController.java | 6 ++++++ .../nms/v1_20_R4/entity/GiantController.java | 6 ++++++ .../nms/v1_20_R4/entity/GlowSquidController.java | 6 ++++++ .../nms/v1_20_R4/entity/GoatController.java | 6 ++++++ .../nms/v1_20_R4/entity/GuardianController.java | 6 ++++++ .../v1_20_R4/entity/GuardianElderController.java | 6 ++++++ .../nms/v1_20_R4/entity/HoglinController.java | 6 ++++++ .../nms/v1_20_R4/entity/HorseController.java | 6 ++++++ .../nms/v1_20_R4/entity/HorseDonkeyController.java | 6 ++++++ .../nms/v1_20_R4/entity/HorseMuleController.java | 6 ++++++ .../v1_20_R4/entity/HorseSkeletonController.java | 6 ++++++ .../nms/v1_20_R4/entity/HorseZombieController.java | 6 ++++++ .../nms/v1_20_R4/entity/IllusionerController.java | 6 ++++++ .../nms/v1_20_R4/entity/IronGolemController.java | 6 ++++++ .../nms/v1_20_R4/entity/LlamaController.java | 6 ++++++ .../nms/v1_20_R4/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_20_R4/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_20_R4/entity/OcelotController.java | 6 ++++++ .../nms/v1_20_R4/entity/PandaController.java | 6 ++++++ .../nms/v1_20_R4/entity/ParrotController.java | 6 ++++++ .../nms/v1_20_R4/entity/PhantomController.java | 6 ++++++ .../nms/v1_20_R4/entity/PigController.java | 6 ++++++ .../nms/v1_20_R4/entity/PigZombieController.java | 6 ++++++ .../nms/v1_20_R4/entity/PiglinBruteController.java | 6 ++++++ .../nms/v1_20_R4/entity/PiglinController.java | 6 ++++++ .../nms/v1_20_R4/entity/PillagerController.java | 6 ++++++ .../nms/v1_20_R4/entity/PolarBearController.java | 6 ++++++ .../nms/v1_20_R4/entity/PufferFishController.java | 6 ++++++ .../nms/v1_20_R4/entity/RabbitController.java | 6 ++++++ .../nms/v1_20_R4/entity/RavagerController.java | 6 ++++++ .../nms/v1_20_R4/entity/SalmonController.java | 6 ++++++ .../nms/v1_20_R4/entity/SheepController.java | 6 ++++++ .../nms/v1_20_R4/entity/ShulkerController.java | 6 ++++++ .../nms/v1_20_R4/entity/SilverfishController.java | 6 ++++++ .../nms/v1_20_R4/entity/SkeletonController.java | 6 ++++++ .../v1_20_R4/entity/SkeletonStrayController.java | 6 ++++++ .../v1_20_R4/entity/SkeletonWitherController.java | 6 ++++++ .../nms/v1_20_R4/entity/SlimeController.java | 6 ++++++ .../nms/v1_20_R4/entity/SnifferController.java | 6 ++++++ .../nms/v1_20_R4/entity/SnowmanController.java | 6 ++++++ .../nms/v1_20_R4/entity/SpiderController.java | 6 ++++++ .../nms/v1_20_R4/entity/SquidController.java | 6 ++++++ .../nms/v1_20_R4/entity/StriderController.java | 6 ++++++ .../nms/v1_20_R4/entity/TadpoleController.java | 6 ++++++ .../nms/v1_20_R4/entity/TraderLlamaController.java | 6 ++++++ .../nms/v1_20_R4/entity/TropicalFishController.java | 6 ++++++ .../nms/v1_20_R4/entity/TurtleController.java | 6 ++++++ .../nms/v1_20_R4/entity/VexController.java | 6 ++++++ .../nms/v1_20_R4/entity/VillagerController.java | 6 ++++++ .../nms/v1_20_R4/entity/VindicatorController.java | 6 ++++++ .../v1_20_R4/entity/WanderingTraderController.java | 6 ++++++ .../nms/v1_20_R4/entity/WardenController.java | 6 ++++++ .../nms/v1_20_R4/entity/WitchController.java | 6 ++++++ .../nms/v1_20_R4/entity/WitherController.java | 6 ++++++ .../nms/v1_20_R4/entity/WolfController.java | 6 ++++++ .../nms/v1_20_R4/entity/ZoglinController.java | 6 ++++++ .../nms/v1_20_R4/entity/ZombieController.java | 6 ++++++ .../nms/v1_20_R4/entity/ZombieHuskController.java | 6 ++++++ .../v1_20_R4/entity/ZombieVillagerController.java | 6 ++++++ .../entity/nonliving/AreaEffectCloudController.java | 7 +++++++ .../entity/nonliving/BlockDisplayController.java | 7 +++++++ .../v1_20_R4/entity/nonliving/BoatController.java | 6 ++++++ .../nonliving/BreezeWindChargeController.java | 7 +++++++ .../entity/nonliving/ChestBoatController.java | 6 ++++++ .../entity/nonliving/DragonFireballController.java | 7 +++++++ .../v1_20_R4/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EvokerFangsController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/EyeOfEnderController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 6 ++++++ .../entity/nonliving/GlowItemFrameController.java | 7 +++++++ .../entity/nonliving/InteractionController.java | 7 +++++++ .../v1_20_R4/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemDisplayController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_20_R4/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/LlamaSpitController.java | 7 +++++++ .../v1_20_R4/entity/nonliving/MarkerController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../nonliving/OminousItemSpawnerController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/ShulkerBulletController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SpectralArrowController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/TextDisplayController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/ThrownPotionController.java | 7 +++++++ .../entity/nonliving/ThrownTridentController.java | 7 +++++++ .../entity/nonliving/TippedArrowController.java | 7 +++++++ .../entity/nonliving/WindChargeController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../nms/v1_20_R4/util/EntityNavigation.java | 2 +- .../nms/v1_20_R4/util/EntityNodeEvaluator.java | 10 ++++++---- .../nms/v1_20_R4/util/EntityPathfinder.java | 12 +++++++++--- .../nms/v1_21_R1/entity/AllayController.java | 6 ++++++ .../nms/v1_21_R1/entity/ArmadilloController.java | 6 ++++++ .../nms/v1_21_R1/entity/ArmorStandController.java | 7 +++++++ .../nms/v1_21_R1/entity/AxolotlController.java | 6 ++++++ .../nms/v1_21_R1/entity/BatController.java | 6 ++++++ .../nms/v1_21_R1/entity/BeeController.java | 6 ++++++ .../nms/v1_21_R1/entity/BlazeController.java | 6 ++++++ .../nms/v1_21_R1/entity/BoggedController.java | 6 ++++++ .../nms/v1_21_R1/entity/BreezeController.java | 6 ++++++ .../nms/v1_21_R1/entity/CamelController.java | 6 ++++++ .../nms/v1_21_R1/entity/CatController.java | 6 ++++++ .../nms/v1_21_R1/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_21_R1/entity/ChickenController.java | 6 ++++++ .../nms/v1_21_R1/entity/CodController.java | 6 ++++++ .../nms/v1_21_R1/entity/CowController.java | 6 ++++++ .../nms/v1_21_R1/entity/CreeperController.java | 6 ++++++ .../nms/v1_21_R1/entity/DolphinController.java | 6 ++++++ .../nms/v1_21_R1/entity/DrownedController.java | 6 ++++++ .../nms/v1_21_R1/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_21_R1/entity/EndermanController.java | 6 ++++++ .../nms/v1_21_R1/entity/EndermiteController.java | 6 ++++++ .../nms/v1_21_R1/entity/EntityHumanNPC.java | 5 +++++ .../nms/v1_21_R1/entity/EvokerController.java | 6 ++++++ .../nms/v1_21_R1/entity/FoxController.java | 6 ++++++ .../nms/v1_21_R1/entity/FrogController.java | 6 ++++++ .../nms/v1_21_R1/entity/GhastController.java | 6 ++++++ .../nms/v1_21_R1/entity/GiantController.java | 6 ++++++ .../nms/v1_21_R1/entity/GlowSquidController.java | 6 ++++++ .../nms/v1_21_R1/entity/GoatController.java | 6 ++++++ .../nms/v1_21_R1/entity/GuardianController.java | 6 ++++++ .../v1_21_R1/entity/GuardianElderController.java | 6 ++++++ .../nms/v1_21_R1/entity/HoglinController.java | 6 ++++++ .../nms/v1_21_R1/entity/HorseController.java | 6 ++++++ .../nms/v1_21_R1/entity/HorseDonkeyController.java | 6 ++++++ .../nms/v1_21_R1/entity/HorseMuleController.java | 6 ++++++ .../v1_21_R1/entity/HorseSkeletonController.java | 6 ++++++ .../nms/v1_21_R1/entity/HorseZombieController.java | 6 ++++++ .../nms/v1_21_R1/entity/IllusionerController.java | 6 ++++++ .../nms/v1_21_R1/entity/IronGolemController.java | 6 ++++++ .../nms/v1_21_R1/entity/LlamaController.java | 6 ++++++ .../nms/v1_21_R1/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_21_R1/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_21_R1/entity/OcelotController.java | 6 ++++++ .../nms/v1_21_R1/entity/PandaController.java | 6 ++++++ .../nms/v1_21_R1/entity/ParrotController.java | 6 ++++++ .../nms/v1_21_R1/entity/PhantomController.java | 6 ++++++ .../nms/v1_21_R1/entity/PigController.java | 6 ++++++ .../nms/v1_21_R1/entity/PigZombieController.java | 6 ++++++ .../nms/v1_21_R1/entity/PiglinBruteController.java | 6 ++++++ .../nms/v1_21_R1/entity/PiglinController.java | 6 ++++++ .../nms/v1_21_R1/entity/PillagerController.java | 6 ++++++ .../nms/v1_21_R1/entity/PolarBearController.java | 6 ++++++ .../nms/v1_21_R1/entity/PufferFishController.java | 6 ++++++ .../nms/v1_21_R1/entity/RabbitController.java | 6 ++++++ .../nms/v1_21_R1/entity/RavagerController.java | 6 ++++++ .../nms/v1_21_R1/entity/SalmonController.java | 6 ++++++ .../nms/v1_21_R1/entity/SheepController.java | 6 ++++++ .../nms/v1_21_R1/entity/ShulkerController.java | 6 ++++++ .../nms/v1_21_R1/entity/SilverfishController.java | 6 ++++++ .../nms/v1_21_R1/entity/SkeletonController.java | 6 ++++++ .../v1_21_R1/entity/SkeletonStrayController.java | 6 ++++++ .../v1_21_R1/entity/SkeletonWitherController.java | 6 ++++++ .../nms/v1_21_R1/entity/SlimeController.java | 6 ++++++ .../nms/v1_21_R1/entity/SnifferController.java | 6 ++++++ .../nms/v1_21_R1/entity/SnowmanController.java | 6 ++++++ .../nms/v1_21_R1/entity/SpiderController.java | 6 ++++++ .../nms/v1_21_R1/entity/SquidController.java | 6 ++++++ .../nms/v1_21_R1/entity/StriderController.java | 6 ++++++ .../nms/v1_21_R1/entity/TadpoleController.java | 6 ++++++ .../nms/v1_21_R1/entity/TraderLlamaController.java | 6 ++++++ .../nms/v1_21_R1/entity/TropicalFishController.java | 6 ++++++ .../nms/v1_21_R1/entity/TurtleController.java | 6 ++++++ .../nms/v1_21_R1/entity/VexController.java | 6 ++++++ .../nms/v1_21_R1/entity/VillagerController.java | 6 ++++++ .../nms/v1_21_R1/entity/VindicatorController.java | 6 ++++++ .../v1_21_R1/entity/WanderingTraderController.java | 6 ++++++ .../nms/v1_21_R1/entity/WardenController.java | 6 ++++++ .../nms/v1_21_R1/entity/WitchController.java | 6 ++++++ .../nms/v1_21_R1/entity/WitherController.java | 6 ++++++ .../nms/v1_21_R1/entity/WolfController.java | 6 ++++++ .../nms/v1_21_R1/entity/ZoglinController.java | 6 ++++++ .../nms/v1_21_R1/entity/ZombieController.java | 6 ++++++ .../nms/v1_21_R1/entity/ZombieHuskController.java | 6 ++++++ .../v1_21_R1/entity/ZombieVillagerController.java | 6 ++++++ .../entity/nonliving/AreaEffectCloudController.java | 7 +++++++ .../entity/nonliving/BlockDisplayController.java | 7 +++++++ .../v1_21_R1/entity/nonliving/BoatController.java | 10 ++++++++-- .../nonliving/BreezeWindChargeController.java | 7 +++++++ .../entity/nonliving/ChestBoatController.java | 6 ++++++ .../entity/nonliving/DragonFireballController.java | 7 +++++++ .../v1_21_R1/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EvokerFangsController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/EyeOfEnderController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 6 ++++++ .../entity/nonliving/GlowItemFrameController.java | 7 +++++++ .../entity/nonliving/InteractionController.java | 7 +++++++ .../v1_21_R1/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemDisplayController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_21_R1/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/LlamaSpitController.java | 7 +++++++ .../v1_21_R1/entity/nonliving/MarkerController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../nonliving/OminousItemSpawnerController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/ShulkerBulletController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SpectralArrowController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/TextDisplayController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/ThrownPotionController.java | 7 +++++++ .../entity/nonliving/ThrownTridentController.java | 7 +++++++ .../entity/nonliving/TippedArrowController.java | 7 +++++++ .../entity/nonliving/WindChargeController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../net/citizensnpcs/nms/v1_21_R1/util/NMSImpl.java | 4 ---- .../nms/v1_8_R3/entity/ArmorStandController.java | 7 +++++++ .../nms/v1_8_R3/entity/BatController.java | 6 ++++++ .../nms/v1_8_R3/entity/BlazeController.java | 6 ++++++ .../nms/v1_8_R3/entity/CaveSpiderController.java | 6 ++++++ .../nms/v1_8_R3/entity/ChickenController.java | 6 ++++++ .../nms/v1_8_R3/entity/CowController.java | 6 ++++++ .../nms/v1_8_R3/entity/CreeperController.java | 6 ++++++ .../nms/v1_8_R3/entity/EnderDragonController.java | 6 ++++++ .../nms/v1_8_R3/entity/EndermanController.java | 6 ++++++ .../nms/v1_8_R3/entity/EndermiteController.java | 6 ++++++ .../nms/v1_8_R3/entity/EntityHumanNPC.java | 13 +++---------- .../nms/v1_8_R3/entity/GhastController.java | 6 ++++++ .../nms/v1_8_R3/entity/GiantController.java | 6 ++++++ .../nms/v1_8_R3/entity/GuardianController.java | 6 ++++++ .../nms/v1_8_R3/entity/HorseController.java | 6 ++++++ .../nms/v1_8_R3/entity/IronGolemController.java | 6 ++++++ .../nms/v1_8_R3/entity/MagmaCubeController.java | 6 ++++++ .../nms/v1_8_R3/entity/MushroomCowController.java | 6 ++++++ .../nms/v1_8_R3/entity/OcelotController.java | 6 ++++++ .../nms/v1_8_R3/entity/PigController.java | 6 ++++++ .../nms/v1_8_R3/entity/PigZombieController.java | 6 ++++++ .../nms/v1_8_R3/entity/RabbitController.java | 6 ++++++ .../nms/v1_8_R3/entity/SheepController.java | 6 ++++++ .../nms/v1_8_R3/entity/SilverfishController.java | 6 ++++++ .../nms/v1_8_R3/entity/SkeletonController.java | 6 ++++++ .../nms/v1_8_R3/entity/SlimeController.java | 6 ++++++ .../nms/v1_8_R3/entity/SnowmanController.java | 6 ++++++ .../nms/v1_8_R3/entity/SpiderController.java | 6 ++++++ .../nms/v1_8_R3/entity/SquidController.java | 6 ++++++ .../nms/v1_8_R3/entity/VillagerController.java | 6 ++++++ .../nms/v1_8_R3/entity/WitchController.java | 6 ++++++ .../nms/v1_8_R3/entity/WitherController.java | 6 ++++++ .../nms/v1_8_R3/entity/WolfController.java | 6 ++++++ .../nms/v1_8_R3/entity/ZombieController.java | 6 ++++++ .../v1_8_R3/entity/nonliving/ArrowController.java | 7 +++++++ .../v1_8_R3/entity/nonliving/BoatController.java | 7 +++++++ .../nms/v1_8_R3/entity/nonliving/EggController.java | 7 +++++++ .../entity/nonliving/EnderCrystalController.java | 7 +++++++ .../entity/nonliving/EnderPearlController.java | 7 +++++++ .../entity/nonliving/EnderSignalController.java | 7 +++++++ .../entity/nonliving/ExperienceOrbController.java | 7 +++++++ .../entity/nonliving/FallingBlockController.java | 7 +++++++ .../entity/nonliving/FireworkController.java | 7 +++++++ .../entity/nonliving/FishingHookController.java | 7 +++++++ .../v1_8_R3/entity/nonliving/ItemController.java | 7 +++++++ .../entity/nonliving/ItemFrameController.java | 7 +++++++ .../entity/nonliving/LargeFireballController.java | 7 +++++++ .../v1_8_R3/entity/nonliving/LeashController.java | 7 +++++++ .../entity/nonliving/MinecartChestController.java | 7 +++++++ .../entity/nonliving/MinecartCommandController.java | 7 +++++++ .../entity/nonliving/MinecartFurnaceController.java | 7 +++++++ .../entity/nonliving/MinecartHopperController.java | 7 +++++++ .../nonliving/MinecartRideableController.java | 7 +++++++ .../entity/nonliving/MinecartSpawnerController.java | 7 +++++++ .../entity/nonliving/MinecartTNTController.java | 7 +++++++ .../entity/nonliving/PaintingController.java | 7 +++++++ .../entity/nonliving/SmallFireballController.java | 7 +++++++ .../entity/nonliving/SnowballController.java | 7 +++++++ .../entity/nonliving/SplashPotionController.java | 7 +++++++ .../entity/nonliving/TNTPrimedController.java | 7 +++++++ .../entity/nonliving/ThrownExpBottleController.java | 7 +++++++ .../entity/nonliving/WitherSkullController.java | 7 +++++++ .../net/citizensnpcs/nms/v1_8_R3/util/NMSImpl.java | 3 --- .../nms/v1_8_R3/util/PlayerlistTrackerEntry.java | 8 ++++++-- 1336 files changed, 8365 insertions(+), 190 deletions(-) diff --git a/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java b/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java index bdb2ced86..18b525cdb 100644 --- a/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java +++ b/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java @@ -55,7 +55,6 @@ import net.citizensnpcs.trait.SitTrait; import net.citizensnpcs.trait.SkinLayers; import net.citizensnpcs.trait.SneakTrait; import net.citizensnpcs.util.ChunkCoord; -import net.citizensnpcs.util.EntityPacketTracker; import net.citizensnpcs.util.Messages; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.PlayerAnimation; @@ -337,14 +336,8 @@ public class CitizensNPC extends AbstractNPC { Bukkit.getPluginManager().callEvent(new NPCNeedsRespawnEvent(this, at)); return false; } - // Spawning the entity will create an entity tracker that is not controlled by Citizens. This is fixed later in - // spawning; to avoid sending packets twice, try to hide the entity initially - EntityPacketTracker tracker = NMS.getPacketTrackerDirectly(getEntity()); - if (tracker != null) { - for (Player player : Bukkit.getServer().getOnlinePlayers()) { - tracker.unlink(player); - } - } + // Spawning the entity will initially create an entity tracker that is not controlled by Citizens + data().set(NPC.Metadata.NPC_SPAWNING_IN_PROGRESS, true); NMS.setLocationDirectly(getEntity(), at); NMS.setHeadAndBodyYaw(getEntity(), at.getYaw()); @@ -391,6 +384,7 @@ public class CitizensNPC extends AbstractNPC { } } NMS.replaceTracker(getEntity()); + data().remove(NPC.Metadata.NPC_SPAWNING_IN_PROGRESS); EntityType type = getEntity().getType(); if (type.isAlive()) { LivingEntity entity = (LivingEntity) getEntity(); diff --git a/main/src/main/java/net/citizensnpcs/util/NMS.java b/main/src/main/java/net/citizensnpcs/util/NMS.java index 94afd5ba6..336b5f4bc 100644 --- a/main/src/main/java/net/citizensnpcs/util/NMS.java +++ b/main/src/main/java/net/citizensnpcs/util/NMS.java @@ -161,15 +161,14 @@ public class NMS { return createPacketTracker(entity, new PacketAggregator()); } - /* - * Yggdrasil's default implementation of this method silently fails instead of throwing - * an Exception like it should. - */ - public static EntityPacketTracker createPacketTracker(Entity entity, PacketAggregator agg) { return BRIDGE.createPacketTracker(entity, agg); } + /* + * Yggdrasil's default implementation of this method silently fails instead of throwing + * an Exception like it should. + */ public static GameProfile fillProfileProperties(GameProfile profile, boolean requireSecure) throws Throwable { return BRIDGE.fillProfileProperties(profile, requireSecure); } @@ -962,6 +961,10 @@ public class NMS { BRIDGE.setWitherInvulnerableTicks(wither, ticks); } + public static boolean shouldBroadcastToPlayer(NPC npc, Supplier defaultResponse) { + return npc != null && npc.data().has(NPC.Metadata.NPC_SPAWNING_IN_PROGRESS) ? false : defaultResponse.get(); + } + public static boolean shouldJump(org.bukkit.entity.Entity entity) { return BRIDGE.shouldJump(entity); } 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 dde3cd44c..750f886e2 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ArmorStandController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/ArmorStandController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityArmorStand; import net.minecraft.server.v1_10_R1.EntityHuman; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EnumHand; import net.minecraft.server.v1_10_R1.EnumInteractionResult; import net.minecraft.server.v1_10_R1.ItemStack; @@ -50,6 +52,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityArmorStandNPC(World world) { 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 0b0a95ec5..437ebf8ac 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityBat; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; import net.minecraft.server.v1_10_R1.World; @@ -46,6 +47,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBatNPC(World world) { 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 a347edd41..53d7c23e0 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityBlaze; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; import net.minecraft.server.v1_10_R1.World; @@ -46,6 +47,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(World world) { 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 4b334fc9a..805ac120f 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityCaveSpider; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -48,6 +49,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(World world) { 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 106a01f03..0d2f31028 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityChicken; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -48,6 +49,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(World world) { 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 cba456c87..ba1753fd1 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityCow; import net.minecraft.server.v1_10_R1.EntityHuman; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EnumHand; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.ItemStack; @@ -52,6 +53,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCowNPC(World world) { 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 f77f8dda1..73bc8ae3a 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityCreeper; import net.minecraft.server.v1_10_R1.EntityHuman; import net.minecraft.server.v1_10_R1.EntityLightning; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EnumHand; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.ItemStack; @@ -52,6 +53,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean allowPowered; private final CitizensNPC npc; 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 76ca0095a..604e1914e 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 @@ -22,6 +22,7 @@ import net.minecraft.server.v1_10_R1.DamageSource; import net.minecraft.server.v1_10_R1.DragonControllerPhase; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityEnderDragon; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; import net.minecraft.server.v1_10_R1.Vec3D; @@ -52,6 +53,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(World world) { 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 41dc0fd86..6ec813c2d 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityEnderman; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -48,6 +49,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(World world) { 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 dd0675e2b..80b9a23bb 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityEndermite; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -48,6 +49,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(World world) { 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 668e17292..8227ede15 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 @@ -65,7 +65,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable private PlayerControllerJump controllerJump; private PlayerControllerMove controllerMove; private final Map equipmentCache = Maps.newEnumMap(EnumItemSlot.class); - private boolean isTracked = false; private int jumpTicks = 0; private PlayerNavigation navigation; private final CitizensNPC npc; @@ -94,10 +93,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable } @Override - public boolean a(EntityPlayer entityplayer) { - if (npc != null && !isTracked) - return false; - return super.a(entityplayer); + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); } public float a(PathType pathtype) { @@ -382,10 +379,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable npc.getOrAddTrait(SkinTrait.class).setSkinPersistent(skinName, signature, data); } - public void setTracked() { - isTracked = true; - } - public void updateAI() { controllerMove.c(); controllerJump.b(); 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 da0d127f9..eea38ab89 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityGhast; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; import net.minecraft.server.v1_10_R1.World; @@ -32,6 +33,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(World world) { 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 06437dbed..0d5080871 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityGiantZombie; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -34,6 +35,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(World world) { 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 a10672f88..d6a465f47 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityGuardian; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -34,6 +35,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(World world) { 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 085266308..e4c05b81f 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 @@ -23,6 +23,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityHorse; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.GenericAttributes; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -46,11 +47,17 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; + public EntityHorseNPC(World world) { this(world, null); } 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 0b934750f..59f822e17 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityIronGolem; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -34,6 +35,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(World world) { 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 ecf4a8f61..fc127da40 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityHuman; import net.minecraft.server.v1_10_R1.EntityMagmaCube; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -36,6 +37,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMagmaCubeNPC(World world) { 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 2ac279972..04e4e3edb 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityHuman; import net.minecraft.server.v1_10_R1.EntityMushroomCow; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EnumHand; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.ItemStack; @@ -37,6 +38,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(World world) { 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 8e9ca69ec..4989ba3c9 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityOcelot; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -34,6 +35,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(World world) { 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 1c80c2f3a..2cde38787 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityLightning; import net.minecraft.server.v1_10_R1.EntityPig; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -35,6 +36,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigNPC(World world) { 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 31eacfaa0..57f1544ba 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityPigZombie; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -34,6 +35,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(World world) { 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 7bc91b157..724f37db5 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.Entity; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityPolarBear; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -32,6 +33,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPolarBearNPC(World world) { 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 be91c5e4d..d7e61d33e 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityLiving; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityRabbit; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -35,6 +36,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(World world) { 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 2902bbf88..a6c0340b6 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntitySheep; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(World world) { 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 c4da5f551..c0247065d 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityAIBodyControl; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityShulker; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -35,6 +36,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerNPC(World world) { 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 27648916e..d811c7a2c 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntitySilverfish; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(World world) { 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 19e814ded..e90bd43d8 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntitySkeleton; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(World world) { 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 a8f8f08ae..bd6b79036 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityHuman; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntitySlime; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySlimeNPC(World world) { 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 eff55037f..cac0f7b95 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntitySnowman; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(World world) { 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 d17e3b0f1..70619abe5 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntitySpider; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(World world) { 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 e5668601c..e4fdc6bbf 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntitySquid; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(World world) { 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 d43a6cf06..8c752448e 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityHuman; import net.minecraft.server.v1_10_R1.EntityLightning; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityVillager; import net.minecraft.server.v1_10_R1.EnumHand; import net.minecraft.server.v1_10_R1.IBlockData; @@ -38,6 +39,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean blockingATrade; private final CitizensNPC npc; 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 2f0c70951..22df8a57b 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityWitch; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(World world) { 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 0851f637b..24efd9ba1 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.Entity; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityWither; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.SoundEffect; @@ -32,6 +33,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(World world) { 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 bf7ca2ee4..a3e44e29e 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; import net.minecraft.server.v1_10_R1.EntityLiving; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityWolf; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(World world) { 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 9d403b823..3a1e241d1 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.Entity; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityZombie; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(World world) { 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 9e3f50f32..1c5f68c9f 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityAreaEffectCloud; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -43,6 +45,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(World world) { 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 e22858a56..2610a2250 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityBoat; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -44,6 +46,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBoatNPC(World world) { 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 1320413f4..bd9e0c925 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityDragonFireball; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -44,6 +46,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(World world) { 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 d98a1b706..0fd6919bb 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 @@ -15,9 +15,11 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityEgg; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; import net.minecraft.server.v1_10_R1.WorldServer; @@ -54,6 +56,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEggNPC(World world) { 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 998ce3c00..2983e3e49 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityEnderCrystal; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -43,6 +45,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(World world) { 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 a3ff4e5ba..5bd97091d 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityEnderPearl; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -43,6 +45,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(World world) { 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 c0b381d88..d6dfebdc5 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityEnderSignal; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -43,6 +45,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(World world) { 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 d3871ee92..d9ec1ab40 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityExperienceOrb; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(World world) { 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 50860189d..c3e818c6b 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 @@ -17,10 +17,12 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.Block; import net.minecraft.server.v1_10_R1.EntityFallingBlock; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.IBlockData; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -46,6 +48,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(World world) { 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 b220761c9..c1faae22d 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityFireworks; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(World world) { 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 d1aa47040..6b7287f4e 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityFishingHook; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(World world) { 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 5d0bcc83d..cbfa60f40 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 @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityHuman; import net.minecraft.server.v1_10_R1.EntityItem; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.ItemStack; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -41,6 +43,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemNPC(World world) { 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 55db8089b..0f89681fe 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 @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.BlockPosition; import net.minecraft.server.v1_10_R1.EntityItemFrame; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EnumDirection; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -42,6 +44,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(World world) { 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 45d244343..2b510dcb0 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityLargeFireball; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -30,6 +32,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(World world) { 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 1e18d4783..60058ca6b 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityLeash; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(World world) { 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 d83e4268d..8d08ae5ab 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityMinecartChest; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -30,6 +32,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(World world) { 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 bce54a84c..01876898e 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityMinecartCommandBlock; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -30,6 +32,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(World world) { 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 6b2f611c6..06c22ad92 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityMinecartFurnace; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -30,6 +32,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(World world) { 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 6ad48b6f4..de932c915 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 @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityMinecartHopper; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -26,6 +28,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(World world) { 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 2a6f1ede6..26fb661eb 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityMinecartRideable; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -30,6 +32,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(World world) { 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 b3c7270d8..f851d41f6 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 @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityMinecartMobSpawner; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -26,6 +28,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(World world) { 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 8551faca7..da7b4f4c8 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 @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityMinecartTNT; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -26,6 +28,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(World world) { 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 e11a5e3e6..26f19cbcc 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; import net.minecraft.server.v1_10_R1.EntityPainting; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(World world) { 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 8aecd1c7d..f8bfe3797 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityShulkerBullet; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(World world) { 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 406642574..14986fe60 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntitySmallFireball; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(World world) { 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 63671a366..cf2f1cb3f 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntitySnowball; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(World world) { 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 1e9d538aa..a38bb8250 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntitySpectralArrow; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(World world) { 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 908c49f54..7c178d88a 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityTNTPrimed; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(World world) { 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 38d75df1b..cc1ffe77e 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityThrownExpBottle; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(World world) { 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 e07dd3934..41b7c1e99 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityPotion; import net.minecraft.server.v1_10_R1.Items; import net.minecraft.server.v1_10_R1.NBTTagCompound; @@ -30,6 +32,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(World world) { 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 eba6daecc..7d22f44ec 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityTippedArrow; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(World world) { 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 e2ea01a17..a5b96f259 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_10_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_10_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_10_R1.AxisAlignedBB; +import net.minecraft.server.v1_10_R1.EntityPlayer; import net.minecraft.server.v1_10_R1.EntityWitherSkull; import net.minecraft.server.v1_10_R1.NBTTagCompound; import net.minecraft.server.v1_10_R1.World; @@ -29,6 +31,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(World world) { diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util/NMSImpl.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util/NMSImpl.java index b75593a2e..405f9f664 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util/NMSImpl.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/util/NMSImpl.java @@ -1062,9 +1062,6 @@ public class NMSImpl implements NMSBridge { e.printStackTrace(); } } - if (getHandle(entity) instanceof EntityHumanNPC) { - ((EntityHumanNPC) getHandle(entity)).setTracked(); - } } @Override 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 53adcefb2..f2ddb7a3d 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 @@ -101,7 +101,9 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { } public static Set getSeenBy(EntityTrackerEntry tracker) { - return tracker.trackedPlayers.stream().map((Function) EntityPlayer::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 8969b337d..6e38450d7 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ArmorStandController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/ArmorStandController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityArmorStand; import net.minecraft.server.v1_11_R1.EntityHuman; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EnumHand; import net.minecraft.server.v1_11_R1.EnumInteractionResult; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -48,6 +50,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityArmorStandNPC(World world) { 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 8757922e5..42ae33862 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityBat; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; import net.minecraft.server.v1_11_R1.World; @@ -46,6 +47,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBatNPC(World world) { 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 85bfa1001..5e7d4118f 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityBlaze; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; import net.minecraft.server.v1_11_R1.World; @@ -46,6 +47,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(World world) { 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 e55e348eb..34eecfc04 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityCaveSpider; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -48,6 +49,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(World world) { 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 32df2824d..7a8896f8d 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityChicken; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -48,6 +49,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(World world) { 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 97160f177..a4660d614 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityCow; import net.minecraft.server.v1_11_R1.EntityHuman; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EnumHand; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.ItemStack; @@ -52,6 +53,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCowNPC(World world) { 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 651968dce..c20a891e8 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityCreeper; import net.minecraft.server.v1_11_R1.EntityLightning; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -49,6 +50,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean allowPowered; private final CitizensNPC npc; 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 9caa611c9..7eca67492 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 @@ -22,6 +22,7 @@ import net.minecraft.server.v1_11_R1.DamageSource; import net.minecraft.server.v1_11_R1.DragonControllerPhase; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityEnderDragon; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IEntitySelector; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -53,6 +54,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(World world) { 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 0b9df5aa5..d023ce542 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityEnderman; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -48,6 +49,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(World world) { 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 8955f76d0..23bb27c5f 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityEndermite; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -48,6 +49,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(World world) { 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 eca77574f..d3447493d 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 @@ -67,7 +67,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable private PlayerControllerJump controllerJump; private PlayerControllerMove controllerMove; private final Map equipmentCache = Maps.newEnumMap(EnumItemSlot.class); - private boolean isTracked = false; private int jumpTicks = 0; private PlayerNavigation navigation; private final CitizensNPC npc; @@ -97,10 +96,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable } @Override - public boolean a(EntityPlayer entityplayer) { - if (npc != null && !isTracked) - return false; - return super.a(entityplayer); + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); } public float a(PathType pathtype) { @@ -400,10 +397,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable npc.getOrAddTrait(SkinTrait.class).setSkinPersistent(skinName, signature, data); } - public void setTracked() { - isTracked = true; - } - public void updateAI() { controllerMove.c(); controllerJump.b(); 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 1d0263aaa..63d04d996 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityEvoker; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -34,6 +35,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEvokerNPC(World world) { 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 dbdeab48a..b5e9b28d3 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityGhast; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; import net.minecraft.server.v1_11_R1.World; @@ -32,6 +33,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(World world) { 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 b2f019458..99066b4cc 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityGiantZombie; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -34,6 +35,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(World world) { 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 caaf829ea..abfe9ab1f 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityGuardian; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -34,6 +35,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(World world) { 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 b24b35f76..0ea86de51 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityGuardianElder; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -34,6 +35,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(World world) { 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 c959394bd..428e789f0 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 @@ -21,6 +21,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityHorse; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.GenericAttributes; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -44,11 +45,17 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; + public EntityHorseNPC(World world) { this(world, null); } 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 5b6935af7..13e19acf3 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 @@ -22,6 +22,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityHorseDonkey; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.GenericAttributes; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -45,11 +46,17 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; + public EntityHorseDonkeyNPC(World world) { this(world, null); } 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 48df93811..9eee76785 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 @@ -22,6 +22,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityHorseMule; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.GenericAttributes; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -45,11 +46,17 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; + public EntityHorseMuleNPC(World world) { this(world, null); } 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 3954065b7..a6f9294fb 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 @@ -22,6 +22,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityHorseSkeleton; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.GenericAttributes; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -45,11 +46,17 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; + public EntityHorseSkeletonNPC(World world) { this(world, null); } 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 28c898864..055a5ba86 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 @@ -22,6 +22,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityHorseZombie; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.GenericAttributes; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -45,11 +46,17 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; + public EntityHorseZombieNPC(World world) { this(world, null); } 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 6ea073037..fe442a89b 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityIronGolem; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -34,6 +35,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(World world) { 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 8a949eeff..a0dc62ff9 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityLlama; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -42,6 +43,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLlamaNPC(World world) { 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 3b280b5f1..2a41a2927 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityHuman; import net.minecraft.server.v1_11_R1.EntityMagmaCube; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -36,6 +37,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMagmaCubeNPC(World world) { 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 a8a2f0c0d..b68025a55 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityHuman; import net.minecraft.server.v1_11_R1.EntityMushroomCow; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EnumHand; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(World world) { 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 f55943c04..c7c0fc69c 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityOcelot; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -34,6 +35,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(World world) { 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 e0d7baab5..b6fb30be2 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityLightning; import net.minecraft.server.v1_11_R1.EntityPig; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -35,6 +36,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigNPC(World world) { 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 94e016a4e..b64e627ee 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityPigZombie; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -34,6 +35,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(World world) { 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 81a7a3f6b..2e94c0f91 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityPolarBear; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -32,6 +33,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPolarBearNPC(World world) { 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 8630b4b14..7ba3038be 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityLiving; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityRabbit; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -35,6 +36,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(World world) { 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 c998b3787..f8f276db6 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntitySheep; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(World world) { 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 bf7da199b..abae4b119 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityAIBodyControl; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityShulker; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -35,6 +36,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerNPC(World world) { 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 cd2d87de5..ac2529e76 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntitySilverfish; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(World world) { 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 f060004f9..f919a77c0 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntitySkeleton; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(World world) { 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 059eb90fb..daacd32a0 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntitySkeletonStray; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityStrayNPC(World world) { 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 361c264e1..a51068404 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntitySkeletonWither; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(World world) { 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 86143dedc..578011c60 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityHuman; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntitySlime; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySlimeNPC(World world) { 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 eef393dea..efcbbaa2e 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntitySnowman; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(World world) { 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 a3b6e6f33..6ed318e74 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntitySpider; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(World world) { 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 9c0fdd19e..b41efa115 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntitySquid; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(World world) { 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 a74ed1c5f..3bb13a4f7 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityVex; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -32,6 +33,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityVexNPC(World world) { 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 00c40c624..ec58b8600 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 @@ -21,6 +21,7 @@ import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityHuman; import net.minecraft.server.v1_11_R1.EntityLightning; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityVillager; import net.minecraft.server.v1_11_R1.EnumHand; import net.minecraft.server.v1_11_R1.IBlockData; @@ -40,6 +41,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean blockingATrade; private final CitizensNPC npc; 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 de247274c..319dd6eb2 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityVindicator; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityVindicatorNPC(World world) { 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 15b24afcf..dfbcf8bbd 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityWitch; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(World world) { 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 b8202e93e..7d3462723 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityWither; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.SoundEffect; @@ -32,6 +33,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(World world) { 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 42ee7884b..b407f761e 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; import net.minecraft.server.v1_11_R1.EntityLiving; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityWolf; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(World world) { 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 fae6f3fb4..c7bf37e94 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityZombie; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(World world) { 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 ce8955ad2..20cad675a 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityZombieHusk; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(World world) { 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 64ed90ce2..96f67776d 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.Entity; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityZombieVillager; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(World world) { 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 dbe351556..24efc3538 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityAreaEffectCloud; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -43,6 +45,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(World world) { 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 f67914129..38c55bf67 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_11_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityBoat; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -44,6 +46,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBoatNPC(World world) { 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 758146598..c5ec27037 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_11_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityDragonFireball; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -44,6 +46,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(World world) { 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 f2cea4ec8..2ffd1be33 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 @@ -15,9 +15,11 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityEgg; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; import net.minecraft.server.v1_11_R1.WorldServer; @@ -54,6 +56,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEggNPC(World world) { 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 8277c57dc..7179ceb15 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityEnderCrystal; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -43,6 +45,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(World world) { 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 6847a21fd..42bcceea0 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityEnderPearl; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -43,6 +45,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(World world) { 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 ad59f3890..7d409f5a8 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityEnderSignal; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -43,6 +45,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(World world) { 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 9b21df2e4..292acc08b 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 @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityEvokerFangs; import net.minecraft.server.v1_11_R1.EntityHuman; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EnumHand; import net.minecraft.server.v1_11_R1.EnumInteractionResult; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -35,6 +37,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(World world) { 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 90f0d0b53..b06cb12c1 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityExperienceOrb; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(World world) { 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 0540f93a1..ccc777b12 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 @@ -17,10 +17,12 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.Block; import net.minecraft.server.v1_11_R1.EntityFallingBlock; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EnumMoveType; import net.minecraft.server.v1_11_R1.IBlockData; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -47,6 +49,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(World world) { 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 383bea841..62d432fbd 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityFireworks; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(World world) { 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 f600e4db1..705a05bdd 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityFishingHook; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(World world) { 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 2c2f3e306..f995b4359 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 @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityHuman; import net.minecraft.server.v1_11_R1.EntityItem; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.ItemStack; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -41,6 +43,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemNPC(World world) { 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 ca292a3d7..d75621de4 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 @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.BlockPosition; import net.minecraft.server.v1_11_R1.EntityItemFrame; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EnumDirection; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -42,6 +44,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(World world) { 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 ae681eeaa..1ca9c5b1f 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_11_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityLargeFireball; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -30,6 +32,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(World world) { 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 29eb2aa51..f856f7c5a 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityLeash; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(World world) { 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 fa7d65668..0f60372da 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 @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityLlama; import net.minecraft.server.v1_11_R1.EntityLlamaSpit; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; import net.minecraft.server.v1_11_R1.WorldServer; @@ -42,6 +44,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(World world) { 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 6cac0f071..83ac1cb46 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_11_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityMinecartChest; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -30,6 +32,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(World world) { 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 ab8783c12..aff89f85f 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_11_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityMinecartCommandBlock; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -30,6 +32,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(World world) { 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 51e6e522b..0967b2f51 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_11_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityMinecartFurnace; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -30,6 +32,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(World world) { 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 74ed3744d..aa49b7087 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 @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_11_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityMinecartHopper; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -26,6 +28,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(World world) { 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 c77125e7c..39bfe5aa5 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_11_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityMinecartRideable; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -30,6 +32,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(World world) { 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 921eacc69..ece727fa9 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 @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_11_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityMinecartMobSpawner; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -26,6 +28,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(World world) { 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 ebc80723a..87632c5cb 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 @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_11_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityMinecartTNT; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -26,6 +28,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(World world) { 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 f6278d77e..acf3e2acf 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; import net.minecraft.server.v1_11_R1.EntityPainting; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(World world) { 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 de390de93..841f2c415 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityShulkerBullet; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(World world) { 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 b2a2c5281..59d1fdfa5 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntitySmallFireball; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(World world) { 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 cf1de4def..8899b172d 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntitySnowball; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(World world) { 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 c614f2835..9938edf19 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntitySpectralArrow; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(World world) { 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 b07087470..b6ba9107e 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityTNTPrimed; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(World world) { 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 8013fd8db..eed345d07 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityThrownExpBottle; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(World world) { 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 0cc420e94..abbd1bdbd 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityPotion; import net.minecraft.server.v1_11_R1.Items; import net.minecraft.server.v1_11_R1.NBTTagCompound; @@ -30,6 +32,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(World world) { 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 f5182f737..f32770c97 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityTippedArrow; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(World world) { 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 eee15be60..a7a453edf 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_11_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_11_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_11_R1.AxisAlignedBB; +import net.minecraft.server.v1_11_R1.EntityPlayer; import net.minecraft.server.v1_11_R1.EntityWitherSkull; import net.minecraft.server.v1_11_R1.NBTTagCompound; import net.minecraft.server.v1_11_R1.World; @@ -29,6 +31,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(World world) { diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/NMSImpl.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/NMSImpl.java index d0185baa7..e72d4460f 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/NMSImpl.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/util/NMSImpl.java @@ -1115,9 +1115,6 @@ public class NMSImpl implements NMSBridge { e.printStackTrace(); } } - if (getHandle(entity) instanceof EntityHumanNPC) { - ((EntityHumanNPC) getHandle(entity)).setTracked(); - } } @Override 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 516350139..18b8776e8 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 @@ -170,9 +170,13 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map((Function) EntityPlayer::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()); + 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 0c29cf600..bacebbee1 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 @@ -13,10 +13,12 @@ import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityArmorStand; import net.minecraft.server.v1_12_R1.EntityHuman; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumHand; import net.minecraft.server.v1_12_R1.EnumInteractionResult; import net.minecraft.server.v1_12_R1.EnumPistonReaction; @@ -49,6 +51,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityArmorStandNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BatController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BatController.java index 30eb8962f..967ad0b35 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BatController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BatController.java @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityBat; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -48,6 +49,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBatNPC(World world) { 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 807b24082..20a64bec4 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BlazeController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/BlazeController.java @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityBlaze; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -48,6 +49,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(World world) { 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 44563b3f9..a2200e0e5 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CaveSpiderController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CaveSpiderController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityCaveSpider; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -50,6 +51,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(World world) { 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 b401714e2..d0eeb36ac 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ChickenController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/ChickenController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityChicken; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -50,6 +51,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(World world) { 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 97762d4b7..3d209a122 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityCow; import net.minecraft.server.v1_12_R1.EntityHuman; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumHand; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -54,6 +55,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCowNPC(World world) { 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 67bb3204c..34bdf876a 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CreeperController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/CreeperController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityCreeper; import net.minecraft.server.v1_12_R1.EntityLightning; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -51,6 +52,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean allowPowered; private final CitizensNPC npc; 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 31a912bee..7d0f4a371 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EnderDragonController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.DragonControllerPhase; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityEnderDragon; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IEntitySelector; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -54,6 +55,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermanController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermanController.java index 20d88f2b3..01124874b 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermanController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermanController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityEnderman; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -50,6 +51,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(World world) { 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 a24be6a86..01c709e9c 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermiteController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EndermiteController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityEndermite; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -50,6 +51,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(World world) { 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 a98dddd69..e6170af6e 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 @@ -32,7 +32,6 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl; import net.citizensnpcs.nms.v1_12_R1.util.PlayerControllerJump; import net.citizensnpcs.nms.v1_12_R1.util.PlayerControllerMove; import net.citizensnpcs.nms.v1_12_R1.util.PlayerNavigation; -import net.citizensnpcs.nms.v1_12_R1.util.PlayerlistTrackerEntry; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.skin.SkinPacketTracker; @@ -76,7 +75,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable private final CitizensNPC npc; private final Location packetLocationCache = new Location(null, 0, 0, 0); private final SkinPacketTracker skinTracker; - private PlayerlistTrackerEntry trackerEntry; public EntityHumanNPC(MinecraftServer minecraftServer, WorldServer world, GameProfile gameProfile, PlayerInteractManager playerInteractManager, NPC npc) { @@ -100,10 +98,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable } @Override - public boolean a(EntityPlayer entityplayer) { - if (npc != null && trackerEntry == null) - return false; - return super.a(entityplayer); + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); } @Override @@ -411,10 +407,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable npc.getOrAddTrait(SkinTrait.class).setSkinPersistent(skinName, signature, data); } - public void setTracked(PlayerlistTrackerEntry entry) { - this.trackerEntry = entry; - } - public void updateAI() { controllerMove.a(); controllerJump.b(); 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 0fb13526f..11a3a2995 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EvokerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EvokerController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityEvoker; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEvokerNPC(World world) { 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 62d5e88d6..d574fc9d5 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GhastController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GhastController.java @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityGhast; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.SoundEffect; @@ -34,6 +35,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(World world) { 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 b67e37ac0..f5711393f 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GiantController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GiantController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityGiantZombie; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(World world) { 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 cd5888d8a..8eb34b2d2 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityGuardian; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(World world) { 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 f3d6fa3bd..a822c6ff7 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianElderController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/GuardianElderController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityGuardianElder; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(World world) { 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 b7663e794..fd4644989 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHorse; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.GenericAttributes; import net.minecraft.server.v1_12_R1.IBlockData; @@ -46,11 +47,17 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; + public EntityHorseNPC(World world) { this(world, null); } 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 17bf2f729..40893eed5 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseDonkeyController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseDonkeyController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHorseDonkey; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.GenericAttributes; import net.minecraft.server.v1_12_R1.IBlockData; @@ -46,11 +47,17 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; + public EntityHorseDonkeyNPC(World world) { this(world, null); } 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 07997b777..3f4b21f46 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseMuleController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseMuleController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHorseMule; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.GenericAttributes; import net.minecraft.server.v1_12_R1.IBlockData; @@ -46,11 +47,17 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; + public EntityHorseMuleNPC(World world) { this(world, null); } 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 f994fca85..19f0aa2c5 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseSkeletonController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseSkeletonController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHorseSkeleton; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.GenericAttributes; import net.minecraft.server.v1_12_R1.IBlockData; @@ -46,11 +47,17 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; + public EntityHorseSkeletonNPC(World world) { this(world, null); } 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 fcb41081c..95e97ffa1 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseZombieController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/HorseZombieController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHorseZombie; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.GenericAttributes; import net.minecraft.server.v1_12_R1.IBlockData; @@ -46,11 +47,17 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; + public EntityHorseZombieNPC(World world) { this(world, null); } 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 2abf3ffa0..1f0a3de48 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IllusionerController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IllusionerController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityIllagerIllusioner; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIllusionerNPC(World world) { 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 fbf9c3b19..6722ea62b 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IronGolemController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/IronGolemController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityIronGolem; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(World world) { 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 be240218d..fdd6275ad 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/LlamaController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/LlamaController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityLlama; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.GenericAttributes; import net.minecraft.server.v1_12_R1.IBlockData; @@ -46,6 +47,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 4f939f481..4e463e372 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MagmaCubeController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/MagmaCubeController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EntityMagmaCube; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -38,6 +39,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMagmaCubeNPC(World world) { 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 bd6c2f5a1..b035e891e 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EntityMushroomCow; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumHand; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -38,6 +39,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(World world) { 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 8a92bf794..17959a573 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityOcelot; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(World world) { 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 2a01db998..72851c9ab 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EntityParrot; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumHand; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityParrotNPC(World world) { 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 9cff1c369..83073dd57 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityLightning; import net.minecraft.server.v1_12_R1.EntityPig; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -37,6 +38,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigNPC(World world) { 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 1c6cfbc70..ea2d30970 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigZombieController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/PigZombieController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityPigZombie; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -36,6 +37,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(World world) { 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 9b7b8b74e..20cfa71f6 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityPolarBear; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPolarBearNPC(World world) { 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 252d4c9a6..2400b7006 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityLiving; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityRabbit; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -37,6 +38,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(World world) { 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 59596c0c5..0fc7c0881 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntitySheep; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(World world) { 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 da640c1f2..654235949 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityAIBodyControl; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityShulker; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -37,6 +38,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerNPC(World world) { 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 3784bac99..c7954e26a 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntitySilverfish; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(World world) { 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 1b49aa4d5..e83b897a5 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntitySkeleton; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(World world) { 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 a2ddec385..0ab9315c2 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntitySkeletonStray; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityStrayNPC(World world) { 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 4075429e0..745d732ad 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntitySkeletonWither; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(World world) { 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 2408c2f30..6ca4eba8e 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHuman; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntitySlime; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -38,6 +39,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySlimeNPC(World world) { 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 59c8010b2..ee788d9a2 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntitySnowman; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(World world) { 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 4b80a850a..f97da91aa 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntitySpider; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(World world) { 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 4e457ec50..732f9af56 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntitySquid; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(World world) { 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 17c0e79c2..44574c263 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityVex; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityVexNPC(World world) { 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 f3fc6585a..4efe5066c 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 @@ -22,6 +22,7 @@ import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EntityLightning; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityVillager; import net.minecraft.server.v1_12_R1.EnumHand; import net.minecraft.server.v1_12_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean blockingATrade; private final CitizensNPC npc; 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 7e760b4a6..8bc3d9860 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityVindicator; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityVindicatorNPC(World world) { 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 86eca8f31..f52bc85e1 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityWitch; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(World world) { 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 96ec395a9..1b566437a 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityWither; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -34,6 +35,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(World world) { 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 264b7f702..f9e5e0006 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; import net.minecraft.server.v1_12_R1.EntityLiving; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityWolf; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -38,6 +39,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(World world) { 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 19dd2212b..f6648c16e 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityZombie; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(World world) { 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 fd33f2df0..5ed146575 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityZombieHusk; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(World world) { 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 9f48f89a6..a5f6dc361 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.DamageSource; import net.minecraft.server.v1_12_R1.Entity; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityZombieVillager; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -36,6 +37,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(World world) { 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 7da2fa951..d0852960a 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityAreaEffectCloud; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -44,6 +46,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/BoatController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/BoatController.java index 9c412d48e..091604824 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityBoat; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -45,6 +47,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBoatNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/DragonFireballController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/DragonFireballController.java index 122828cca..18e13490c 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityDragonFireball; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -45,6 +47,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EggController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EggController.java index 49b7e4f6f..3d5c80372 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 @@ -15,9 +15,11 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityEgg; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -55,6 +57,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEggNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderCrystalController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderCrystalController.java index 82b766173..65f976a2f 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityEnderCrystal; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -44,6 +46,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderPearlController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderPearlController.java index cb358e278..f6e178692 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityEnderPearl; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -44,6 +46,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderSignalController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EnderSignalController.java index 842ad92ed..981ddc7a0 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityEnderSignal; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -44,6 +46,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EvokerFangsController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/EvokerFangsController.java index 384aabef2..147e28e66 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 @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityEvokerFangs; import net.minecraft.server.v1_12_R1.EntityHuman; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumHand; import net.minecraft.server.v1_12_R1.EnumInteractionResult; import net.minecraft.server.v1_12_R1.EnumPistonReaction; @@ -36,6 +38,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ExperienceOrbController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ExperienceOrbController.java index 584042546..18f243ebf 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityExperienceOrb; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -30,6 +32,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FallingBlockController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FallingBlockController.java index 7e5bcc2af..cf8b4ed6b 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 @@ -17,10 +17,12 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.Block; import net.minecraft.server.v1_12_R1.EntityFallingBlock; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumMoveType; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.IBlockData; @@ -48,6 +50,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FireworkController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FireworkController.java index f5cab425a..85bd389c6 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityFireworks; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -30,6 +32,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FishingHookController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/FishingHookController.java index d3f4db687..b70b44d39 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityFishingHook; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -30,6 +32,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemController.java index cc7e6975e..c2a855452 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 @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityHuman; import net.minecraft.server.v1_12_R1.EntityItem; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.ItemStack; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -42,6 +44,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemFrameController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ItemFrameController.java index 098e3ae3b..15cf25434 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 @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.BlockPosition; import net.minecraft.server.v1_12_R1.EntityItemFrame; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumDirection; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -43,6 +45,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LargeFireballController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LargeFireballController.java index b56f2e416..a21420dbe 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityLargeFireball; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -31,6 +33,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LeashController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LeashController.java index 68927789e..ec2ee7671 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityLeash; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -30,6 +32,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LlamaSpitController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/LlamaSpitController.java index 8e4cad619..8235cb412 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 @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityLlama; import net.minecraft.server.v1_12_R1.EntityLlamaSpit; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -43,6 +45,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartChestController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartChestController.java index 126ec0364..615437387 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartChest; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -31,6 +33,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartCommandController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartCommandController.java index 68786a873..c4f37f334 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartCommandBlock; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -31,6 +33,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartFurnaceController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartFurnaceController.java index 54f141602..60c318b7b 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartFurnace; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -31,6 +33,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartHopperController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartHopperController.java index 448747b03..1bce101a7 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 @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartHopper; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -27,6 +29,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartRideableController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartRideableController.java index 7cae806a8..229f736f4 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartRideable; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -31,6 +33,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartSpawnerController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartSpawnerController.java index 27b2c7550..3c17b7f08 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 @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartMobSpawner; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -27,6 +29,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartTNTController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/MinecartTNTController.java index 17cc9bc2b..d290e790a 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 @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityMinecartTNT; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -27,6 +29,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/PaintingController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/PaintingController.java index 9df028b87..db41dc7bf 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; import net.minecraft.server.v1_12_R1.EntityPainting; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; import net.minecraft.server.v1_12_R1.World; @@ -30,6 +32,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ShulkerBulletController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ShulkerBulletController.java index d39dc4abf..befc03169 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityShulkerBullet; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -30,6 +32,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SmallFireballController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SmallFireballController.java index b8ba903df..b62afb9e6 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntitySmallFireball; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -30,6 +32,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SnowballController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SnowballController.java index 7a9e7608e..cd9bd7cad 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntitySnowball; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -30,6 +32,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SpectralArrowController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/SpectralArrowController.java index 4de226e2a..48e9da8d3 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntitySpectralArrow; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -30,6 +32,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TNTPrimedController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TNTPrimedController.java index cd1640080..a2b31a62c 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityTNTPrimed; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -30,6 +32,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownExpBottleController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownExpBottleController.java index 07465efdf..5a174c610 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityThrownExpBottle; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -30,6 +32,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownPotionController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/ThrownPotionController.java index 5b7864362..695df310d 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityPotion; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.Items; @@ -31,6 +33,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TippedArrowController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/TippedArrowController.java index 9104a1f1d..4ef67c405 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityTippedArrow; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -30,6 +32,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/WitherSkullController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/nonliving/WitherSkullController.java index 6538b496b..641f0c292 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_12_R1.entity.MobEntityController; import net.citizensnpcs.nms.v1_12_R1.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_12_R1.AxisAlignedBB; +import net.minecraft.server.v1_12_R1.EntityPlayer; import net.minecraft.server.v1_12_R1.EntityWitherSkull; import net.minecraft.server.v1_12_R1.EnumPistonReaction; import net.minecraft.server.v1_12_R1.NBTTagCompound; @@ -30,6 +32,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(World world) { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util/NMSImpl.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util/NMSImpl.java index a2edb0409..437a70898 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util/NMSImpl.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/util/NMSImpl.java @@ -1123,9 +1123,6 @@ public class NMSImpl implements NMSBridge { e.printStackTrace(); } } - if (getHandle(entity) instanceof EntityHumanNPC) { - ((EntityHumanNPC) getHandle(entity)).setTracked(replace); - } } @Override 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 91daf726a..a72ec8b1c 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 @@ -179,9 +179,13 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map((Function) EntityPlayer::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()); + 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/ArmorStandController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ArmorStandController.java index 8e70625b1..1cec0faae 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ArmorStandController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ArmorStandController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityArmorStand; import net.minecraft.server.v1_13_R2.EntityHuman; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumHand; import net.minecraft.server.v1_13_R2.EnumInteractionResult; import net.minecraft.server.v1_13_R2.EnumPistonReaction; @@ -51,6 +53,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityArmorStandNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BatController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BatController.java index 992524804..dfbb08a37 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BatController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BatController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBat; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -52,6 +53,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBatNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BlazeController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BlazeController.java index 08e49e9e3..0c56eecbf 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BlazeController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/BlazeController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBlaze; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -52,6 +53,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CaveSpiderController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CaveSpiderController.java index f8447639a..34e636333 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CaveSpiderController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CaveSpiderController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityCaveSpider; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -54,6 +55,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ChickenController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ChickenController.java index a45ae317d..3d500c653 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ChickenController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ChickenController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityChicken; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -56,6 +57,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CodController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CodController.java index 83888c45a..2f8464aaf 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CodController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CodController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityCod; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumHand; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -59,6 +60,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends EntityCod implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCodNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CowController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CowController.java index 71bb093e2..0752bc034 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CowController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CowController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityCow; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumHand; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -58,6 +59,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCowNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CreeperController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CreeperController.java index 5e456be52..ff60ec083 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CreeperController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/CreeperController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityCreeper; import net.minecraft.server.v1_13_R2.EntityLightning; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -55,6 +56,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DolphinController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DolphinController.java index 986ceb6ca..538425eec 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DolphinController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DolphinController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityDolphin; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; @@ -55,6 +56,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean inProtectedTick; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DrownedController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DrownedController.java index 73132890c..d85f4a245 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DrownedController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/DrownedController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityDrowned; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -54,6 +55,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityDrownedNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EnderDragonController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EnderDragonController.java index e90d53e2b..059f74995 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EnderDragonController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EnderDragonController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityEnderDragon; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IEntitySelector; @@ -59,6 +60,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermanController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermanController.java index 4f052a256..d2780262b 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermanController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermanController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityEnderman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -54,6 +55,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermiteController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermiteController.java index 6140bd2ab..e69a5722e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermiteController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EndermiteController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityEndermite; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -54,6 +55,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EntityHumanNPC.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EntityHumanNPC.java index e86cd0cc2..90d6409fd 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 @@ -32,7 +32,6 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.nms.v1_13_R2.util.PlayerControllerJump; import net.citizensnpcs.nms.v1_13_R2.util.PlayerControllerMove; import net.citizensnpcs.nms.v1_13_R2.util.PlayerNavigation; -import net.citizensnpcs.nms.v1_13_R2.util.PlayerlistTrackerEntry; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.skin.SkinPacketTracker; @@ -76,7 +75,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable private final CitizensNPC npc; private final Location packetLocationCache = new Location(null, 0, 0, 0); private final SkinPacketTracker skinTracker; - private PlayerlistTrackerEntry trackerEntry; public EntityHumanNPC(MinecraftServer minecraftServer, WorldServer world, GameProfile gameProfile, PlayerInteractManager playerInteractManager, NPC npc) { @@ -101,10 +99,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable } @Override - public boolean a(EntityPlayer entityplayer) { - if (npc != null && trackerEntry == null) - return false; - return super.a(entityplayer); + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); } @Override @@ -388,10 +384,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable npc.getOrAddTrait(SkinTrait.class).setSkinPersistent(skinName, signature, data); } - public void setTracked(PlayerlistTrackerEntry trackerEntry) { - this.trackerEntry = trackerEntry; - } - @Override public void tick() { super.tick(); diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EvokerController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EvokerController.java index f435c91a9..0d614e091 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EvokerController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/EvokerController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityEvoker; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -40,6 +41,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEvokerNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GhastController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GhastController.java index 9830708ec..caf7f95e3 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GhastController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GhastController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityGhast; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -38,6 +39,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GiantController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GiantController.java index 7b11d485d..fe911f616 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GiantController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GiantController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityGiantZombie; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -40,6 +41,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianController.java index df36233bb..b8cb80b92 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityGuardian; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -42,6 +43,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianElderController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianElderController.java index e1ed97b55..76d88b88e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianElderController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/GuardianElderController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityGuardianElder; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -42,6 +43,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseController.java index e9e9a6dcf..3ddcbbd5b 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHorse; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; @@ -50,6 +51,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseDonkeyController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseDonkeyController.java index 808aa791a..7f2a000a1 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseDonkeyController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseDonkeyController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHorseDonkey; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; @@ -50,6 +51,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseMuleController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseMuleController.java index bcbd945ed..bbc4a004d 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseMuleController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseMuleController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHorseMule; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; @@ -50,6 +51,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseSkeletonController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseSkeletonController.java index 82b1b79b8..d13de7689 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseSkeletonController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseSkeletonController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHorseSkeleton; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; @@ -50,6 +51,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseZombieController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseZombieController.java index 35d114aeb..27bbaf557 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseZombieController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/HorseZombieController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHorseZombie; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; @@ -50,6 +51,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IllusionerController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IllusionerController.java index d8b546468..da1e1f337 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IllusionerController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IllusionerController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityIllagerIllusioner; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -40,6 +41,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIllusionerNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IronGolemController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IronGolemController.java index 5fac05aa3..1bc4ac2a2 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IronGolemController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/IronGolemController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityIronGolem; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -40,6 +41,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/LlamaController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/LlamaController.java index 1bb57e1d0..89c33d3af 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/LlamaController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/LlamaController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityLlama; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.GenericAttributes; @@ -50,6 +51,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MagmaCubeController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MagmaCubeController.java index 7707c8dbe..8c05ac010 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MagmaCubeController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MagmaCubeController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMagmaCube; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -42,6 +43,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMagmaCubeNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MushroomCowController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MushroomCowController.java index dc64a109c..ea0897168 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MushroomCowController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/MushroomCowController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityMushroomCow; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumHand; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -42,6 +43,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/OcelotController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/OcelotController.java index c33c2970e..15cd0cf8e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/OcelotController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/OcelotController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityOcelot; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -40,6 +41,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ParrotController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ParrotController.java index d217a87ef..84a18df38 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ParrotController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ParrotController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityParrot; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumHand; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityParrotNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PhantomController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PhantomController.java index db2f7cdd2..2429366f7 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PhantomController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PhantomController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityPhantom; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumDifficulty; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -45,6 +46,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPhantomNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigController.java index 956bfa874..80644956a 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityLightning; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityPig; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -41,6 +42,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigZombieController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigZombieController.java index ddc70b4dd..0ac13a822 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigZombieController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PigZombieController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; import net.minecraft.server.v1_13_R2.EntityPigZombie; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.IBlockData; @@ -40,6 +41,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PolarBearController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PolarBearController.java index 064278ecb..d1a4eee7e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PolarBearController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PolarBearController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityPolarBear; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -38,6 +39,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPolarBearNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PufferFishController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PufferFishController.java index 560d31067..4d7518fcd 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PufferFishController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/PufferFishController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityPufferFish; import net.minecraft.server.v1_13_R2.EnumHand; import net.minecraft.server.v1_13_R2.EnumPistonReaction; @@ -46,6 +47,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPufferFishNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/RabbitController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/RabbitController.java index f8df37ca7..13b45eed1 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/RabbitController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/RabbitController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityLiving; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityRabbit; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -41,6 +42,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SalmonController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SalmonController.java index 1735bb506..75f56ed8a 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SalmonController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SalmonController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySalmon; import net.minecraft.server.v1_13_R2.EnumHand; import net.minecraft.server.v1_13_R2.EnumPistonReaction; @@ -45,6 +46,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySalmonNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SheepController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SheepController.java index b1598c929..320ad8262 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SheepController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SheepController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySheep; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ShulkerController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ShulkerController.java index 79fc11d2f..b858f23d4 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 @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityAIBodyControl; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityShulker; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -43,6 +44,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SilverfishController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SilverfishController.java index 0a9be55f2..e41f06e95 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SilverfishController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SilverfishController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySilverfish; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonController.java index f354e62df..33bcc0035 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySkeleton; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonStrayController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonStrayController.java index 7337aa73a..a2c6c4df3 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonStrayController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonStrayController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySkeletonStray; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityStrayNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonWitherController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonWitherController.java index 1d5590f3f..d269e205e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonWitherController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SkeletonWitherController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySkeletonWither; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SlimeController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SlimeController.java index 19ae276aa..ab5504432 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SlimeController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SlimeController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySlime; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -42,6 +43,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySlimeNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SnowmanController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SnowmanController.java index aec5ac19d..760b510de 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SnowmanController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SnowmanController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySnowman; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SpiderController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SpiderController.java index ffd2854bf..18ef61b80 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SpiderController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SpiderController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySpider; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SquidController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SquidController.java index 62c6d95b6..95d0b487a 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SquidController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/SquidController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySquid; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TropicalFishController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TropicalFishController.java index d097988da..0f84fd425 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TropicalFishController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TropicalFishController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityTropicalFish; import net.minecraft.server.v1_13_R2.EnumHand; import net.minecraft.server.v1_13_R2.EnumPistonReaction; @@ -45,6 +46,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTropicalFishNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TurtleController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TurtleController.java index 347986690..fcec4c5de 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TurtleController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/TurtleController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityInsentient; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityTurtle; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -43,6 +44,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTurtleNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VexController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VexController.java index e51049ddb..e0cd4d19a 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VexController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VexController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityVex; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -38,6 +39,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityVexNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VillagerController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VillagerController.java index cc89d8cbb..86a7d4e5f 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VillagerController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VillagerController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityLightning; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityVillager; import net.minecraft.server.v1_13_R2.EnumHand; import net.minecraft.server.v1_13_R2.EnumPistonReaction; @@ -46,6 +47,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean blockingATrade; private final CitizensNPC npc; diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VindicatorController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VindicatorController.java index 53ac2a31f..21df73b89 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VindicatorController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/VindicatorController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityVindicator; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityVindicatorNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitchController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitchController.java index cc106aa38..c8aceb803 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitchController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitchController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityWitch; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitherController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitherController.java index 3e4dafd39..36beee085 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitherController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WitherController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityWither; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -38,6 +39,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WolfController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WolfController.java index bc0d9d74d..ad37ec2f5 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WolfController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/WolfController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityLiving; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityWolf; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -42,6 +43,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieController.java index 26a892864..be270d0ad 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityZombie; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieHuskController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieHuskController.java index 522d52414..374c53614 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieHuskController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieHuskController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityZombieHusk; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieVillagerController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieVillagerController.java index 29b09d14c..2a36143af 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieVillagerController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/ZombieVillagerController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_13_R2.DamageSource; import net.minecraft.server.v1_13_R2.Entity; import net.minecraft.server.v1_13_R2.EntityBoat; import net.minecraft.server.v1_13_R2.EntityMinecartAbstract; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityZombieVillager; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -40,6 +41,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/AreaEffectCloudController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/AreaEffectCloudController.java index 9189b7e54..49650b7bc 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/AreaEffectCloudController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/AreaEffectCloudController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityAreaEffectCloud; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -46,6 +48,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/BoatController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/BoatController.java index 307879dba..751162e19 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/BoatController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/BoatController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityBoat; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -47,6 +49,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBoatNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/DragonFireballController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/DragonFireballController.java index 78c9e51b6..587556a31 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/DragonFireballController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/DragonFireballController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityDragonFireball; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -47,6 +49,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EggController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EggController.java index 4a21d449e..aa818e066 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EggController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EggController.java @@ -15,9 +15,11 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityEgg; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -57,6 +59,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEggNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderCrystalController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderCrystalController.java index b03041c91..bae0e4bdf 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderCrystalController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderCrystalController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityEnderCrystal; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -46,6 +48,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderPearlController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderPearlController.java index 27cb51e1d..54bf1f48b 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderPearlController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderPearlController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityEnderPearl; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -46,6 +48,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderSignalController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderSignalController.java index 567ab17c4..9d792c268 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderSignalController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EnderSignalController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityEnderSignal; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -46,6 +48,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EvokerFangsController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EvokerFangsController.java index 9731c22e8..80ea1c89f 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EvokerFangsController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/EvokerFangsController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityEvokerFangs; import net.minecraft.server.v1_13_R2.EntityHuman; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumHand; import net.minecraft.server.v1_13_R2.EnumInteractionResult; import net.minecraft.server.v1_13_R2.EnumPistonReaction; @@ -38,6 +40,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ExperienceOrbController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ExperienceOrbController.java index ed5fd569c..ece33544e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ExperienceOrbController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ExperienceOrbController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityExperienceOrb; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -32,6 +34,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FallingBlockController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FallingBlockController.java index e7f3df52c..67b9122e5 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FallingBlockController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FallingBlockController.java @@ -17,10 +17,12 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.Block; import net.minecraft.server.v1_13_R2.EntityFallingBlock; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumMoveType; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -50,6 +52,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FireworkController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FireworkController.java index 89df02d76..23c4c67c3 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FireworkController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FireworkController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityFireworks; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -32,6 +34,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FishingHookController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FishingHookController.java index dfc988d1f..70acdfa70 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FishingHookController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/FishingHookController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityFishingHook; @@ -39,6 +40,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemController.java index cb11d5864..b523888d9 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityHuman; import net.minecraft.server.v1_13_R2.EntityItem; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.ItemStack; @@ -44,6 +46,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemFrameController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemFrameController.java index 41f250596..e75cc48d1 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemFrameController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ItemFrameController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.BlockPosition; import net.minecraft.server.v1_13_R2.EntityItemFrame; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumDirection; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -45,6 +47,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LargeFireballController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LargeFireballController.java index 301ea6c55..8363f165a 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LargeFireballController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LargeFireballController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityLargeFireball; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -33,6 +35,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LeashController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LeashController.java index 2fe75a5c7..08b70bfe4 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LeashController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LeashController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityLeash; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -32,6 +34,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LlamaSpitController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LlamaSpitController.java index e2cb1cab6..a26e360c9 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LlamaSpitController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/LlamaSpitController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityLlama; import net.minecraft.server.v1_13_R2.EntityLlamaSpit; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -45,6 +47,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartChestController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartChestController.java index 565177843..3f56938d1 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartChestController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartChestController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartChest; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -33,6 +35,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartCommandController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartCommandController.java index 70399a7bf..6cf49d9c6 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartCommandController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartCommandController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartCommandBlock; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -33,6 +35,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartFurnaceController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartFurnaceController.java index bd157a8f5..87ee605cc 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartFurnaceController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartFurnaceController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartFurnace; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -33,6 +35,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartHopperController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartHopperController.java index dad2c9cdd..e10754f55 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartHopperController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartHopperController.java @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartHopper; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -29,6 +31,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartRideableController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartRideableController.java index 182ef50df..585f9cfee 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartRideableController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartRideableController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartRideable; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -33,6 +35,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartSpawnerController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartSpawnerController.java index db7b07545..240cbfc57 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartSpawnerController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartSpawnerController.java @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartMobSpawner; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -29,6 +31,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartTNTController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartTNTController.java index 969d6887c..6fb0d5c16 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartTNTController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/MinecartTNTController.java @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityMinecartTNT; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -29,6 +31,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/PaintingController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/PaintingController.java index 28e03d795..56bc02cdb 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/PaintingController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/PaintingController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; import net.minecraft.server.v1_13_R2.EntityPainting; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; import net.minecraft.server.v1_13_R2.NBTTagCompound; @@ -32,6 +34,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ShulkerBulletController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ShulkerBulletController.java index 3338734ba..01821b3af 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ShulkerBulletController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ShulkerBulletController.java @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityShulkerBullet; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -32,6 +34,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SmallFireballController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SmallFireballController.java index d1f68a1c6..46869f89b 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SmallFireballController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SmallFireballController.java @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySmallFireball; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -32,6 +34,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SnowballController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SnowballController.java index 1edb285e7..ce9f214c8 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SnowballController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SnowballController.java @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySnowball; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -32,6 +34,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SpectralArrowController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SpectralArrowController.java index 0203b7a4b..4f0f40efa 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SpectralArrowController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/SpectralArrowController.java @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntitySpectralArrow; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -32,6 +34,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TNTPrimedController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TNTPrimedController.java index ab3d89bf3..9df7d312e 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TNTPrimedController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TNTPrimedController.java @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityTNTPrimed; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -32,6 +34,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownExpBottleController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownExpBottleController.java index d6e749d17..82fb318bf 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownExpBottleController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownExpBottleController.java @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityThrownExpBottle; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -32,6 +34,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownPotionController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownPotionController.java index 8513268d0..5e53c3f38 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownPotionController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownPotionController.java @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityPotion; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -33,6 +35,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownTridentController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownTridentController.java index 2d716eeeb..7bfa8b96c 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownTridentController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/ThrownTridentController.java @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityThrownTrident; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -32,6 +34,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends EntityThrownTrident implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TippedArrowController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TippedArrowController.java index f61c0c44a..dd2d35750 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TippedArrowController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/TippedArrowController.java @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityTippedArrow; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -32,6 +34,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/WitherSkullController.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/WitherSkullController.java index 06a5d2db1..2458e179f 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/WitherSkullController.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/entity/nonliving/WitherSkullController.java @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController; import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_13_R2.AxisAlignedBB; +import net.minecraft.server.v1_13_R2.EntityPlayer; import net.minecraft.server.v1_13_R2.EntityWitherSkull; import net.minecraft.server.v1_13_R2.EnumPistonReaction; import net.minecraft.server.v1_13_R2.FluidType; @@ -32,6 +34,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(World world) { diff --git a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/NMSImpl.java b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/NMSImpl.java index 3c46f05aa..39b8959a4 100644 --- a/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/NMSImpl.java +++ b/v1_13_R2/src/main/java/net/citizensnpcs/nms/v1_13_R2/util/NMSImpl.java @@ -1159,9 +1159,6 @@ public class NMSImpl implements NMSBridge { e.printStackTrace(); } } - if (getHandle(entity) instanceof EntityHumanNPC) { - ((EntityHumanNPC) getHandle(entity)).setTracked(replace); - } } @Override 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 4681cb957..77d283278 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 @@ -178,9 +178,13 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map((Function) EntityPlayer::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()); + 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/ArmorStandController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ArmorStandController.java index 0be6bd61a..c5d3c4654 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ArmorStandController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ArmorStandController.java @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityArmorStand; import net.minecraft.server.v1_14_R1.EntityHuman; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; import net.minecraft.server.v1_14_R1.EnumInteractionResult; @@ -54,6 +55,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityArmorStandNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BatController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BatController.java index c168a9cc6..cedc02e5a 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BatController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BatController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBat; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -54,6 +55,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBatNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BlazeController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BlazeController.java index a1fa6aab5..446fb6095 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BlazeController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/BlazeController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBlaze; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -54,6 +55,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CatController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CatController.java index b9fade87d..6fac63056 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CatController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CatController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityCat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -57,6 +58,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends EntityCat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCatNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CaveSpiderController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CaveSpiderController.java index 67a62d7a0..a849296e6 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CaveSpiderController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CaveSpiderController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityCaveSpider; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -56,6 +57,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ChickenController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ChickenController.java index 452f9b1e3..7c460a0c5 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ChickenController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ChickenController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityChicken; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -57,6 +58,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CodController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CodController.java index 64bc577c5..e85b742d3 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CodController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CodController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityCod; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -61,6 +62,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends EntityCod implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCodNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CowController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CowController.java index 33835e9da..34e3a8b09 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CowController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CowController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityCow; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -61,6 +62,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCowNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CreeperController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CreeperController.java index dcdbe77e2..95441f7fd 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CreeperController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/CreeperController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityCreeper; import net.minecraft.server.v1_14_R1.EntityLightning; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -57,6 +58,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DolphinController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DolphinController.java index 543bd0c9a..b4d9b5baf 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DolphinController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DolphinController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityDolphin; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -58,6 +59,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean inProtectedTick; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DrownedController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DrownedController.java index c6cc69029..1cb0293c3 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DrownedController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DrownedController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityDrowned; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -56,6 +57,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EnderDragonController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EnderDragonController.java index b693f829f..744bede06 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EnderDragonController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EnderDragonController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityEnderDragon; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -59,6 +60,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermanController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermanController.java index 6e1944978..fe0a59a5f 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermanController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermanController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityEnderman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -56,6 +57,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermiteController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermiteController.java index d53efa864..8dba9ed29 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermiteController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EndermiteController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityEndermite; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -56,6 +57,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EntityHumanNPC.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EntityHumanNPC.java index 977d15d31..b4e61db56 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 @@ -31,7 +31,6 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.nms.v1_14_R1.util.PlayerControllerJump; import net.citizensnpcs.nms.v1_14_R1.util.PlayerControllerMove; import net.citizensnpcs.nms.v1_14_R1.util.PlayerNavigation; -import net.citizensnpcs.nms.v1_14_R1.util.PlayerlistTracker; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.skin.SkinPacketTracker; @@ -76,7 +75,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable private PlayerNavigation navigation; private final CitizensNPC npc; private final Location packetLocationCache = new Location(null, 0, 0, 0); - private PlayerlistTracker playerlistTracker; private final SkinPacketTracker skinTracker; public EntityHumanNPC(MinecraftServer minecraftServer, WorldServer world, GameProfile gameProfile, @@ -101,10 +99,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable } @Override - public boolean a(EntityPlayer entityplayer) { - if (npc != null && playerlistTracker == null) - return false; - return super.a(entityplayer); + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); } public float a(PathType pathtype) { @@ -396,10 +392,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable npc.getOrAddTrait(SkinTrait.class).setSkinPersistent(skinName, signature, data); } - public void setTracked(PlayerlistTracker tracker) { - this.playerlistTracker = tracker; - } - @Override public void tick() { super.tick(); diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EvokerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EvokerController.java index af2261f0c..2d9024d27 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EvokerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/EvokerController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityEvoker; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -42,6 +43,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/FoxController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/FoxController.java index 9524de4e2..d41d1eec8 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/FoxController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/FoxController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityFox; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -46,6 +47,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends EntityFox implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GhastController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GhastController.java index 06f10279c..b925b1440 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GhastController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GhastController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityGhast; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -40,6 +41,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GiantController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GiantController.java index 0a9cdc4aa..00c95d270 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GiantController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GiantController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityGiantZombie; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -42,6 +43,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianController.java index 1f6be0e44..3020f2ee9 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityGuardian; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -42,6 +43,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianElderController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianElderController.java index 9edcdb17b..13b2bdadf 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianElderController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/GuardianElderController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityGuardianElder; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -42,6 +43,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseController.java index 21b94737c..f0cbf152e 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHorse; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -53,6 +54,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseDonkeyController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseDonkeyController.java index 88d2fd7bc..658dcce88 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseDonkeyController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseDonkeyController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHorseDonkey; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -53,6 +54,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseMuleController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseMuleController.java index 856e0c22d..981f3f22e 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseMuleController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseMuleController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHorseMule; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -53,6 +54,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseSkeletonController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseSkeletonController.java index ae721a02e..086958d68 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseSkeletonController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseSkeletonController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHorseSkeleton; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -53,6 +54,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseZombieController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseZombieController.java index df484379f..6dcf68678 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseZombieController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/HorseZombieController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHorseZombie; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -53,6 +54,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IllusionerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IllusionerController.java index bee946808..adb8b2357 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IllusionerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IllusionerController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityIllagerIllusioner; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -42,6 +43,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IronGolemController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IronGolemController.java index 8d5ca0122..81ecd3d7e 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IronGolemController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/IronGolemController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityIronGolem; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -42,6 +43,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/LlamaController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/LlamaController.java index e439b2690..f8ece0f04 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/LlamaController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/LlamaController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityLlama; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -53,6 +54,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MagmaCubeController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MagmaCubeController.java index 75cf8114f..ddba06f52 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MagmaCubeController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MagmaCubeController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMagmaCube; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -44,6 +45,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMagmaCubeNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MushroomCowController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MushroomCowController.java index 9b4a7e53c..472c54b3e 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MushroomCowController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/MushroomCowController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityMushroomCow; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -45,6 +46,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/OcelotController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/OcelotController.java index e03546217..87c478e3c 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/OcelotController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/OcelotController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityOcelot; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -43,6 +44,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PandaController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PandaController.java index 370e9cca8..794b5ef89 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PandaController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PandaController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityPanda; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -43,6 +44,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends EntityPanda implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ParrotController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ParrotController.java index 59385d4e9..f735389d1 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ParrotController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ParrotController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityParrot; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PhantomController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PhantomController.java index c1468a502..8e4955c4c 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PhantomController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PhantomController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityPhantom; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumDifficulty; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -45,6 +46,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPhantomNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigController.java index 48fdcbcc8..da0f3edb4 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityLightning; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityPig; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -44,6 +45,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigZombieController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigZombieController.java index 13edfad41..f70c32f91 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigZombieController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PigZombieController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityPigZombie; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -42,6 +43,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PillagerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PillagerController.java index e3cef52ab..43cb3b11d 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PillagerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PillagerController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; import net.minecraft.server.v1_14_R1.EntityPillager; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -43,6 +44,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends EntityPillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PolarBearController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PolarBearController.java index 1560d64d3..1f8b3dfaa 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PolarBearController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PolarBearController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.DataWatcherObject; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityPolarBear; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -41,6 +42,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PufferFishController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PufferFishController.java index 94dc36bb0..4f883abc2 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PufferFishController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/PufferFishController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityPose; import net.minecraft.server.v1_14_R1.EntityPufferFish; import net.minecraft.server.v1_14_R1.EntitySize; @@ -50,6 +51,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPufferFishNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RabbitController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RabbitController.java index c030d2d46..b58267b99 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RabbitController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RabbitController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityLiving; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityRabbit; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -44,6 +45,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RavagerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RavagerController.java index c04a7314d..8f251a755 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RavagerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/RavagerController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.DataWatcherObject; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityRavager; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends EntityRavager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SalmonController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SalmonController.java index 6f6097819..2f41f18b1 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SalmonController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SalmonController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySalmon; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; @@ -47,6 +48,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySalmonNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SheepController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SheepController.java index a5393535d..a89d6db65 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SheepController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SheepController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.DataWatcherObject; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySheep; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ShulkerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ShulkerController.java index 0cea378ee..fb4a7bbe6 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ShulkerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ShulkerController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityAIBodyControl; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityShulker; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SilverfishController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SilverfishController.java index 2eddbb76b..e831f3e43 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SilverfishController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SilverfishController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySilverfish; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonController.java index 8d0d73297..f948840c2 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySkeleton; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonStrayController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonStrayController.java index 164877de6..ddfbe883a 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonStrayController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonStrayController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySkeletonStray; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonWitherController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonWitherController.java index 1bcf48a69..965fc0f46 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonWitherController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SkeletonWitherController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySkeletonWither; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SlimeController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SlimeController.java index a203077ee..28515b2b9 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SlimeController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SlimeController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySlime; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -44,6 +45,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySlimeNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SnowmanController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SnowmanController.java index bab8ef22d..6f52ea4f7 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SnowmanController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SnowmanController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySnowman; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SpiderController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SpiderController.java index 1901f5345..161db6ae7 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SpiderController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SpiderController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySpider; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SquidController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SquidController.java index 3068b6a86..e71b617b4 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SquidController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/SquidController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySquid; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TraderLlamaController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TraderLlamaController.java index 2fb6c8337..32197ca45 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TraderLlamaController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TraderLlamaController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityLlamaTrader; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -53,6 +54,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends EntityLlamaTrader implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TropicalFishController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TropicalFishController.java index a2e4d5a92..5d0f55c56 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TropicalFishController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TropicalFishController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTropicalFish; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; @@ -47,6 +48,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTropicalFishNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TurtleController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TurtleController.java index 3bb3e3259..9791cc2f8 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TurtleController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/TurtleController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityInsentient; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTurtle; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -45,6 +46,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTurtleNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VexController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VexController.java index d29b48441..427681666 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VexController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VexController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityVex; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -40,6 +41,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityVexNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VillagerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VillagerController.java index d5cec3088..f6aff55d6 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VillagerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VillagerController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityLightning; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityVillager; import net.minecraft.server.v1_14_R1.EnumHand; @@ -51,6 +52,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private TreeMap behaviorMap; private boolean blockingATrade; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VindicatorController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VindicatorController.java index 4e017df0d..97ac42e42 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VindicatorController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/VindicatorController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_14_R1.DataWatcherObject; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityVindicator; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WanderingTraderController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WanderingTraderController.java index e3bb6f395..843f9a400 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WanderingTraderController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WanderingTraderController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityLightning; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityVillagerTrader; import net.minecraft.server.v1_14_R1.EnumHand; @@ -51,6 +52,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends EntityVillagerTrader implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private TreeMap behaviorMap; private boolean blockingATrade; diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitchController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitchController.java index 0da210782..f802c2c16 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitchController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitchController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityWitch; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitherController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitherController.java index df6638956..0723ea5ea 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitherController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WitherController.java @@ -19,6 +19,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityWither; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -40,6 +41,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WolfController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WolfController.java index 9ef35c02b..c758c2802 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WolfController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/WolfController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityLiving; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityWolf; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -45,6 +46,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieController.java index 252d0ee39..f79d3d66b 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityZombie; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieHuskController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieHuskController.java index 1e2623cf6..6f354fbc9 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieHuskController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieHuskController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityZombieHusk; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieVillagerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieVillagerController.java index f6acbfc1e..37f54e4f6 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieVillagerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/ZombieVillagerController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.Entity; import net.minecraft.server.v1_14_R1.EntityBoat; import net.minecraft.server.v1_14_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityZombieVillager; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/AreaEffectCloudController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/AreaEffectCloudController.java index d08133066..fe992cb3e 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/AreaEffectCloudController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityAreaEffectCloud; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -49,6 +51,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/BoatController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/BoatController.java index 4b1b1bc82..29af915e6 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/BoatController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/BoatController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityBoat; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -49,6 +51,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBoatNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/DragonFireballController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/DragonFireballController.java index 96ad93613..2ce34808e 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/DragonFireballController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/DragonFireballController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityDragonFireball; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -49,6 +51,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EggController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EggController.java index 39f2ae862..e742ee64f 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EggController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EggController.java @@ -16,9 +16,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityEgg; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -60,6 +62,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEggNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderCrystalController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderCrystalController.java index 4d1652bdb..02c57033c 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderCrystalController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityEnderCrystal; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -49,6 +51,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderPearlController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderPearlController.java index e01e5c887..b4adbc8b7 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderPearlController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderPearlController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityEnderPearl; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -49,6 +51,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderSignalController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderSignalController.java index 0193b6cbb..52e2ed41d 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderSignalController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EnderSignalController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityEnderSignal; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -49,6 +51,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EvokerFangsController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EvokerFangsController.java index cbf646abf..a6a20448a 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EvokerFangsController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/EvokerFangsController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityEvokerFangs; import net.minecraft.server.v1_14_R1.EntityHuman; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumHand; import net.minecraft.server.v1_14_R1.EnumInteractionResult; @@ -40,6 +42,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ExperienceOrbController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ExperienceOrbController.java index 5839c4f4b..154a16627 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ExperienceOrbController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityExperienceOrb; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -35,6 +37,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FallingBlockController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FallingBlockController.java index a67ab70c4..ef4539251 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FallingBlockController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FallingBlockController.java @@ -17,10 +17,12 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.Block; import net.minecraft.server.v1_14_R1.EntityFallingBlock; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumMoveType; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -52,6 +54,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FireworkController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FireworkController.java index 2f8626f36..04eca6c79 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FireworkController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FireworkController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityFireworks; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -35,6 +37,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FishingHookController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FishingHookController.java index 321d72c9f..3665fdaf8 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FishingHookController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/FishingHookController.java @@ -46,6 +46,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemController.java index 178842e7d..3694d0ac9 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemController.java @@ -16,10 +16,12 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityHuman; import net.minecraft.server.v1_14_R1.EntityItem; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -47,6 +49,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemFrameController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemFrameController.java index fda9e2e0b..ebf80797d 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemFrameController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ItemFrameController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.BlockPosition; import net.minecraft.server.v1_14_R1.EntityItemFrame; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumDirection; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -48,6 +50,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LargeFireballController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LargeFireballController.java index 6c41b610b..4a6dabe80 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LargeFireballController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LargeFireballController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityLargeFireball; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -35,6 +37,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LeashController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LeashController.java index efb541e45..d21c12d75 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LeashController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LeashController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityLeash; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -35,6 +37,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LlamaSpitController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LlamaSpitController.java index 02d1c7c96..e1d9eb714 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LlamaSpitController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/LlamaSpitController.java @@ -16,10 +16,12 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityLlama; import net.minecraft.server.v1_14_R1.EntityLlamaSpit; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -49,6 +51,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartChestController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartChestController.java index e8166610a..770b39ea8 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartChestController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartChestController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartChest; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -35,6 +37,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartCommandController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartCommandController.java index 95d465d32..27ddac449 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartCommandController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartCommandBlock; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -35,6 +37,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartFurnaceController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartFurnaceController.java index cb32f82b4..57609d9b1 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartFurnaceController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartFurnace; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -35,6 +37,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartHopperController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartHopperController.java index 475cdcec1..1ecdeaae7 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartHopperController.java @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartHopper; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -31,6 +33,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartRideableController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartRideableController.java index 8320dec35..8d5e0b48d 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartRideableController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartRideable; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -35,6 +37,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartSpawnerController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartSpawnerController.java index d48543189..5f1110c37 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartSpawnerController.java @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartMobSpawner; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -31,6 +33,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartTNTController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartTNTController.java index a5e45c450..864044059 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/MinecartTNTController.java @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityMinecartTNT; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -31,6 +33,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/PaintingController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/PaintingController.java index d2de2e140..7b82f8916 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/PaintingController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/PaintingController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; import net.minecraft.server.v1_14_R1.EntityPainting; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; import net.minecraft.server.v1_14_R1.FluidType; @@ -35,6 +37,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ShulkerBulletController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ShulkerBulletController.java index 89b2daea6..4d93a6aab 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ShulkerBulletController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityShulkerBullet; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -35,6 +37,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SmallFireballController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SmallFireballController.java index 17a5454fe..302888e41 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SmallFireballController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SmallFireballController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySmallFireball; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -35,6 +37,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SnowballController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SnowballController.java index 9396e0758..c0da3353c 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SnowballController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SnowballController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySnowball; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -35,6 +37,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SpectralArrowController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SpectralArrowController.java index 0de9f824d..c6d0c3fcc 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/SpectralArrowController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntitySpectralArrow; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -35,6 +37,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TNTPrimedController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TNTPrimedController.java index 10a64f79d..654a5ce40 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TNTPrimedController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTNTPrimed; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -35,6 +37,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownExpBottleController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownExpBottleController.java index c6e11cd82..6bfed95f1 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownExpBottleController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityThrownExpBottle; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -35,6 +37,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownPotionController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownPotionController.java index 6fa7bdf57..35056c97f 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownPotionController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityPotion; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -36,6 +38,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownTridentController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownTridentController.java index 7aa2931b0..c41e5eb09 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownTridentController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/ThrownTridentController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityThrownTrident; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -35,6 +37,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends EntityThrownTrident implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TippedArrowController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TippedArrowController.java index 986c1a4e2..1fbddaa39 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TippedArrowController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/TippedArrowController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTippedArrow; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -35,6 +37,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityTypes types, World world) { diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/WitherSkullController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/WitherSkullController.java index 60b3ac531..9ae7b6c06 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/WitherSkullController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/nonliving/WitherSkullController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_14_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_14_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.AxisAlignedBB; +import net.minecraft.server.v1_14_R1.EntityPlayer; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.EntityWitherSkull; import net.minecraft.server.v1_14_R1.EnumPistonReaction; @@ -35,6 +37,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityTypes types, World world) { 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 5f1e7f5be..a5b5b2be2 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 @@ -1192,9 +1192,6 @@ public class NMSImpl implements NMSBridge { entry.a(); PlayerlistTracker replace = new PlayerlistTracker(server.getChunkProvider().playerChunkMap, entry); server.getChunkProvider().playerChunkMap.trackedEntities.put(entity.getEntityId(), replace); - if (getHandle(entity) instanceof EntityHumanNPC) { - ((EntityHumanNPC) getHandle(entity)).setTracked(replace); - } } @Override 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 671efc907..b85cf6c8f 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 @@ -247,7 +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)) { + if (var11 >= 1.0E-8D) { double var13 = 1.0D / Math.sqrt(var11); var7 *= var13; var9 *= var13; 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 dbeaf84fb..04410974c 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 @@ -165,9 +165,13 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map((Function) EntityPlayer::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()); + 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/ArmorStandController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ArmorStandController.java index 5a96a17ad..e8986b619 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ArmorStandController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ArmorStandController.java @@ -20,6 +20,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityArmorStand; import net.minecraft.server.v1_15_R1.EntityHuman; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; import net.minecraft.server.v1_15_R1.EnumInteractionResult; @@ -47,6 +48,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityArmorStandNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BatController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BatController.java index 5115bacde..b96c46419 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BatController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BatController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBat; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -47,6 +48,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBatNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BeeController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BeeController.java index 5d422ef73..34956e7bc 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BeeController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BeeController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBee; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -47,6 +48,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends EntityBee implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BlazeController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BlazeController.java index 3c4ce8293..0f3440400 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BlazeController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/BlazeController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBlaze; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -47,6 +48,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CatController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CatController.java index 8b1923de6..dee276578 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CatController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CatController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityCat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -50,6 +51,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends EntityCat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCatNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CaveSpiderController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CaveSpiderController.java index d93223cb5..e5626e0b7 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CaveSpiderController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CaveSpiderController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityCaveSpider; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -49,6 +50,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ChickenController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ChickenController.java index d2f2a6298..c295a97d0 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ChickenController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ChickenController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityChicken; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -50,6 +51,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CodController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CodController.java index 2408a7786..bda3faf1c 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CodController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CodController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityCod; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -55,6 +56,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends EntityCod implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CowController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CowController.java index a50130273..f434aa134 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CowController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CowController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityCow; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -54,6 +55,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCowNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CreeperController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CreeperController.java index 21cf28576..997d4fde7 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CreeperController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/CreeperController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityCreeper; import net.minecraft.server.v1_15_R1.EntityLightning; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -50,6 +51,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DolphinController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DolphinController.java index dc18342a4..d20682e3e 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DolphinController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DolphinController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityDolphin; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -52,6 +53,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean inProtectedTick; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DrownedController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DrownedController.java index acd93fbd6..d010ddb4c 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DrownedController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/DrownedController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityDrowned; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -49,6 +50,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EnderDragonController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EnderDragonController.java index 0b944d5e9..3b436adc1 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EnderDragonController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EnderDragonController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityEnderDragon; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -53,6 +54,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermanController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermanController.java index 6004f0792..bc376a220 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermanController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermanController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityEnderman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -49,6 +50,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermiteController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermiteController.java index b3511d465..02a1c64a9 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermiteController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EndermiteController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityEndermite; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -49,6 +50,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EntityHumanNPC.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EntityHumanNPC.java index 75bcb82a6..8ac4040cc 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 @@ -30,7 +30,6 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.nms.v1_15_R1.util.PlayerControllerJump; import net.citizensnpcs.nms.v1_15_R1.util.PlayerControllerMove; import net.citizensnpcs.nms.v1_15_R1.util.PlayerNavigation; -import net.citizensnpcs.nms.v1_15_R1.util.PlayerlistTracker; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.skin.SkinPacketTracker; @@ -75,7 +74,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable private PlayerNavigation navigation; private final CitizensNPC npc; private final Location packetLocationCache = new Location(null, 0, 0, 0); - private PlayerlistTracker playerlistTracker; private final SkinPacketTracker skinTracker; public EntityHumanNPC(MinecraftServer minecraftServer, WorldServer world, GameProfile gameProfile, @@ -100,10 +98,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable } @Override - public boolean a(EntityPlayer entityplayer) { - if (npc != null && playerlistTracker == null) - return false; - return super.a(entityplayer); + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); } public float a(PathType pathtype) { @@ -372,10 +368,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable npc.getOrAddTrait(SkinTrait.class).setSkinPersistent(skinName, signature, data); } - public void setTracked(PlayerlistTracker tracker) { - this.playerlistTracker = tracker; - } - @Override public void tick() { super.tick(); diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EvokerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EvokerController.java index fbc923476..daf0f0805 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EvokerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/EvokerController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityEvoker; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -43,6 +44,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/FoxController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/FoxController.java index d855c56e6..a2edd479a 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/FoxController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/FoxController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityFox; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -47,6 +48,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends EntityFox implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GhastController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GhastController.java index 008b3690b..e39174445 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GhastController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GhastController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityGhast; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -41,6 +42,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GiantController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GiantController.java index 04b3af0e8..122e21084 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GiantController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GiantController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityGiantZombie; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -43,6 +44,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianController.java index 5b92d98c4..01a6b930a 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityGuardian; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -43,6 +44,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianElderController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianElderController.java index 360b9b11d..7dc9459af 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianElderController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/GuardianElderController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityGuardianElder; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -43,6 +44,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseController.java index dec425e4a..e40a99491 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHorse; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -54,6 +55,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseDonkeyController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseDonkeyController.java index ea8a37977..8dddc870c 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseDonkeyController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseDonkeyController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHorseDonkey; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -54,6 +55,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseMuleController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseMuleController.java index 817773da7..0a4f6858e 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseMuleController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseMuleController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHorseMule; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -54,6 +55,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseSkeletonController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseSkeletonController.java index 33a07479c..ca6fe3f78 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseSkeletonController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseSkeletonController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHorseSkeleton; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -54,6 +55,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseZombieController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseZombieController.java index 5434e6434..244117ae7 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseZombieController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/HorseZombieController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHorseZombie; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -54,6 +55,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IllusionerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IllusionerController.java index 039c67e84..b6e452a64 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IllusionerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IllusionerController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityIllagerIllusioner; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -43,6 +44,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IronGolemController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IronGolemController.java index 020acdfd3..07f03d64f 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IronGolemController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/IronGolemController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityIronGolem; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -43,6 +44,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/LlamaController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/LlamaController.java index 31eaea038..8054f5dca 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/LlamaController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/LlamaController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityLlama; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -54,6 +55,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MagmaCubeController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MagmaCubeController.java index ba46cc259..8d869af1f 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MagmaCubeController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MagmaCubeController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMagmaCube; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -46,6 +47,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MushroomCowController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MushroomCowController.java index c9b5fa45a..efca0f5e8 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MushroomCowController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/MushroomCowController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityMushroomCow; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -46,6 +47,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/OcelotController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/OcelotController.java index 3bb34292e..84bee357a 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/OcelotController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/OcelotController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityOcelot; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityPose; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -45,6 +46,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PandaController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PandaController.java index a35e62b33..175618f25 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PandaController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PandaController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityPanda; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -44,6 +45,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends EntityPanda implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ParrotController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ParrotController.java index 6eacc3ea4..ae4b4690d 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ParrotController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ParrotController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityParrot; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PhantomController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PhantomController.java index 6e0451847..d300c3bae 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PhantomController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PhantomController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityPhantom; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -46,6 +47,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerLook oldLookController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigController.java index 1fa62517f..ac97e8163 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityLightning; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityPig; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -45,6 +46,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigZombieController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigZombieController.java index a34569c2f..a5f1b1bb2 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigZombieController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PigZombieController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityPigZombie; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -43,6 +44,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PillagerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PillagerController.java index faee39674..f6e81c7e9 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PillagerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PillagerController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; import net.minecraft.server.v1_15_R1.EntityPillager; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -44,6 +45,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends EntityPillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PolarBearController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PolarBearController.java index c42367601..c23a7c7ac 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PolarBearController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PolarBearController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.DataWatcherObject; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityPolarBear; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PufferFishController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PufferFishController.java index 4c4dce8f3..cf6bb9539 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PufferFishController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/PufferFishController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityPose; import net.minecraft.server.v1_15_R1.EntityPufferFish; import net.minecraft.server.v1_15_R1.EntitySize; @@ -52,6 +53,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RabbitController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RabbitController.java index 9d92100a2..fe000c7ba 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RabbitController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RabbitController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityLiving; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityRabbit; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -45,6 +46,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RavagerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RavagerController.java index 8f7fee052..10028d979 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RavagerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/RavagerController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.DataWatcherObject; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityRavager; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -44,6 +45,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends EntityRavager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SalmonController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SalmonController.java index 7341abb9f..885011bf5 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SalmonController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SalmonController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySalmon; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; @@ -49,6 +50,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SheepController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SheepController.java index 648f26b5d..6b9e80eb8 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SheepController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SheepController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.DataWatcherObject; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySheep; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -44,6 +45,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ShulkerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ShulkerController.java index 71a1da0ce..be3ee2f53 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ShulkerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ShulkerController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityAIBodyControl; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityShulker; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -44,6 +45,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SilverfishController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SilverfishController.java index a24d8216a..3b6be448c 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SilverfishController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SilverfishController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySilverfish; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonController.java index a4a4275f9..798973a3f 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySkeleton; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonStrayController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonStrayController.java index 2d3c30c75..fe67911e4 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonStrayController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonStrayController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySkeletonStray; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonWitherController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonWitherController.java index d18782812..6a558bc44 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonWitherController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SkeletonWitherController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySkeletonWither; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SlimeController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SlimeController.java index 8d08f4c0e..7e48b7923 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SlimeController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SlimeController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySlime; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -46,6 +47,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SnowmanController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SnowmanController.java index 9c8638342..182b24ad3 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SnowmanController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SnowmanController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySnowman; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SpiderController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SpiderController.java index cf7b63c4b..d30bbec96 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SpiderController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SpiderController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySpider; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SquidController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SquidController.java index 062c09c0b..7e4dcb2fb 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SquidController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/SquidController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySquid; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TraderLlamaController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TraderLlamaController.java index 524787ece..39d560f32 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TraderLlamaController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TraderLlamaController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityLlamaTrader; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -54,6 +55,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends EntityLlamaTrader implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TropicalFishController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TropicalFishController.java index 8435edddc..013868730 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TropicalFishController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TropicalFishController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTropicalFish; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; @@ -49,6 +50,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TurtleController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TurtleController.java index c0390a5da..8d6d897a5 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TurtleController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/TurtleController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityInsentient; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTurtle; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -47,6 +48,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerJump oldJumpController; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VexController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VexController.java index 1ba6b4ee7..22ea6ddaa 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VexController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VexController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityVex; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -41,6 +42,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityVexNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VillagerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VillagerController.java index e693391ab..14fef6441 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VillagerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VillagerController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityLightning; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityVillager; import net.minecraft.server.v1_15_R1.EnumHand; @@ -51,6 +52,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean blockingATrade; private final CitizensNPC npc; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VindicatorController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VindicatorController.java index a04f1f051..d337d6973 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VindicatorController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/VindicatorController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_15_R1.DataWatcherObject; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityVindicator; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -44,6 +45,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WanderingTraderController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WanderingTraderController.java index e7ea14e99..1ebeb55da 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WanderingTraderController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WanderingTraderController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityLightning; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityVillagerTrader; import net.minecraft.server.v1_15_R1.EnumHand; @@ -51,6 +52,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends EntityVillagerTrader implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean blockingATrade; private boolean blockTrades = true; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitchController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitchController.java index 052b08ab1..39b64eb3e 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitchController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitchController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityWitch; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -42,6 +43,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitherController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitherController.java index b598c408b..e7c2f4bee 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitherController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WitherController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityWither; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -41,6 +42,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WolfController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WolfController.java index 742c04f6a..26dab48d0 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WolfController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/WolfController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityLiving; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityWolf; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -46,6 +47,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieController.java index f9eb0d952..78075ae9e 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityZombie; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieHuskController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieHuskController.java index be788d306..ec549887a 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieHuskController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieHuskController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityZombieHusk; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieVillagerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieVillagerController.java index 3c7f1828f..077a0902f 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieVillagerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/ZombieVillagerController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_15_R1.DamageSource; import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityMinecartAbstract; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityZombieVillager; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -43,6 +44,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/AreaEffectCloudController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/AreaEffectCloudController.java index 416a606d5..49bc66a05 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/AreaEffectCloudController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityAreaEffectCloud; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -42,6 +44,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/BoatController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/BoatController.java index 8c20bff3a..4d32cb8b5 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/BoatController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/BoatController.java @@ -14,11 +14,13 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.BlockPosition; import net.minecraft.server.v1_15_R1.EntityBoat; import net.minecraft.server.v1_15_R1.EntityHuman; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumMoveType; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -48,6 +50,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double aD; private float aE; diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/DragonFireballController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/DragonFireballController.java index 79eab08cc..9d06c9555 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/DragonFireballController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/DragonFireballController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityDragonFireball; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -42,6 +44,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EggController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EggController.java index 68a790948..b74fe66a7 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EggController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EggController.java @@ -17,9 +17,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityEgg; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -53,6 +55,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEggNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderCrystalController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderCrystalController.java index fc5f95247..77c4eae4a 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderCrystalController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityEnderCrystal; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -42,6 +44,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderPearlController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderPearlController.java index 854f4fec6..ca64284f3 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderPearlController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderPearlController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityEnderPearl; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -42,6 +44,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderSignalController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderSignalController.java index bec36fcd6..f95b4462e 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderSignalController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EnderSignalController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityEnderSignal; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -42,6 +44,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EvokerFangsController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EvokerFangsController.java index 345a0da0b..facb9067b 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EvokerFangsController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/EvokerFangsController.java @@ -16,10 +16,12 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityEvokerFangs; import net.minecraft.server.v1_15_R1.EntityHuman; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumHand; import net.minecraft.server.v1_15_R1.EnumInteractionResult; @@ -41,6 +43,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ExperienceOrbController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ExperienceOrbController.java index f9628744d..2f77d1874 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ExperienceOrbController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityExperienceOrb; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -36,6 +38,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FallingBlockController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FallingBlockController.java index b95a77f13..f293b46b5 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FallingBlockController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FallingBlockController.java @@ -17,10 +17,12 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.Block; import net.minecraft.server.v1_15_R1.EntityFallingBlock; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumMoveType; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -52,6 +54,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FireworkController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FireworkController.java index 09b1fac24..0b7454b7f 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FireworkController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FireworkController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityFireworks; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -36,6 +38,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FishingHookController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FishingHookController.java index 43de2564b..e45e1bb0c 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FishingHookController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/FishingHookController.java @@ -47,6 +47,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemController.java index a283eba6a..303c6dd10 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemController.java @@ -16,10 +16,12 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityHuman; import net.minecraft.server.v1_15_R1.EntityItem; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -47,6 +49,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemFrameController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemFrameController.java index 492d6afc2..eac5a5235 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemFrameController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ItemFrameController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.BlockPosition; import net.minecraft.server.v1_15_R1.EntityItemFrame; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumDirection; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -48,6 +50,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LargeFireballController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LargeFireballController.java index 6bd1793b6..863aadf42 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LargeFireballController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LargeFireballController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityLargeFireball; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -36,6 +38,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LeashController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LeashController.java index 9579d2457..0826ff279 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LeashController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LeashController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityLeash; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -36,6 +38,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LlamaSpitController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LlamaSpitController.java index 71608809c..1875291a2 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LlamaSpitController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/LlamaSpitController.java @@ -17,10 +17,12 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityLlama; import net.minecraft.server.v1_15_R1.EntityLlamaSpit; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -50,6 +52,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartChestController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartChestController.java index b56133652..21a51feaa 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartChestController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartChestController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartChest; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -36,6 +38,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartCommandController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartCommandController.java index cc57bc33c..ab067c90f 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartCommandController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartCommandBlock; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -36,6 +38,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartFurnaceController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartFurnaceController.java index e06009e84..e2e4ef922 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartFurnaceController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartFurnace; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -36,6 +38,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartHopperController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartHopperController.java index 95e0f9c3a..2d674e08e 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartHopperController.java @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartHopper; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -31,6 +33,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartRideableController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartRideableController.java index fe0229a4a..e6819154e 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartRideableController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartRideable; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -36,6 +38,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartSpawnerController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartSpawnerController.java index 5f2cefd7e..77ff42f2b 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartSpawnerController.java @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartMobSpawner; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -31,6 +33,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartTNTController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartTNTController.java index 88c3f04b7..aa88587bf 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/MinecartTNTController.java @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityMinecartTNT; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -31,6 +33,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/PaintingController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/PaintingController.java index ce3579bba..49834cd63 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/PaintingController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/PaintingController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; import net.minecraft.server.v1_15_R1.EntityPainting; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; import net.minecraft.server.v1_15_R1.FluidType; @@ -36,6 +38,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ShulkerBulletController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ShulkerBulletController.java index 77553a2f7..27f48ccf0 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ShulkerBulletController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityShulkerBullet; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -36,6 +38,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SmallFireballController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SmallFireballController.java index a9d4fc68a..96b589c68 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SmallFireballController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SmallFireballController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySmallFireball; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -36,6 +38,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SnowballController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SnowballController.java index d0c5ba28d..9f78604a4 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SnowballController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SnowballController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySnowball; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -36,6 +38,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SpectralArrowController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SpectralArrowController.java index 1e8a27c59..7373a2423 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/SpectralArrowController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntitySpectralArrow; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -36,6 +38,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TNTPrimedController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TNTPrimedController.java index efc170b41..5a162a377 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TNTPrimedController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTNTPrimed; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -36,6 +38,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownExpBottleController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownExpBottleController.java index 9335654c6..9aea12bdb 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownExpBottleController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityThrownExpBottle; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -36,6 +38,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownPotionController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownPotionController.java index ce9cc5e18..a679c2101 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownPotionController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityPotion; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -37,6 +39,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownTridentController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownTridentController.java index 20bff29f5..8a91b234b 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownTridentController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/ThrownTridentController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityThrownTrident; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -36,6 +38,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends EntityThrownTrident implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TippedArrowController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TippedArrowController.java index 2cb4ab72c..4fe9f443f 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TippedArrowController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/TippedArrowController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTippedArrow; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -36,6 +38,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/WitherSkullController.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/WitherSkullController.java index aec53a684..a7ef2b1a4 100644 --- a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/WitherSkullController.java +++ b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/entity/nonliving/WitherSkullController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_15_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_15_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_15_R1.AxisAlignedBB; +import net.minecraft.server.v1_15_R1.EntityPlayer; import net.minecraft.server.v1_15_R1.EntityTypes; import net.minecraft.server.v1_15_R1.EntityWitherSkull; import net.minecraft.server.v1_15_R1.EnumPistonReaction; @@ -36,6 +38,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityTypes types, World world) { diff --git a/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/NMSImpl.java b/v1_15_R1/src/main/java/net/citizensnpcs/nms/v1_15_R1/util/NMSImpl.java index 68f8e3645..494ba9140 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 @@ -1209,9 +1209,6 @@ public class NMSImpl implements NMSBridge { entry.a(); PlayerlistTracker replace = new PlayerlistTracker(server.getChunkProvider().playerChunkMap, entry); server.getChunkProvider().playerChunkMap.trackedEntities.put(entity.getEntityId(), replace); - if (getHandle(entity) instanceof EntityHumanNPC) { - ((EntityHumanNPC) getHandle(entity)).setTracked(replace); - } } @Override 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 cba542a74..2e59dcff0 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 @@ -257,7 +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)) { + if (var11 >= 1.0E-8D) { double var13 = 1.0D / Math.sqrt(var11); var7 *= var13; var9 *= var13; 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 aafe804c5..21d6ce703 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 @@ -165,9 +165,13 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map((Function) EntityPlayer::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()); + 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/ArmorStandController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ArmorStandController.java index 5860a25d8..20a303cf6 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ArmorStandController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ArmorStandController.java @@ -17,10 +17,12 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityArmorStand; import net.minecraft.server.v1_16_R3.EntityHuman; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; @@ -47,6 +49,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder, ForwardingMobAI { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private MobAI ai; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BatController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BatController.java index 1c677b891..693f3f1ca 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BatController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BatController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBat; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -47,6 +48,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBatNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BeeController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BeeController.java index 285a1017e..842006df8 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BeeController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BeeController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBee; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -47,6 +48,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends EntityBee implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BlazeController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BlazeController.java index 64ada45c2..9c13aa7ce 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BlazeController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/BlazeController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBlaze; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -47,6 +48,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CatController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CatController.java index 32dd286b1..e867252e5 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CatController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CatController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityCat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -50,6 +51,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends EntityCat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCatNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CaveSpiderController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CaveSpiderController.java index 5c7e22fdd..979ea5dbf 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CaveSpiderController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CaveSpiderController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityCaveSpider; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -49,6 +50,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ChickenController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ChickenController.java index e49d15e4e..66fd541b1 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ChickenController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ChickenController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityChicken; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -50,6 +51,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CodController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CodController.java index c74e6dc88..d391d2498 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CodController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CodController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityCod; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; @@ -56,6 +57,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends EntityCod implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CowController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CowController.java index 938966bd1..d19300f44 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CowController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CowController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityCow; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; @@ -55,6 +56,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCowNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CreeperController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CreeperController.java index f4aea327d..5bde24c38 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CreeperController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/CreeperController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityCreeper; import net.minecraft.server.v1_16_R3.EntityLightning; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -51,6 +52,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DolphinController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DolphinController.java index 1f37216e3..401a2ac89 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DolphinController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DolphinController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityDolphin; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -52,6 +53,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean inProtectedTick; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DrownedController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DrownedController.java index ee8ae7e38..599e17dbe 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DrownedController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/DrownedController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityDrowned; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -49,6 +50,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EnderDragonController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EnderDragonController.java index 01f0297d3..adb380b49 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EnderDragonController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EnderDragonController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityEnderDragon; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -53,6 +54,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermanController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermanController.java index 41a6c34ea..f19e2c1ea 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermanController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermanController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityEnderman; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -49,6 +50,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermiteController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermiteController.java index facd50291..e18c356a7 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermiteController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EndermiteController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityEndermite; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -49,6 +50,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EntityHumanNPC.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EntityHumanNPC.java index c3d355ee6..c7731a720 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 @@ -30,7 +30,6 @@ import net.citizensnpcs.nms.v1_16_R3.util.EmptyAdvancementDataPlayer; import net.citizensnpcs.nms.v1_16_R3.util.MobAI; import net.citizensnpcs.nms.v1_16_R3.util.MobAI.ForwardingMobAI; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; -import net.citizensnpcs.nms.v1_16_R3.util.PlayerlistTracker; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.skin.SkinPacketTracker; @@ -68,8 +67,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable private final Map equipmentCache = Maps.newEnumMap(EnumItemSlot.class); private int jumpTicks = 0; private final CitizensNPC npc; - private PlayerlistTracker playerlistTracker; - private final SkinPacketTracker skinTracker; public EntityHumanNPC(MinecraftServer minecraftServer, WorldServer world, GameProfile gameProfile, @@ -95,10 +92,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable } @Override - public boolean a(EntityPlayer entityplayer) { - if (npc != null && playerlistTracker == null) - return false; - return super.a(entityplayer); + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); } @Override @@ -338,10 +333,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable npc.getOrAddTrait(SkinTrait.class).setSkinPersistent(skinName, signature, data); } - public void setTracked(PlayerlistTracker tracker) { - this.playerlistTracker = tracker; - } - @Override public void tick() { super.tick(); diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EvokerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EvokerController.java index 5893122c0..0d46ae711 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EvokerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/EvokerController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityEvoker; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -43,6 +44,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/FoxController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/FoxController.java index cc42106b8..b075dbff6 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/FoxController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/FoxController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityFox; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -47,6 +48,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends EntityFox implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GhastController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GhastController.java index 924dd7990..4e3d91d7b 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GhastController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GhastController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityGhast; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -41,6 +42,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GiantController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GiantController.java index 5b0b3cc08..351b8b5ab 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GiantController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GiantController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityGiantZombie; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -43,6 +44,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianController.java index 3903d5b40..a121a05b1 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityGuardian; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -43,6 +44,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianElderController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianElderController.java index dbcb365ee..25d1155fa 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianElderController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/GuardianElderController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityGuardianElder; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -43,6 +44,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HoglinController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HoglinController.java index 45e07d821..3d05b336e 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HoglinController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HoglinController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHoglin; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -43,6 +44,11 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends EntityHoglin implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityHoglinNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseController.java index 6cc945c96..fbc545417 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHorse; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -54,6 +55,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseDonkeyController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseDonkeyController.java index 1d1149955..92b0b95eb 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseDonkeyController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseDonkeyController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHorseDonkey; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -54,6 +55,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseMuleController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseMuleController.java index 08849a71f..ddadb649c 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseMuleController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseMuleController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHorseMule; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -54,6 +55,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseSkeletonController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseSkeletonController.java index 55e9bd646..1fbd5dd81 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseSkeletonController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseSkeletonController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHorseSkeleton; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -54,6 +55,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseZombieController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseZombieController.java index b1f0aed59..27871631b 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseZombieController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/HorseZombieController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHorseZombie; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -54,6 +55,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IllusionerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IllusionerController.java index 84a13e585..77e4c981f 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IllusionerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IllusionerController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityIllagerIllusioner; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -43,6 +44,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IronGolemController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IronGolemController.java index 3075d8853..9648814f9 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IronGolemController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/IronGolemController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityIronGolem; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -43,6 +44,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/LlamaController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/LlamaController.java index 0bf4b266a..793766ddd 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/LlamaController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/LlamaController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityLlama; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -54,6 +55,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends EntityLlama implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MagmaCubeController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MagmaCubeController.java index bb5417acb..a7feb56f7 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MagmaCubeController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MagmaCubeController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityMagmaCube; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -46,6 +47,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MushroomCowController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MushroomCowController.java index 244f193ec..e52a289f9 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MushroomCowController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/MushroomCowController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityMushroomCow; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; @@ -47,6 +48,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/OcelotController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/OcelotController.java index 91c65c3ca..cfe9fecde 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/OcelotController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/OcelotController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityOcelot; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityPose; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -45,6 +46,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PandaController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PandaController.java index e878d30a4..f370a1922 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PandaController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PandaController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPanda; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -44,6 +45,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends EntityPanda implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ParrotController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ParrotController.java index 6a2e65cb7..20fe03101 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ParrotController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ParrotController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityParrot; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; @@ -44,6 +45,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends EntityParrot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PhantomController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PhantomController.java index 4c63261bd..ef9aa0d83 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PhantomController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PhantomController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPhantom; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -47,6 +48,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends EntityPhantom implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerLook oldLookController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigController.java index 4c2f561d9..e3786d956 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityLightning; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPig; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -46,6 +47,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigZombieController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigZombieController.java index fb36b1f3a..710737aa7 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigZombieController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PigZombieController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPigZombie; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -43,6 +44,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinBruteController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinBruteController.java index 8cadb5333..37c993bc5 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinBruteController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinBruteController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPiglinBrute; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -43,6 +44,11 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends EntityPiglinBrute implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinController.java index 29c163531..87aa75d9c 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PiglinController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPiglin; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; @@ -48,6 +49,11 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends EntityPiglin implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPiglinNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PillagerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PillagerController.java index f85ac88ba..f79364bca 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PillagerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PillagerController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; import net.minecraft.server.v1_16_R3.EntityPillager; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -44,6 +45,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends EntityPillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PolarBearController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PolarBearController.java index dfc811ced..6063a12fd 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PolarBearController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PolarBearController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DataWatcherObject; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityPolarBear; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -42,6 +43,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PufferFishController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PufferFishController.java index df8bd0e72..5daf24176 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PufferFishController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/PufferFishController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityPose; import net.minecraft.server.v1_16_R3.EntityPufferFish; import net.minecraft.server.v1_16_R3.EntitySize; @@ -53,6 +54,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends EntityPufferFish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RabbitController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RabbitController.java index 5fe36335a..31eb88893 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RabbitController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RabbitController.java @@ -23,6 +23,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityLiving; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityRabbit; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -45,6 +46,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RavagerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RavagerController.java index a0818e758..35c34020f 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RavagerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/RavagerController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.DataWatcherObject; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityRavager; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -44,6 +45,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends EntityRavager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SalmonController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SalmonController.java index 3cf18dae0..18b950dfc 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SalmonController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SalmonController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySalmon; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; @@ -50,6 +51,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends EntitySalmon implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SheepController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SheepController.java index 4420f3232..b38865411 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SheepController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SheepController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.DataWatcherObject; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySheep; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -44,6 +45,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ShulkerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ShulkerController.java index 4a4251516..25623140c 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ShulkerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ShulkerController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityAIBodyControl; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityShulker; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -44,6 +45,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends EntityShulker implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SilverfishController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SilverfishController.java index 9bd0581c9..a65ca3c4d 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SilverfishController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SilverfishController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySilverfish; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonController.java index 87776cf5c..d3b007fb3 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySkeleton; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonStrayController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonStrayController.java index c37e701b5..e0684f14a 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonStrayController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonStrayController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySkeletonStray; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonWitherController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonWitherController.java index 5c8d95dcb..b84674a53 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonWitherController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SkeletonWitherController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySkeletonWither; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SlimeController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SlimeController.java index c77d73fbb..73c5b41c6 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SlimeController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SlimeController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySlime; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -46,6 +47,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SnowmanController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SnowmanController.java index 91a1342a9..d821a2fb4 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SnowmanController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SnowmanController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySnowman; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SpiderController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SpiderController.java index eb4483a30..a24dcba1a 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SpiderController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SpiderController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySpider; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SquidController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SquidController.java index ddb111b7b..d996a29fe 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SquidController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/SquidController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySquid; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/StriderController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/StriderController.java index eede9b797..dc8663c91 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/StriderController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/StriderController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityStrider; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends EntityStrider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityStriderNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TraderLlamaController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TraderLlamaController.java index 222928859..81276e750 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TraderLlamaController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TraderLlamaController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityLlamaTrader; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -54,6 +55,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends EntityLlamaTrader implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TropicalFishController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TropicalFishController.java index f651261c7..8f9d230df 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TropicalFishController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TropicalFishController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTropicalFish; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; @@ -50,6 +51,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends EntityTropicalFish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerMove oldMoveController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TurtleController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TurtleController.java index 38512b439..ef286ccf4 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TurtleController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/TurtleController.java @@ -25,6 +25,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityInsentient; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTurtle; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -47,6 +48,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends EntityTurtle implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; private ControllerJump oldJumpController; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VexController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VexController.java index f7cacf41e..a5b20ea3e 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VexController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VexController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityVex; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -41,6 +42,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends EntityVex implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityVexNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VillagerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VillagerController.java index 8906ad46f..b79f8c47d 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VillagerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VillagerController.java @@ -26,6 +26,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityLightning; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityVillager; import net.minecraft.server.v1_16_R3.EnumHand; @@ -53,6 +54,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean blockingATrade; private final CitizensNPC npc; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VindicatorController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VindicatorController.java index 33a560554..71e42b77d 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VindicatorController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/VindicatorController.java @@ -22,6 +22,7 @@ import net.minecraft.server.v1_16_R3.DataWatcherObject; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityVindicator; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -44,6 +45,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WanderingTraderController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WanderingTraderController.java index d7ef5e408..c94bb541d 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WanderingTraderController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WanderingTraderController.java @@ -27,6 +27,7 @@ import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityLightning; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityVillagerTrader; import net.minecraft.server.v1_16_R3.EnumHand; @@ -53,6 +54,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends EntityVillagerTrader implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean blockingATrade; private boolean blockTrades = true; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitchController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitchController.java index e1f191d39..72c1d24a4 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitchController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitchController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityWitch; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitherController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitherController.java index 9dee01464..6fd1f18d8 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitherController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WitherController.java @@ -20,6 +20,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityWither; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -41,6 +42,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WolfController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WolfController.java index 3dcae1684..1a7dc0bee 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WolfController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/WolfController.java @@ -24,6 +24,7 @@ import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityLiving; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityWolf; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -46,6 +47,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZoglinController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZoglinController.java index d3781e7ea..c3c2b5988 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZoglinController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZoglinController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityZoglin; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends EntityZoglin implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZoglinNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieController.java index f44b6ff9c..307780f52 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityZombie; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieHuskController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieHuskController.java index 97d5e5eac..e76b69490 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieHuskController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieHuskController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityZombieHusk; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieVillagerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieVillagerController.java index c01bba771..bc5fee0d9 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieVillagerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/ZombieVillagerController.java @@ -21,6 +21,7 @@ import net.minecraft.server.v1_16_R3.DamageSource; import net.minecraft.server.v1_16_R3.Entity; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityMinecartAbstract; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityZombieVillager; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -43,6 +44,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/AreaEffectCloudController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/AreaEffectCloudController.java index eed610887..476515d45 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/AreaEffectCloudController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/AreaEffectCloudController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityAreaEffectCloud; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -42,6 +44,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/BoatController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/BoatController.java index 5153fea8a..8c551903c 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/BoatController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/BoatController.java @@ -14,11 +14,13 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.BlockPosition; import net.minecraft.server.v1_16_R3.EntityBoat; import net.minecraft.server.v1_16_R3.EntityHuman; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumMoveType; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -48,6 +50,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double aC; private float aD; diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/DragonFireballController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/DragonFireballController.java index b7ca835bf..bd1b88df7 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/DragonFireballController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/DragonFireballController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityDragonFireball; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -42,6 +44,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EggController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EggController.java index 48f6f36ae..6e0effcc8 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EggController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EggController.java @@ -17,9 +17,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityEgg; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -53,6 +55,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEggNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderCrystalController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderCrystalController.java index ba7138012..b621fcb03 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderCrystalController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderCrystalController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityEnderCrystal; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -42,6 +44,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderPearlController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderPearlController.java index 865e12072..492cf0fa3 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderPearlController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderPearlController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityEnderPearl; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -42,6 +44,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderSignalController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderSignalController.java index af1da93e5..435c67424 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderSignalController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EnderSignalController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityEnderSignal; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -42,6 +44,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EvokerFangsController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EvokerFangsController.java index d3f3da26e..681c1eb6a 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EvokerFangsController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/EvokerFangsController.java @@ -16,10 +16,12 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityEvokerFangs; import net.minecraft.server.v1_16_R3.EntityHuman; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumHand; import net.minecraft.server.v1_16_R3.EnumInteractionResult; @@ -41,6 +43,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ExperienceOrbController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ExperienceOrbController.java index 5d4573f8f..1e8994482 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ExperienceOrbController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ExperienceOrbController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityExperienceOrb; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -36,6 +38,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FallingBlockController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FallingBlockController.java index 18c4b4ca4..542ecb95c 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FallingBlockController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FallingBlockController.java @@ -17,10 +17,12 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.Block; import net.minecraft.server.v1_16_R3.EntityFallingBlock; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumMoveType; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -52,6 +54,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FireworkController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FireworkController.java index 6935e73fc..2990fb335 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FireworkController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FireworkController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityFireworks; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -36,6 +38,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FishingHookController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FishingHookController.java index b914b029e..f9e79057a 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FishingHookController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/FishingHookController.java @@ -49,6 +49,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemController.java index 75639a721..cf91dcc41 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemController.java @@ -16,10 +16,12 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityHuman; import net.minecraft.server.v1_16_R3.EntityItem; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -47,6 +49,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemFrameController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemFrameController.java index c01c3d893..d25124edd 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemFrameController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ItemFrameController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.BlockPosition; import net.minecraft.server.v1_16_R3.EntityItemFrame; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumDirection; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -48,6 +50,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LargeFireballController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LargeFireballController.java index 212a0330c..726b1a27e 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LargeFireballController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LargeFireballController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityLargeFireball; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -36,6 +38,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LeashController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LeashController.java index ecaacff36..d371ec405 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LeashController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LeashController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityLeash; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -36,6 +38,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LlamaSpitController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LlamaSpitController.java index 86c765f4a..1f03ac320 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LlamaSpitController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/LlamaSpitController.java @@ -17,10 +17,12 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityLlama; import net.minecraft.server.v1_16_R3.EntityLlamaSpit; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -50,6 +52,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartChestController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartChestController.java index 2740d3e25..5221653c3 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartChestController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartChestController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartChest; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -36,6 +38,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartCommandController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartCommandController.java index 82b66556b..7d85b2a96 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartCommandController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartCommandController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartCommandBlock; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -36,6 +38,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartFurnaceController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartFurnaceController.java index d60b295ae..1d6de9994 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartFurnaceController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartFurnaceController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartFurnace; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -36,6 +38,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartHopperController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartHopperController.java index c82c8da6a..680102ea8 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartHopperController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartHopperController.java @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartHopper; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -31,6 +33,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartRideableController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartRideableController.java index 7d3242145..d0791d0ee 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartRideableController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartRideableController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartRideable; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -36,6 +38,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartSpawnerController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartSpawnerController.java index e2a0fae68..709cfe731 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartSpawnerController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartSpawnerController.java @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartMobSpawner; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -31,6 +33,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartTNTController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartTNTController.java index e8ca1483c..28218282e 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartTNTController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/MinecartTNTController.java @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityMinecartTNT; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -31,6 +33,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/PaintingController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/PaintingController.java index 470d37cbd..0c9f9f9e4 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/PaintingController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/PaintingController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; import net.minecraft.server.v1_16_R3.EntityPainting; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; import net.minecraft.server.v1_16_R3.FluidType; @@ -36,6 +38,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ShulkerBulletController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ShulkerBulletController.java index b1d8205d1..2230f1278 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ShulkerBulletController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ShulkerBulletController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityShulkerBullet; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -36,6 +38,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SmallFireballController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SmallFireballController.java index ffdfb8f22..279cac4bb 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SmallFireballController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SmallFireballController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySmallFireball; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -36,6 +38,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SnowballController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SnowballController.java index fc2b77369..ac776db1d 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SnowballController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SnowballController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySnowball; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -36,6 +38,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SpectralArrowController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SpectralArrowController.java index b564b41d2..947b7e18b 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SpectralArrowController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/SpectralArrowController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntitySpectralArrow; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -36,6 +38,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TNTPrimedController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TNTPrimedController.java index 660cf623d..6d2fb34f1 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TNTPrimedController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TNTPrimedController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTNTPrimed; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -36,6 +38,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownExpBottleController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownExpBottleController.java index 63ef1a1cb..22d1c0893 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownExpBottleController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownExpBottleController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityThrownExpBottle; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -36,6 +38,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownPotionController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownPotionController.java index 4963d6ae9..090d1fbde 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownPotionController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownPotionController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityPotion; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -37,6 +39,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownTridentController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownTridentController.java index 293db5e95..0e4640cd1 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownTridentController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/ThrownTridentController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityThrownTrident; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -36,6 +38,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends EntityThrownTrident implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TippedArrowController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TippedArrowController.java index 96dbcc34e..b2bf9e022 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TippedArrowController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/TippedArrowController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTippedArrow; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -36,6 +38,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/WitherSkullController.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/WitherSkullController.java index 1e31ab6fb..1fca90548 100644 --- a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/WitherSkullController.java +++ b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/entity/nonliving/WitherSkullController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_16_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_16_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_16_R3.AxisAlignedBB; +import net.minecraft.server.v1_16_R3.EntityPlayer; import net.minecraft.server.v1_16_R3.EntityTypes; import net.minecraft.server.v1_16_R3.EntityWitherSkull; import net.minecraft.server.v1_16_R3.EnumPistonReaction; @@ -36,6 +38,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityTypes types, World world) { diff --git a/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java b/v1_16_R3/src/main/java/net/citizensnpcs/nms/v1_16_R3/util/NMSImpl.java index d6f986d24..db7cbe20a 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 @@ -101,7 +101,6 @@ import net.citizensnpcs.nms.v1_16_R3.entity.DrownedController; import net.citizensnpcs.nms.v1_16_R3.entity.EnderDragonController; import net.citizensnpcs.nms.v1_16_R3.entity.EndermanController; import net.citizensnpcs.nms.v1_16_R3.entity.EndermiteController; -import net.citizensnpcs.nms.v1_16_R3.entity.EntityHumanNPC; import net.citizensnpcs.nms.v1_16_R3.entity.EvokerController; import net.citizensnpcs.nms.v1_16_R3.entity.FoxController; import net.citizensnpcs.nms.v1_16_R3.entity.GhastController; @@ -1245,9 +1244,6 @@ public class NMSImpl implements NMSBridge { entry.a(); PlayerlistTracker replace = new PlayerlistTracker(server.getChunkProvider().playerChunkMap, entry); server.getChunkProvider().playerChunkMap.trackedEntities.put(entity.getEntityId(), replace); - if (getHandle(entity) instanceof EntityHumanNPC) { - ((EntityHumanNPC) getHandle(entity)).setTracked(replace); - } } @Override 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 219752933..e228355b8 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 @@ -165,9 +165,13 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map((Function) EntityPlayer::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()); + 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/entity/ArmorStandController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ArmorStandController.java index 0624e34b3..0d751dee1 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ArmorStandController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ArmorStandController.java @@ -15,8 +15,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -46,6 +48,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends ArmorStand implements NPCHolder, ForwardingMobAI { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private MobAI ai; private final CitizensNPC npc; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/AxolotlController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/AxolotlController.java index 7053e1b44..d565338fc 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/AxolotlController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/AxolotlController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; @@ -55,6 +56,11 @@ public class AxolotlController extends MobEntityController { } public static class EntityAxolotlNPC extends Axolotl implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BatController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BatController.java index 23ae6e15d..df857f926 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BatController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BatController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBatNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BeeController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BeeController.java index a78719cf9..1b6c9e26d 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BeeController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BeeController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BlazeController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BlazeController.java index 912df860f..b229aba64 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BlazeController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/BlazeController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CatController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CatController.java index e63900c4d..5f3a7fc5e 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CatController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CatController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCatNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CaveSpiderController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CaveSpiderController.java index 6dfef8c6c..3a8f0b2dc 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CaveSpiderController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CaveSpiderController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ChickenController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ChickenController.java index 6159667ae..9de613f9b 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ChickenController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ChickenController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CodController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CodController.java index 02a08d2d1..1246ff9c5 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CodController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CodController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; @@ -55,6 +56,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CowController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CowController.java index e7607411a..88ec55381 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CowController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CowController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; @@ -54,6 +55,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCowNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CreeperController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CreeperController.java index 0ecc281af..eca81c836 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CreeperController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/CreeperController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -50,6 +51,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DolphinController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DolphinController.java index 67b1f3e5c..42bab116a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DolphinController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DolphinController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -50,6 +51,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean inProtectedTick; private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DrownedController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DrownedController.java index 3655861bf..1eb94c11a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DrownedController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/DrownedController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EnderDragonController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EnderDragonController.java index 3f7b22cee..bb0026814 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EnderDragonController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EnderDragonController.java @@ -19,6 +19,7 @@ import net.citizensnpcs.trait.versioned.EnderDragonTrait; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -52,6 +53,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermanController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermanController.java index 40c1192cf..14e5405e9 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermanController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermanController.java @@ -19,6 +19,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -51,6 +52,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermiteController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermiteController.java index 06eacc26e..dba25e70e 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermiteController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EndermiteController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EntityHumanNPC.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EntityHumanNPC.java index 62d319dbf..88d1b1179 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EntityHumanNPC.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EntityHumanNPC.java @@ -28,7 +28,6 @@ import net.citizensnpcs.nms.v1_17_R1.util.EmptyServerStatsCounter; import net.citizensnpcs.nms.v1_17_R1.util.MobAI; import net.citizensnpcs.nms.v1_17_R1.util.MobAI.ForwardingMobAI; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; -import net.citizensnpcs.nms.v1_17_R1.util.PlayerlistTracker; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.skin.SkinPacketTracker; @@ -59,7 +58,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable private MobAI ai; private int jumpTicks = 0; private final CitizensNPC npc; - private PlayerlistTracker playerlistTracker; private final SkinPacketTracker skinTracker; private EmptyServerStatsCounter statsCache; @@ -81,10 +79,8 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable } @Override - public boolean broadcastToPlayer(ServerPlayer entityplayer) { - if (npc != null && playerlistTracker == null) - return false; - return super.broadcastToPlayer(entityplayer); + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); } @Override @@ -352,10 +348,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable npc.getOrAddTrait(SkinTrait.class).setSkinPersistent(skinName, signature, data); } - public void setTracked(PlayerlistTracker tracker) { - this.playerlistTracker = tracker; - } - @Override public void tick() { super.tick(); diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EvokerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EvokerController.java index 3077328d8..1c85cca77 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EvokerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/EvokerController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/FoxController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/FoxController.java index b3193db52..043184e38 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/FoxController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/FoxController.java @@ -20,6 +20,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GhastController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GhastController.java index 2c8749cf5..22786ceaa 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GhastController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GhastController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -40,6 +41,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GiantController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GiantController.java index 1c9987a13..eaac00570 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GiantController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GiantController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GlowSquidController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GlowSquidController.java index bb22d76e1..f52da8b61 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GlowSquidController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GlowSquidController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGlowSquidNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GoatController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GoatController.java index 7136cb818..fbad51f3c 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GoatController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GoatController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGoatNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianController.java index d2fa8a141..b41b3a456 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianElderController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianElderController.java index eee5dfa50..1b2d5081c 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianElderController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/GuardianElderController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HoglinController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HoglinController.java index 3b1c8fdd8..50302b5f2 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HoglinController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HoglinController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityHoglinNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseController.java index bd9ed643d..4d5b9d618 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseController.java @@ -20,6 +20,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseDonkeyController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseDonkeyController.java index 9af9559c8..3a16b01d7 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseDonkeyController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseDonkeyController.java @@ -20,6 +20,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseMuleController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseMuleController.java index 6a25a23a5..ff9dc6fbe 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseMuleController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseMuleController.java @@ -20,6 +20,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseSkeletonController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseSkeletonController.java index 0979a436e..26379e885 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseSkeletonController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseSkeletonController.java @@ -20,6 +20,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseZombieController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseZombieController.java index 1c3da6d73..f361050f1 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseZombieController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/HorseZombieController.java @@ -20,6 +20,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IllusionerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IllusionerController.java index e990eb915..5dcad6606 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IllusionerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IllusionerController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IronGolemController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IronGolemController.java index 37fbf5f8c..684c8e977 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IronGolemController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/IronGolemController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/LlamaController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/LlamaController.java index a51cf12d1..54d5e2152 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/LlamaController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/LlamaController.java @@ -20,6 +20,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MagmaCubeController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MagmaCubeController.java index 0e52f51c0..1a6583f5a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MagmaCubeController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MagmaCubeController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MushroomCowController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MushroomCowController.java index 86afd2e28..84cde62ce 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MushroomCowController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/MushroomCowController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; @@ -46,6 +47,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/OcelotController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/OcelotController.java index 06602a83d..1559231ec 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/OcelotController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/OcelotController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PandaController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PandaController.java index 165635ca3..af543353c 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PandaController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PandaController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ParrotController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ParrotController.java index 3c85beccf..b317f56ac 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ParrotController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ParrotController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; @@ -43,6 +44,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PhantomController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PhantomController.java index 2dfb793cf..50ce8a95a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PhantomController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PhantomController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private LookControl oldLookController; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigController.java index 4d1943bd6..440010211 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPigNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigZombieController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigZombieController.java index 9a6bbabd2..4053bd4a6 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigZombieController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PigZombieController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinBruteController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinBruteController.java index f87a38e51..9d247354f 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinBruteController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinBruteController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinController.java index e4cd97274..6f5405385 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PiglinController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; @@ -47,6 +48,11 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPiglinNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PillagerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PillagerController.java index 91d1bd3d8..4e04d1856 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PillagerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PillagerController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PolarBearController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PolarBearController.java index a6f608fe4..839df08fa 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PolarBearController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PolarBearController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -41,6 +42,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PufferFishController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PufferFishController.java index 6d0d84f7f..d33985f79 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PufferFishController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/PufferFishController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; @@ -52,6 +53,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RabbitController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RabbitController.java index 06be4d716..47cd7113d 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RabbitController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RabbitController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RavagerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RavagerController.java index 7f304c219..b873d0539 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RavagerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/RavagerController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SalmonController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SalmonController.java index 9590bd14a..852744f3a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SalmonController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SalmonController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; @@ -49,6 +50,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SheepController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SheepController.java index 6ae633369..38f5a2d63 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SheepController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SheepController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ShulkerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ShulkerController.java index f0e321c34..bdf73415f 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ShulkerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ShulkerController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SilverfishController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SilverfishController.java index 9b4097a94..2864e6094 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SilverfishController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SilverfishController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonController.java index b7598dc83..a8194414e 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonStrayController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonStrayController.java index 1f17f4321..a93f10435 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonStrayController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonStrayController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonWitherController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonWitherController.java index a52c0e969..9d757edf4 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonWitherController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SkeletonWitherController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SlimeController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SlimeController.java index 1a0982a5d..a603b6d73 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SlimeController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SlimeController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SnowmanController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SnowmanController.java index 4a7d9c302..22dea3c6d 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SnowmanController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SnowmanController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SpiderController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SpiderController.java index e8b644a16..a67dbca2b 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SpiderController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SpiderController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SquidController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SquidController.java index 99e0c2eb7..4fba2043f 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SquidController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/SquidController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/StriderController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/StriderController.java index 757b0331a..0d2379376 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/StriderController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/StriderController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityStriderNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TraderLlamaController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TraderLlamaController.java index bda3388b9..7be84ebd6 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TraderLlamaController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TraderLlamaController.java @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -51,6 +52,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TropicalFishController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TropicalFishController.java index 0f2100054..0b7520390 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TropicalFishController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TropicalFishController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; @@ -49,6 +50,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TurtleController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TurtleController.java index e4a2f6fde..bbc8c7852 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TurtleController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/TurtleController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private JumpControl oldJumpController; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VexController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VexController.java index cfb4e1712..834c98782 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VexController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VexController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -40,6 +41,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityVexNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VillagerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VillagerController.java index 6fba1c092..a0c49663a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VillagerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VillagerController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; @@ -50,6 +51,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean blockingATrade; private final CitizensNPC npc; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VindicatorController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VindicatorController.java index 4abcc2c13..4b69e64fc 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VindicatorController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/VindicatorController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WanderingTraderController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WanderingTraderController.java index 43ba246c7..251477eba 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WanderingTraderController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WanderingTraderController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; @@ -49,6 +50,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean blockingATrade; private boolean blockTrades = true; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitchController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitchController.java index f7e7a81dd..32622457c 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitchController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitchController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitherController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitherController.java index cb0aa32ef..19ca9c18a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitherController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WitherController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -40,6 +41,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WolfController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WolfController.java index 800887591..91e98b45d 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WolfController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/WolfController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZoglinController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZoglinController.java index 870923f21..d2f3fa371 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZoglinController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZoglinController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZoglinNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieController.java index 78db4f90a..64ef33ad2 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieHuskController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieHuskController.java index 9804acf44..e4698c503 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieHuskController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieHuskController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieVillagerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieVillagerController.java index fc6ff08df..b9fb1d459 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieVillagerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/ZombieVillagerController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.Tag; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/AreaEffectCloudController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/AreaEffectCloudController.java index ad4663dde..b877eee04 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/AreaEffectCloudController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/AreaEffectCloudController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.AreaEffectCloud; import net.minecraft.world.entity.Entity; @@ -42,6 +44,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/BoatController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/BoatController.java index a42aaed94..2e667f928 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/BoatController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/BoatController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; @@ -48,6 +49,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double aC; private float aD; private Status aE; diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/DragonFireballController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/DragonFireballController.java index 43c9b0b58..2a68d23b4 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/DragonFireballController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/DragonFireballController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -42,6 +44,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EggController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EggController.java index 158a7456c..aa99439c7 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EggController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EggController.java @@ -15,9 +15,11 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -52,6 +54,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEggNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderCrystalController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderCrystalController.java index 1d617dacb..e6167b1fb 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderCrystalController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderCrystalController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -42,6 +44,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderPearlController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderPearlController.java index d6d372e98..e1b91ccb4 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderPearlController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderPearlController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -43,6 +45,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderSignalController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderSignalController.java index 2d639faea..17cd00a3a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderSignalController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EnderSignalController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -43,6 +45,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EvokerFangsController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EvokerFangsController.java index 9ce8bcde4..847acbec0 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EvokerFangsController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/EvokerFangsController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -40,6 +42,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ExperienceOrbController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ExperienceOrbController.java index 2ee63d538..707976ef4 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ExperienceOrbController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ExperienceOrbController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FallingBlockController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FallingBlockController.java index 6488a3301..dab36f541 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FallingBlockController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FallingBlockController.java @@ -16,9 +16,11 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -52,6 +54,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends FallingBlockEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FireworkController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FireworkController.java index b30e6545a..212b9e96e 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FireworkController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FireworkController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FishingHookController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FishingHookController.java index 6b1f4e8dc..6dba36c41 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FishingHookController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/FishingHookController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.MinecraftServer; @@ -46,6 +47,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityType types, Level level) { @@ -121,10 +127,10 @@ public class FishingHookController extends MobEntityController { @Override public void tick() { if (npc != null) { - ((ServerPlayer) getPlayerOwner()).setHealth(20F); + getPlayerOwner().setHealth(20F); getPlayerOwner().unsetRemoved(); - ((ServerPlayer) getPlayerOwner()).getInventory().items.set( - ((ServerPlayer) getPlayerOwner()).getInventory().selected, new ItemStack(Items.FISHING_ROD, 1)); + getPlayerOwner().getInventory().items.set(getPlayerOwner().getInventory().selected, + new ItemStack(Items.FISHING_ROD, 1)); NMSImpl.setLife(this, 0); npc.update(); } else { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/GlowItemFrameController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/GlowItemFrameController.java index e7148b301..bbe20ab17 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/GlowItemFrameController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/GlowItemFrameController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -47,6 +49,11 @@ public class GlowItemFrameController extends MobEntityController { } public static class EntityGlowItemFrameNPC extends GlowItemFrame implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGlowItemFrameNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemController.java index d7627ad6f..6a7717244 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemController.java @@ -16,8 +16,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -48,6 +50,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends ItemEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemFrameController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemFrameController.java index b262a0b75..e048ea0b5 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemFrameController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ItemFrameController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -47,6 +49,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends ItemFrame implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LargeFireballController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LargeFireballController.java index 8ea3e7b3b..71651e665 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LargeFireballController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LargeFireballController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LeashController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LeashController.java index 2059397c6..fe9db7a86 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LeashController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LeashController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LlamaSpitController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LlamaSpitController.java index 9ab6fbbbf..e41a83d23 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LlamaSpitController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/LlamaSpitController.java @@ -15,9 +15,11 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -49,6 +51,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MarkerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MarkerController.java index 3c49ee5b4..0858ee041 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MarkerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MarkerController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMarkerNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartChestController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartChestController.java index b3cb84efb..f125a76fa 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartChestController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartChestController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartCommandController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartCommandController.java index abe4ef7aa..b585b7837 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartCommandController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartCommandController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartFurnaceController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartFurnaceController.java index aed25dc28..a0051a3c8 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartFurnaceController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartFurnaceController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartHopperController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartHopperController.java index 770671862..218c37e8a 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartHopperController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartHopperController.java @@ -9,8 +9,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,6 +34,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartRideableController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartRideableController.java index 4f7e82dc5..2a6dcf673 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartRideableController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartRideableController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartSpawnerController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartSpawnerController.java index 94abef782..92a07dcdc 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartSpawnerController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartSpawnerController.java @@ -9,8 +9,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,6 +34,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartTNTController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartTNTController.java index ecdc04831..ecb61b058 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/MinecartTNTController.java @@ -9,8 +9,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,6 +34,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/PaintingController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/PaintingController.java index 779cbadb2..378046718 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/PaintingController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/PaintingController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ShulkerBulletController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ShulkerBulletController.java index 2a0bf2fc0..bd301f3be 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ShulkerBulletController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ShulkerBulletController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SmallFireballController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SmallFireballController.java index 5f079e049..e06ff1413 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SmallFireballController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SmallFireballController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SnowballController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SnowballController.java index 81511e4c2..8a850c226 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SnowballController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SnowballController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SpectralArrowController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SpectralArrowController.java index 9ec55992f..434666ba8 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SpectralArrowController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/SpectralArrowController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TNTPrimedController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TNTPrimedController.java index 4394474be..98984911e 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TNTPrimedController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TNTPrimedController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownExpBottleController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownExpBottleController.java index dcca24b40..a8d5e7d77 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownExpBottleController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownExpBottleController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownPotionController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownPotionController.java index 103029363..541faba40 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownPotionController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownPotionController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends ThrownPotion implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownTridentController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownTridentController.java index 64506ad26..9890c73b5 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownTridentController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/ThrownTridentController.java @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TippedArrowController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TippedArrowController.java index 844ae7090..5795d4739 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TippedArrowController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/TippedArrowController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityType types, Level level) { diff --git a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/WitherSkullController.java b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/WitherSkullController.java index 16dcc9008..b21043b51 100644 --- a/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/WitherSkullController.java +++ b/v1_17_R1/src/main/java/net/citizensnpcs/nms/v1_17_R1/entity/nonliving/WitherSkullController.java @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_17_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_17_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.Tag; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { 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 52129d588..c6e54ecc8 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 @@ -97,7 +97,6 @@ import net.citizensnpcs.nms.v1_17_R1.entity.DrownedController; import net.citizensnpcs.nms.v1_17_R1.entity.EnderDragonController; import net.citizensnpcs.nms.v1_17_R1.entity.EndermanController; import net.citizensnpcs.nms.v1_17_R1.entity.EndermiteController; -import net.citizensnpcs.nms.v1_17_R1.entity.EntityHumanNPC; import net.citizensnpcs.nms.v1_17_R1.entity.EvokerController; import net.citizensnpcs.nms.v1_17_R1.entity.FoxController; import net.citizensnpcs.nms.v1_17_R1.entity.GhastController; @@ -1238,9 +1237,6 @@ public class NMSImpl implements NMSBridge { entry.broadcastRemoved(); PlayerlistTracker replace = new PlayerlistTracker(server.getChunkProvider().chunkMap, entry); server.getChunkProvider().chunkMap.G.put(entity.getEntityId(), replace); - if (getHandle(entity) instanceof EntityHumanNPC) { - ((EntityHumanNPC) getHandle(entity)).setTracked(replace); - } } @Override diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ArmorStandController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ArmorStandController.java index 1578fb479..32ae9224a 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ArmorStandController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ArmorStandController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -48,6 +50,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends ArmorStand implements NPCHolder, ForwardingMobAI { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private MobAI ai; private final CitizensNPC npc; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/AxolotlController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/AxolotlController.java index 37548bc18..ebfde58f1 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/AxolotlController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/AxolotlController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -56,6 +57,11 @@ public class AxolotlController extends MobEntityController { } public static class EntityAxolotlNPC extends Axolotl implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BatController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BatController.java index d0b4987ab..cab691579 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BatController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BatController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBatNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BeeController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BeeController.java index 32f510f4a..7bb8029db 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BeeController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BeeController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BlazeController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BlazeController.java index 559883c52..5cc0f5b02 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BlazeController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/BlazeController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CatController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CatController.java index 9f01a88fe..6856fa1ea 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CatController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CatController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -50,6 +51,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCatNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CaveSpiderController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CaveSpiderController.java index aff68f9dc..b8cedf66a 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CaveSpiderController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CaveSpiderController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ChickenController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ChickenController.java index 4b8ef5288..dcfe94d43 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ChickenController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ChickenController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -50,6 +51,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CodController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CodController.java index 0815915b4..1888dffc1 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CodController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CodController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -56,6 +57,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CowController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CowController.java index 942c7d4f5..136ecf5da 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CowController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CowController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -55,6 +56,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCowNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CreeperController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CreeperController.java index 9662e9e1f..a1a21903d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CreeperController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/CreeperController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -50,6 +51,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DolphinController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DolphinController.java index b0e0864c6..011ff5e67 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DolphinController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DolphinController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -51,6 +52,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean inProtectedTick; private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DrownedController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DrownedController.java index 6d1b0f7ca..ea457c25c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DrownedController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/DrownedController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EnderDragonController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EnderDragonController.java index 25a4b7d10..87dc36127 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EnderDragonController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EnderDragonController.java @@ -21,6 +21,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -54,6 +55,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermanController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermanController.java index 93ab7b7a5..4e4f3ac41 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermanController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermanController.java @@ -20,6 +20,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -52,6 +53,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermiteController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermiteController.java index 97d639777..dd87450d5 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermiteController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EndermiteController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EntityHumanNPC.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EntityHumanNPC.java index 33072c50f..b2e43cb2e 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EntityHumanNPC.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EntityHumanNPC.java @@ -29,7 +29,6 @@ import net.citizensnpcs.nms.v1_18_R2.util.EmptyServerStatsCounter; import net.citizensnpcs.nms.v1_18_R2.util.MobAI; import net.citizensnpcs.nms.v1_18_R2.util.MobAI.ForwardingMobAI; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; -import net.citizensnpcs.nms.v1_18_R2.util.PlayerlistTracker; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.skin.SkinPacketTracker; @@ -60,7 +59,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable private MobAI ai; private int jumpTicks = 0; private final CitizensNPC npc; - private PlayerlistTracker playerlistTracker; private final SkinPacketTracker skinTracker; private EmptyServerStatsCounter statsCache; @@ -82,10 +80,8 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable } @Override - public boolean broadcastToPlayer(ServerPlayer entityplayer) { - if (npc != null && playerlistTracker == null) - return false; - return super.broadcastToPlayer(entityplayer); + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); } @Override @@ -350,10 +346,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable npc.getOrAddTrait(SkinTrait.class).setSkinPersistent(skinName, signature, data); } - public void setTracked(PlayerlistTracker tracker) { - this.playerlistTracker = tracker; - } - @Override public void tick() { super.tick(); diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EvokerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EvokerController.java index cb72c1563..c77296e4d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EvokerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/EvokerController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/FoxController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/FoxController.java index 3ac687dcd..5317fa133 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/FoxController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/FoxController.java @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -47,6 +48,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GhastController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GhastController.java index ee037866e..a75935d54 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GhastController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GhastController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GiantController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GiantController.java index 8d307ce26..fd1d5234d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GiantController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GiantController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GlowSquidController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GlowSquidController.java index 8223c09bf..283f5c115 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GlowSquidController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GlowSquidController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGlowSquidNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GoatController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GoatController.java index 29bdbc154..a4c2580a5 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GoatController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GoatController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGoatNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianController.java index fce8b5fe4..614c28da9 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianElderController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianElderController.java index f0dd92f60..2ea0e3e7f 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianElderController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/GuardianElderController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HoglinController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HoglinController.java index 8397b09fe..2e670628c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HoglinController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HoglinController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityHoglinNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseController.java index 28eaef40a..8e9c82581 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseController.java @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -54,6 +55,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseDonkeyController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseDonkeyController.java index a919647dc..4798f291d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseDonkeyController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseDonkeyController.java @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -54,6 +55,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseMuleController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseMuleController.java index a23f5a0cb..a1ac66247 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseMuleController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseMuleController.java @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -54,6 +55,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseSkeletonController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseSkeletonController.java index e0d041fa6..1e98ef33c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseSkeletonController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseSkeletonController.java @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -54,6 +55,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseZombieController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseZombieController.java index be1367ce1..7d3641955 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseZombieController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/HorseZombieController.java @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -54,6 +55,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IllusionerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IllusionerController.java index 6059b99db..d932f93e5 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IllusionerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IllusionerController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IronGolemController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IronGolemController.java index 5e2530759..e11b7ca17 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IronGolemController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/IronGolemController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/LlamaController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/LlamaController.java index 0cc9fc7ec..830491929 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/LlamaController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/LlamaController.java @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -54,6 +55,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MagmaCubeController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MagmaCubeController.java index 668197d00..c9083c8c6 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MagmaCubeController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MagmaCubeController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MushroomCowController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MushroomCowController.java index ecac3037e..51d3fcb29 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MushroomCowController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/MushroomCowController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -47,6 +48,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/OcelotController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/OcelotController.java index cc3698aef..d24b73582 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/OcelotController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/OcelotController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PandaController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PandaController.java index 88858ca4e..2d224393b 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PandaController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PandaController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ParrotController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ParrotController.java index 596a44a9f..f47a40323 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ParrotController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ParrotController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -45,6 +46,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PhantomController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PhantomController.java index 81217532e..73fa61d59 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PhantomController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PhantomController.java @@ -19,6 +19,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -47,6 +48,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private LookControl oldLookController; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigController.java index 05fdac1ab..b9c2f14d3 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPigNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigZombieController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigZombieController.java index 8f5440dde..7dfd549a5 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigZombieController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PigZombieController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinBruteController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinBruteController.java index 51895d112..740b5da62 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinBruteController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinBruteController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinController.java index 47baaa88d..5d6187515 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PiglinController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -48,6 +49,11 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPiglinNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PillagerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PillagerController.java index b1017d28a..6599f5b0e 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PillagerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PillagerController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PolarBearController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PolarBearController.java index 1bd5cee6d..ee3c92ef6 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PolarBearController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PolarBearController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PufferFishController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PufferFishController.java index 381d4cc8e..bf772ce6d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PufferFishController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/PufferFishController.java @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -53,6 +54,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RabbitController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RabbitController.java index d8d4b2aa8..9a907754c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RabbitController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RabbitController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RavagerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RavagerController.java index 9829e75e2..24408f3fc 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RavagerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/RavagerController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SalmonController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SalmonController.java index 80d345f15..2347bd20e 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SalmonController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SalmonController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -50,6 +51,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SheepController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SheepController.java index 037e3f407..28e9b8005 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SheepController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SheepController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ShulkerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ShulkerController.java index be150ea52..8f0c22197 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ShulkerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ShulkerController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SilverfishController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SilverfishController.java index bcc17e59a..096c6ddd5 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SilverfishController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SilverfishController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonController.java index 28c6d8d0f..456a0c48d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonStrayController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonStrayController.java index 4a7a0bdbf..5adf7988c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonStrayController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonStrayController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonWitherController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonWitherController.java index b6674be42..1214b8967 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonWitherController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SkeletonWitherController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SlimeController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SlimeController.java index ac2b3eb2d..e01ccd49e 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SlimeController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SlimeController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SnowmanController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SnowmanController.java index fcff552dc..2cce66413 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SnowmanController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SnowmanController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SpiderController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SpiderController.java index b595508e3..a8b04d040 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SpiderController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SpiderController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SquidController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SquidController.java index e13b3edb9..54ba79373 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SquidController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/SquidController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/StriderController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/StriderController.java index 7e04c8f68..0b377c4f2 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/StriderController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/StriderController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityStriderNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TraderLlamaController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TraderLlamaController.java index b4d136ee3..b40233b89 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TraderLlamaController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TraderLlamaController.java @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -52,6 +53,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TropicalFishController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TropicalFishController.java index 3286b22dc..05a0f5493 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TropicalFishController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TropicalFishController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -50,6 +51,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TurtleController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TurtleController.java index f0d237700..6d54b28dd 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TurtleController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/TurtleController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -47,6 +48,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private JumpControl oldJumpController; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VexController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VexController.java index d0595f798..669d622b7 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VexController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VexController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityVexNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VillagerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VillagerController.java index cafd955be..a0ae41707 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VillagerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VillagerController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -50,6 +51,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean blockingATrade; private final CitizensNPC npc; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VindicatorController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VindicatorController.java index 4cbf8ba82..9a78e69c9 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VindicatorController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/VindicatorController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WanderingTraderController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WanderingTraderController.java index 1b4f849f1..214cbbb5a 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WanderingTraderController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WanderingTraderController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -49,6 +50,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean blockingATrade; private boolean blockTrades = true; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitchController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitchController.java index 536a8b29a..ed29e174a 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitchController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitchController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitherController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitherController.java index 6a0885fcc..26685c607 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitherController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WitherController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WolfController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WolfController.java index 0ba4ff209..788d7217a 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WolfController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/WolfController.java @@ -19,6 +19,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZoglinController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZoglinController.java index 83138ce1f..825fb9f2c 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZoglinController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZoglinController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZoglinNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieController.java index 7556c37ec..edb6c8de2 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieHuskController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieHuskController.java index 6b3c5e88e..8c69b73bd 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieHuskController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieHuskController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieVillagerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieVillagerController.java index 5f3168a51..68747b4e2 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieVillagerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/ZombieVillagerController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/AreaEffectCloudController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/AreaEffectCloudController.java index deb2b22d4..477d5251d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/AreaEffectCloudController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/AreaEffectCloudController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.AreaEffectCloud; import net.minecraft.world.entity.Entity; @@ -44,6 +46,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/BoatController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/BoatController.java index 83a97a400..c4ea276ff 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/BoatController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/BoatController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; @@ -49,6 +50,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double aC; private float aD; private Status aE; diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/DragonFireballController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/DragonFireballController.java index 92a5a4661..062349a2d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/DragonFireballController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/DragonFireballController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -44,6 +46,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EggController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EggController.java index a59e6da02..e7430cabb 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EggController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EggController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -53,6 +55,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEggNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderCrystalController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderCrystalController.java index bac93b3eb..d156bff7e 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderCrystalController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderCrystalController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -44,6 +46,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderPearlController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderPearlController.java index 08bf45868..a12cbba12 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderPearlController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderPearlController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -45,6 +47,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderSignalController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderSignalController.java index b50c5e9f9..bb5743153 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderSignalController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EnderSignalController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -45,6 +47,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EvokerFangsController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EvokerFangsController.java index 9b1bdc825..06d99eddf 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EvokerFangsController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/EvokerFangsController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -42,6 +44,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ExperienceOrbController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ExperienceOrbController.java index 26dbb247d..71d509b6a 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ExperienceOrbController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ExperienceOrbController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FallingBlockController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FallingBlockController.java index 6c0cfaefd..cba5f819d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FallingBlockController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FallingBlockController.java @@ -17,10 +17,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -55,6 +57,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends FallingBlockEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FireworkController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FireworkController.java index 2d0a5447e..be3242bd3 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FireworkController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FireworkController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FishingHookController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FishingHookController.java index 4e65065cf..7b91598cb 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FishingHookController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/FishingHookController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; @@ -47,6 +48,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityType types, Level level) { @@ -129,10 +135,10 @@ public class FishingHookController extends MobEntityController { @Override public void tick() { if (npc != null) { - ((ServerPlayer) getPlayerOwner()).setHealth(20F); + getPlayerOwner().setHealth(20F); getPlayerOwner().unsetRemoved(); - ((ServerPlayer) getPlayerOwner()).getInventory().items.set( - ((ServerPlayer) getPlayerOwner()).getInventory().selected, new ItemStack(Items.FISHING_ROD, 1)); + getPlayerOwner().getInventory().items.set(getPlayerOwner().getInventory().selected, + new ItemStack(Items.FISHING_ROD, 1)); NMSImpl.setLife(this, 0); npc.update(); } else { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/GlowItemFrameController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/GlowItemFrameController.java index cec58b4f6..31a73048f 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/GlowItemFrameController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/GlowItemFrameController.java @@ -14,11 +14,13 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -49,6 +51,11 @@ public class GlowItemFrameController extends MobEntityController { } public static class EntityGlowItemFrameNPC extends GlowItemFrame implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGlowItemFrameNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemController.java index 431c64c16..b714b9fa4 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemController.java @@ -16,10 +16,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -50,6 +52,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends ItemEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemFrameController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemFrameController.java index eb9ff7dcb..ff8715473 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemFrameController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ItemFrameController.java @@ -14,11 +14,13 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -49,6 +51,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends ItemFrame implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LargeFireballController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LargeFireballController.java index 707230948..d92ea2ac8 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LargeFireballController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LargeFireballController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LeashController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LeashController.java index 14f9f8be5..fcda77532 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LeashController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LeashController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LlamaSpitController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LlamaSpitController.java index f8819cf6f..ac5901ef4 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LlamaSpitController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/LlamaSpitController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -50,6 +52,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MarkerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MarkerController.java index a525a7522..441e941b4 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MarkerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MarkerController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMarkerNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartChestController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartChestController.java index 53ad8d552..7b33afdd9 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartChestController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartChestController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartCommandController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartCommandController.java index 279d36621..e7d86425e 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartCommandController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartCommandController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartFurnaceController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartFurnaceController.java index 94c35981c..7f8181aa2 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartFurnaceController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartFurnaceController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartHopperController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartHopperController.java index 18a1bbe9b..12fe3215b 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartHopperController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartHopperController.java @@ -9,10 +9,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -34,6 +36,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartRideableController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartRideableController.java index 43397f770..1d1bfd5c9 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartRideableController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartRideableController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartSpawnerController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartSpawnerController.java index 2a21de005..381bd777b 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartSpawnerController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartSpawnerController.java @@ -9,10 +9,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -34,6 +36,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartTNTController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartTNTController.java index c9d0bbb87..41cdc2768 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartTNTController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/MinecartTNTController.java @@ -9,10 +9,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -34,6 +36,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/PaintingController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/PaintingController.java index 8c47604c9..94baa9e2d 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/PaintingController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/PaintingController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ShulkerBulletController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ShulkerBulletController.java index a13632b32..4f08dc4bb 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ShulkerBulletController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ShulkerBulletController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SmallFireballController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SmallFireballController.java index e02612a34..45f33b9b4 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SmallFireballController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SmallFireballController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SnowballController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SnowballController.java index 94dbf991c..fbc512206 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SnowballController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SnowballController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SpectralArrowController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SpectralArrowController.java index 548518765..f5a4f998b 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SpectralArrowController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/SpectralArrowController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TNTPrimedController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TNTPrimedController.java index 4282e6cbd..1d3278c8e 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TNTPrimedController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TNTPrimedController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownExpBottleController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownExpBottleController.java index 85fc578bd..a8b38b957 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownExpBottleController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownExpBottleController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownPotionController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownPotionController.java index 5db3e9ab5..11c1f1432 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownPotionController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownPotionController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends ThrownPotion implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownTridentController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownTridentController.java index 707af0e03..1164db379 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownTridentController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/ThrownTridentController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TippedArrowController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TippedArrowController.java index 7bc999ec0..7b13d5a3a 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TippedArrowController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/TippedArrowController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/WitherSkullController.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/WitherSkullController.java index 85429cc91..946907580 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/WitherSkullController.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/entity/nonliving/WitherSkullController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_18_R2.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_18_R2.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { diff --git a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityNavigation.java b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityNavigation.java index 7e2af58db..6325dcfa8 100644 --- a/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityNavigation.java +++ b/v1_18_R2/src/main/java/net/citizensnpcs/nms/v1_18_R2/util/EntityNavigation.java @@ -156,7 +156,7 @@ public class EntityNavigation extends PathNavigation { } return true; } - + private boolean canWalkOn(int var0, int var1, int var2, int var3, int var4, int var5, Vec3 var6, double var7, double var9) { int var11 = var0 - var3 / 2; diff --git a/v1_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 aec5c3427..e39def2d3 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 @@ -98,7 +98,6 @@ import net.citizensnpcs.nms.v1_18_R2.entity.DrownedController; import net.citizensnpcs.nms.v1_18_R2.entity.EnderDragonController; import net.citizensnpcs.nms.v1_18_R2.entity.EndermanController; import net.citizensnpcs.nms.v1_18_R2.entity.EndermiteController; -import net.citizensnpcs.nms.v1_18_R2.entity.EntityHumanNPC; import net.citizensnpcs.nms.v1_18_R2.entity.EvokerController; import net.citizensnpcs.nms.v1_18_R2.entity.FoxController; import net.citizensnpcs.nms.v1_18_R2.entity.GhastController; @@ -1247,9 +1246,6 @@ public class NMSImpl implements NMSBridge { entry.broadcastRemoved(); PlayerlistTracker replace = new PlayerlistTracker(server.getChunkSource().chunkMap, entry); server.getChunkSource().chunkMap.entityMap.put(entity.getEntityId(), replace); - if (getHandle(entity) instanceof EntityHumanNPC) { - ((EntityHumanNPC) getHandle(entity)).setTracked(replace); - } } @Override diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AllayController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AllayController.java index aa16ef127..255b5d0df 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AllayController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AllayController.java @@ -23,6 +23,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -59,6 +60,11 @@ public class AllayController extends MobEntityController { } public static class EntityAllayNPC extends Allay implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private int taskId = -1; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ArmorStandController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ArmorStandController.java index d4dd638d3..20f33dd22 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ArmorStandController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ArmorStandController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -48,6 +50,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends ArmorStand implements NPCHolder, ForwardingMobAI { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private MobAI ai; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AxolotlController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AxolotlController.java index 4e78beab1..3f406fb18 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AxolotlController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/AxolotlController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -57,6 +58,11 @@ public class AxolotlController extends MobEntityController { } public static class EntityAxolotlNPC extends Axolotl implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BatController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BatController.java index 3c95c12df..5fb891d29 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BatController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BatController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBatNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BeeController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BeeController.java index 4c9953e57..3142874a5 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BeeController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BeeController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BlazeController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BlazeController.java index 1fb629123..fd4762586 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BlazeController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/BlazeController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CamelController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CamelController.java index 08494566c..82541fddc 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CamelController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CamelController.java @@ -22,6 +22,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -61,6 +62,11 @@ public class CamelController extends MobEntityController { } public static class EntityCamelNPC extends Camel implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CatController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CatController.java index 054f509e7..4b0462aea 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CatController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CatController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -51,6 +52,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCatNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CaveSpiderController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CaveSpiderController.java index ac8ed15a4..b0367d8dc 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CaveSpiderController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CaveSpiderController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -50,6 +51,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ChickenController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ChickenController.java index ecc55e5b2..449946aeb 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ChickenController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ChickenController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -51,6 +52,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CodController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CodController.java index a1a19f6c9..d92e62757 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CodController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CodController.java @@ -19,6 +19,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -57,6 +58,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CowController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CowController.java index fc1ca7a5a..b002fe2d2 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CowController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CowController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -56,6 +57,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCowNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CreeperController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CreeperController.java index 886359cea..7fa5e85ab 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CreeperController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/CreeperController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -51,6 +52,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DolphinController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DolphinController.java index 241053f28..dff5fae6f 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DolphinController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DolphinController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -52,6 +53,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean inProtectedTick; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DrownedController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DrownedController.java index 5fac992e8..e710c76c0 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DrownedController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/DrownedController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -50,6 +51,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EnderDragonController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EnderDragonController.java index e5d726473..05ba0b13d 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EnderDragonController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EnderDragonController.java @@ -21,6 +21,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -146,6 +147,11 @@ public class EnderDragonController extends MobEntityController { } } + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + @Override protected boolean canRide(Entity entity) { if (npc != null && (entity instanceof Boat || entity instanceof AbstractMinecart)) diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermanController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermanController.java index 88f3fde3a..7632d7417 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermanController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermanController.java @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermiteController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermiteController.java index fabe0daa8..e15ccd6d7 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermiteController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EndermiteController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -50,6 +51,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EntityHumanNPC.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EntityHumanNPC.java index d4d0c7b47..f459dce1d 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EntityHumanNPC.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EntityHumanNPC.java @@ -58,6 +58,11 @@ import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; public class EntityHumanNPC extends ServerPlayer implements NPCHolder, SkinnableEntity, ForwardingMobAI { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private MobAI ai; private int jumpTicks = 0; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EvokerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EvokerController.java index 7e1d809b2..dc01b35f9 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EvokerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/EvokerController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FoxController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FoxController.java index d2c42a6dc..bd2fb6acf 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FoxController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FoxController.java @@ -22,6 +22,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FrogController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FrogController.java index d7fbb3cb0..eaba52ed2 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FrogController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/FrogController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class FrogController extends MobEntityController { } public static class EntityFrogNPC extends Frog implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFrogNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GhastController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GhastController.java index 2481a3498..e77d8fc01 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GhastController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GhastController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GiantController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GiantController.java index 8fc34f06b..c9a8e60dd 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GiantController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GiantController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GlowSquidController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GlowSquidController.java index b08e0def6..af1dbd6ff 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GlowSquidController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GlowSquidController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGlowSquidNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GoatController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GoatController.java index 45463c92a..01c329657 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GoatController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GoatController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGoatNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianController.java index 1a153d7d5..0a6f45178 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianElderController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianElderController.java index bf317413c..6b068ff6b 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianElderController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/GuardianElderController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HoglinController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HoglinController.java index a054158d8..bfbdbe9b2 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HoglinController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HoglinController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityHoglinNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseController.java index 04e4581e5..20eb075f6 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseController.java @@ -22,6 +22,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -55,6 +56,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseDonkeyController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseDonkeyController.java index f412f38b9..86f27fd68 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseDonkeyController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseDonkeyController.java @@ -22,6 +22,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -55,6 +56,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseMuleController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseMuleController.java index f684f1449..41d938a44 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseMuleController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseMuleController.java @@ -22,6 +22,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -55,6 +56,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseSkeletonController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseSkeletonController.java index 5e5ed21f0..d887bcef3 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseSkeletonController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseSkeletonController.java @@ -22,6 +22,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -55,6 +56,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseZombieController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseZombieController.java index 17ae326a3..5f1fff479 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseZombieController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/HorseZombieController.java @@ -22,6 +22,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -55,6 +56,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IllusionerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IllusionerController.java index 3c2ca0e77..2c7dfa8c0 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IllusionerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IllusionerController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IronGolemController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IronGolemController.java index 6817cf1a2..449bb1647 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IronGolemController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/IronGolemController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/LlamaController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/LlamaController.java index c7e8f45cb..598ae18e5 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/LlamaController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/LlamaController.java @@ -22,6 +22,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -55,6 +56,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MagmaCubeController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MagmaCubeController.java index f369ec366..79e18ed8d 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MagmaCubeController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MagmaCubeController.java @@ -19,6 +19,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -47,6 +48,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MushroomCowController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MushroomCowController.java index dcaec9ef2..2b97cfd9f 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MushroomCowController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/MushroomCowController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -48,6 +49,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/OcelotController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/OcelotController.java index 5eb1ac113..2ebe1bd08 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/OcelotController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/OcelotController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PandaController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PandaController.java index ee25b7a8f..a7adcac5d 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PandaController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PandaController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ParrotController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ParrotController.java index 9e35e32de..193a570ac 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ParrotController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ParrotController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -45,6 +46,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PhantomController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PhantomController.java index 7e64dcb2b..1cb426cd4 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PhantomController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PhantomController.java @@ -20,6 +20,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private LookControl oldLookController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigController.java index 66e739768..e0ec0f690 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPigNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigZombieController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigZombieController.java index 8391bdc9d..b18dcec94 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigZombieController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PigZombieController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinBruteController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinBruteController.java index a4a03c8f9..15c2effe0 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinBruteController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinBruteController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinController.java index 0a8147e70..8dfff8c8a 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PiglinController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -49,6 +50,11 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPiglinNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PillagerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PillagerController.java index e0122abc1..1211ecfc5 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PillagerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PillagerController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PolarBearController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PolarBearController.java index 9bc0ec8f5..fca4189d3 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PolarBearController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PolarBearController.java @@ -18,6 +18,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PufferFishController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PufferFishController.java index 92cf8674d..2eef71317 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PufferFishController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/PufferFishController.java @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -54,6 +55,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RabbitController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RabbitController.java index b41ccb214..4529ca217 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RabbitController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RabbitController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RavagerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RavagerController.java index 3a54e4ed3..edf10f67b 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RavagerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/RavagerController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SalmonController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SalmonController.java index 5a61c8489..a44db6f80 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SalmonController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SalmonController.java @@ -19,6 +19,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -51,6 +52,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SheepController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SheepController.java index 3aad46b97..4ff074fbb 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SheepController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SheepController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ShulkerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ShulkerController.java index 3ec4d3689..124127e49 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ShulkerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ShulkerController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SilverfishController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SilverfishController.java index ab937e6dd..db33822f8 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SilverfishController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SilverfishController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonController.java index 69ffb41d0..b0b71b445 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonStrayController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonStrayController.java index a6f9f0303..90bdd4154 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonStrayController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonStrayController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonWitherController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonWitherController.java index d14f2cda3..6b5bf9f92 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonWitherController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SkeletonWitherController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SlimeController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SlimeController.java index a53706ed4..b9f6adb40 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SlimeController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SlimeController.java @@ -19,6 +19,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -47,6 +48,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnifferController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnifferController.java index 2fd7086c5..d3e35ac07 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnifferController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnifferController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -50,6 +51,11 @@ public class SnifferController extends MobEntityController { } public static class EntitySnifferNPC extends Sniffer implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnifferNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnowmanController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnowmanController.java index c5a1623a3..2adcaadf9 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnowmanController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SnowmanController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SpiderController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SpiderController.java index f41c89abd..11c060bdf 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SpiderController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SpiderController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SquidController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SquidController.java index 5f503047b..0ffc179aa 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SquidController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/SquidController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/StriderController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/StriderController.java index 380b4cdaf..aa33cc507 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/StriderController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/StriderController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityStriderNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TadpoleController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TadpoleController.java index 8a1fecc81..d5a39ac07 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TadpoleController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TadpoleController.java @@ -19,6 +19,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -52,6 +53,11 @@ public class TadpoleController extends MobEntityController { } public static class EntityTadpoleNPC extends Tadpole implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TraderLlamaController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TraderLlamaController.java index 727185cf6..bf7ca7940 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TraderLlamaController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TraderLlamaController.java @@ -21,6 +21,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TropicalFishController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TropicalFishController.java index 528a1013f..b382c3f3c 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TropicalFishController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TropicalFishController.java @@ -19,6 +19,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -51,6 +52,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TurtleController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TurtleController.java index 006e75ef2..4f1508de5 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TurtleController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/TurtleController.java @@ -19,6 +19,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private JumpControl oldJumpController; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VexController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VexController.java index 36d07af4e..bd22ecb4e 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VexController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VexController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityVexNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VillagerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VillagerController.java index eaf934389..4b6821e85 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VillagerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VillagerController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -51,6 +52,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean blockingATrade; private final CitizensNPC npc; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VindicatorController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VindicatorController.java index 1bbc6b40f..8a7b44fad 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VindicatorController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/VindicatorController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WanderingTraderController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WanderingTraderController.java index 74951c4f9..9daeebe89 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WanderingTraderController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WanderingTraderController.java @@ -19,6 +19,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -50,6 +51,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean blockingATrade; private boolean blockTrades = true; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WardenController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WardenController.java index dae5d1a82..cefa1f1c7 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WardenController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WardenController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.util.Unit; @@ -46,6 +47,11 @@ public class WardenController extends MobEntityController { } public static class EntityWardenNPC extends Warden implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWardenNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitchController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitchController.java index c6e6ec0ad..9dd4d6a09 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitchController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitchController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitherController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitherController.java index 16df3e1b9..b272ed346 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitherController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WitherController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WolfController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WolfController.java index b6dd28c71..945c29438 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WolfController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/WolfController.java @@ -20,6 +20,7 @@ import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -47,6 +48,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZoglinController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZoglinController.java index f00558eeb..44a2f085d 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZoglinController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZoglinController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZoglinNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieController.java index 171f75c46..b0cf29158 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieHuskController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieHuskController.java index 72049960b..20a8d18b5 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieHuskController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieHuskController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieVillagerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieVillagerController.java index e7acb5967..b15d3cd1c 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieVillagerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/ZombieVillagerController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/AreaEffectCloudController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/AreaEffectCloudController.java index c85b108b2..ddf17d8c7 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/AreaEffectCloudController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/AreaEffectCloudController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.AreaEffectCloud; import net.minecraft.world.entity.Entity; @@ -44,6 +46,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BlockDisplayController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BlockDisplayController.java index 8cea0af05..f9328b30e 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BlockDisplayController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BlockDisplayController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Display.BlockDisplay; import net.minecraft.world.entity.Entity; @@ -57,6 +59,11 @@ public class BlockDisplayController extends MobEntityController { } public static class EntityBlockDisplayNPC extends BlockDisplay implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBlockDisplayNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BoatController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BoatController.java index 55059ac60..144368a97 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BoatController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/BoatController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; @@ -50,6 +51,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double aC; private float aD; private Status aE; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ChestBoatController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ChestBoatController.java index 31e49fada..66eb87a84 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ChestBoatController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ChestBoatController.java @@ -13,6 +13,7 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.PositionImpl; @@ -51,6 +52,11 @@ public class ChestBoatController extends MobEntityController { } public static class EntityChestBoatNPC extends ChestBoat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double aC; private float aD; diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/DragonFireballController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/DragonFireballController.java index 2162f07ba..604c14dca 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/DragonFireballController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/DragonFireballController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -44,6 +46,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EggController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EggController.java index c68cdb4d0..f1267458f 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EggController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EggController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -53,6 +55,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEggNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderCrystalController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderCrystalController.java index e91747e38..b2034131a 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderCrystalController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderCrystalController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -44,6 +46,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderPearlController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderPearlController.java index b9501a8f2..7b106e4cc 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderPearlController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderPearlController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -45,6 +47,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderSignalController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderSignalController.java index 3b9a03c68..06064ac50 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderSignalController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EnderSignalController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -45,6 +47,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EvokerFangsController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EvokerFangsController.java index be4d35676..21f74800f 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EvokerFangsController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/EvokerFangsController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -42,6 +44,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ExperienceOrbController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ExperienceOrbController.java index ffadb9b56..b01e57e96 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ExperienceOrbController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ExperienceOrbController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FallingBlockController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FallingBlockController.java index 482ac0008..6e20da8b2 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FallingBlockController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FallingBlockController.java @@ -16,10 +16,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -54,6 +56,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends FallingBlockEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FireworkController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FireworkController.java index 62f33a729..d16995c49 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FireworkController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FireworkController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FishingHookController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FishingHookController.java index cb7843da5..f953f004b 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FishingHookController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/FishingHookController.java @@ -20,6 +20,7 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; @@ -63,6 +64,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/GlowItemFrameController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/GlowItemFrameController.java index 2c8b591a3..f503bbb55 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/GlowItemFrameController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/GlowItemFrameController.java @@ -13,12 +13,14 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -49,6 +51,11 @@ public class GlowItemFrameController extends MobEntityController { } public static class EntityGlowItemFrameNPC extends GlowItemFrame implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGlowItemFrameNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/InteractionController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/InteractionController.java index 6ecc0d2eb..ff8f5b0de 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/InteractionController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/InteractionController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class InteractionController extends MobEntityController { } public static class EntityInteractionNPC extends Interaction implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityInteractionNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemController.java index eb0bddb16..2ca000bf7 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemController.java @@ -16,10 +16,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -50,6 +52,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends ItemEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemDisplayController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemDisplayController.java index f6d6b6f22..4721f3228 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemDisplayController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemDisplayController.java @@ -16,10 +16,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Display.ItemDisplay; import net.minecraft.world.entity.Entity; @@ -51,6 +53,11 @@ public class ItemDisplayController extends MobEntityController { } public static class EntityItemDisplayNPC extends ItemDisplay implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemDisplayNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemFrameController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemFrameController.java index 7b5568aac..cfb08352a 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemFrameController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ItemFrameController.java @@ -13,12 +13,14 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -49,6 +51,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends ItemFrame implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LargeFireballController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LargeFireballController.java index c0f22ffce..f9f3ba88c 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LargeFireballController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LargeFireballController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LeashController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LeashController.java index 5833a0487..5e7a91580 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LeashController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LeashController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LlamaSpitController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LlamaSpitController.java index 7d9dea40d..9a6c25143 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LlamaSpitController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/LlamaSpitController.java @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -50,6 +52,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MarkerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MarkerController.java index d0681ea0d..76eb562ff 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MarkerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MarkerController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMarkerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartChestController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartChestController.java index abf0c47c6..f275265f9 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartChestController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartChestController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartCommandController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartCommandController.java index 7bd5029df..11bb87f3e 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartCommandController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartCommandController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartFurnaceController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartFurnaceController.java index 4e6cf9ea9..a213a3de0 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartFurnaceController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartFurnaceController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartHopperController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartHopperController.java index 50c723eef..85f4fb70f 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartHopperController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartHopperController.java @@ -9,10 +9,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -34,6 +36,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartRideableController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartRideableController.java index 8d0d0fb1f..29b218e2e 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartRideableController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartRideableController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartSpawnerController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartSpawnerController.java index b10c4570b..37984e86a 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartSpawnerController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartSpawnerController.java @@ -9,10 +9,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -34,6 +36,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartTNTController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartTNTController.java index 9af7bc1af..abece15e1 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartTNTController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/MinecartTNTController.java @@ -9,10 +9,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -34,6 +36,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/PaintingController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/PaintingController.java index d701a72c5..f02a8494f 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/PaintingController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/PaintingController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ShulkerBulletController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ShulkerBulletController.java index 84923b369..9e088c494 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ShulkerBulletController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ShulkerBulletController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SmallFireballController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SmallFireballController.java index a05e2fe77..a8111015c 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SmallFireballController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SmallFireballController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SnowballController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SnowballController.java index a66da4e71..f42415c17 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SnowballController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SnowballController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SpectralArrowController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SpectralArrowController.java index f6e95c0e6..7547c71b7 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SpectralArrowController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/SpectralArrowController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TNTPrimedController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TNTPrimedController.java index e928614e7..d5bfe7ead 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TNTPrimedController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TNTPrimedController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TextDisplayController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TextDisplayController.java index 058c9c801..253c0631d 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TextDisplayController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TextDisplayController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Display.TextDisplay; import net.minecraft.world.entity.Entity; @@ -38,6 +40,11 @@ public class TextDisplayController extends MobEntityController { } public static class EntityTextDisplayNPC extends TextDisplay implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTextDisplayNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownExpBottleController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownExpBottleController.java index b321ec8c2..97463538f 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownExpBottleController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownExpBottleController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownPotionController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownPotionController.java index 2a8f95ea0..329071aa6 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownPotionController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownPotionController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends ThrownPotion implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownTridentController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownTridentController.java index c7e3231b0..7a8a1b900 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownTridentController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/ThrownTridentController.java @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -39,6 +41,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TippedArrowController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TippedArrowController.java index 573e875bb..30dab8e04 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TippedArrowController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/TippedArrowController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/WitherSkullController.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/WitherSkullController.java index 88be6ff24..8dc27c6e3 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/WitherSkullController.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/entity/nonliving/WitherSkullController.java @@ -13,10 +13,12 @@ import net.citizensnpcs.nms.v1_19_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_19_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.PositionImpl; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -38,6 +40,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { diff --git a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNavigation.java b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNavigation.java index a68efd6db..17e98f48c 100644 --- a/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNavigation.java +++ b/v1_19_R3/src/main/java/net/citizensnpcs/nms/v1_19_R3/util/EntityNavigation.java @@ -154,7 +154,7 @@ public class EntityNavigation extends PathNavigation { } return true; } - + private boolean canWalkOn(int var0, int var1, int var2, int var3, int var4, int var5, Vec3 var6, double var7, double var9) { int var11 = var0 - var3 / 2; diff --git a/v1_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 3080decda..f2225cce5 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 @@ -720,7 +720,7 @@ public class NMSImpl implements NMSBridge { @Override public float getRidingHeightOffset(org.bukkit.entity.Entity entity, org.bukkit.entity.Entity mount) { - return (float) (getHandle(mount).getPassengersRidingOffset()); + return (float) getHandle(mount).getPassengersRidingOffset(); } @Override @@ -1190,13 +1190,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()) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/AllayController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/AllayController.java index 0b15d6ba1..a33e42167 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/AllayController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/AllayController.java @@ -21,6 +21,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -57,6 +58,11 @@ public class AllayController extends MobEntityController { } public static class EntityAllayNPC extends Allay implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private int taskId = -1; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ArmadilloController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ArmadilloController.java index e5636846e..1613f9ed5 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ArmadilloController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ArmadilloController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -54,6 +55,11 @@ public class ArmadilloController extends MobEntityController { } public static class EntityArmadilloNPC extends Armadillo implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityArmadilloNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ArmorStandController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ArmorStandController.java index 0056647cb..780e6a555 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ArmorStandController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ArmorStandController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -46,6 +48,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends ArmorStand implements NPCHolder, ForwardingMobAI { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private MobAI ai; private final CitizensNPC npc; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/AxolotlController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/AxolotlController.java index 6154e3bbc..0d4955839 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/AxolotlController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/AxolotlController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -55,6 +56,11 @@ public class AxolotlController extends MobEntityController { } public static class EntityAxolotlNPC extends Axolotl implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BatController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BatController.java index ce3ea6b2d..78dd8b957 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BatController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BatController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBatNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BeeController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BeeController.java index edd77cf3c..65a808def 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BeeController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BeeController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BlazeController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BlazeController.java index 8ae4c0494..57e6716d6 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BlazeController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BlazeController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BoggedController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BoggedController.java index 8e3220422..56dfc63f3 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BoggedController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BoggedController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class BoggedController extends MobEntityController { } public static class EntityBoggedNPC extends Bogged implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBoggedNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BreezeController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BreezeController.java index 2d286580e..28c64540d 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BreezeController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/BreezeController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class BreezeController extends MobEntityController { } public static class EntityBreezeNPC extends Breeze implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBreezeNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CamelController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CamelController.java index f3c88e62d..7f1de3fda 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CamelController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CamelController.java @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -59,6 +60,11 @@ public class CamelController extends MobEntityController { } public static class EntityCamelNPC extends Camel implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CatController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CatController.java index bbe51263c..72d05a014 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CatController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CatController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCatNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CaveSpiderController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CaveSpiderController.java index 70a23257a..befc70e85 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CaveSpiderController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CaveSpiderController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ChickenController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ChickenController.java index 7d96fa945..904cd31e8 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ChickenController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ChickenController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CodController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CodController.java index c4dc871e8..ec895251d 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CodController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CodController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -55,6 +56,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CowController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CowController.java index 6817c7280..8a3a0a890 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CowController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CowController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -54,6 +55,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCowNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CreeperController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CreeperController.java index 21b1f3ac7..381548a4f 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CreeperController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/CreeperController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean allowPowered; private final CitizensNPC npc; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/DolphinController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/DolphinController.java index 3cf32ca1a..fb56241b8 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/DolphinController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/DolphinController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -50,6 +51,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean inProtectedTick; private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/DrownedController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/DrownedController.java index 68b102d48..a9f01f898 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/DrownedController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/DrownedController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EnderDragonController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EnderDragonController.java index 0bcba00d7..13862417f 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EnderDragonController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EnderDragonController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EndermanController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EndermanController.java index d34497362..5205d544b 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EndermanController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EndermanController.java @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -51,6 +52,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EndermiteController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EndermiteController.java index f74002b51..020b72f58 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EndermiteController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EndermiteController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EntityHumanNPC.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EntityHumanNPC.java index a2b4c6566..f94b3efe3 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EntityHumanNPC.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EntityHumanNPC.java @@ -58,6 +58,11 @@ import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; public class EntityHumanNPC extends ServerPlayer implements NPCHolder, SkinnableEntity, ForwardingMobAI { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private MobAI ai; private int jumpTicks = 0; private final CitizensNPC npc; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EvokerController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EvokerController.java index bbf796ad7..12f457498 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EvokerController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/EvokerController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/FoxController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/FoxController.java index 592239bc8..9f41c35c8 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/FoxController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/FoxController.java @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/FrogController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/FrogController.java index 0ff4e016d..e53611cd0 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/FrogController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/FrogController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class FrogController extends MobEntityController { } public static class EntityFrogNPC extends Frog implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFrogNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GhastController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GhastController.java index 91bf3d303..fcc5dcab7 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GhastController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GhastController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -40,6 +41,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GiantController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GiantController.java index db70dabca..1ae4791ed 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GiantController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GiantController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GlowSquidController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GlowSquidController.java index 2676acbac..e394aaaaf 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GlowSquidController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GlowSquidController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGlowSquidNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GoatController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GoatController.java index 547b0ac1e..766233210 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GoatController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GoatController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGoatNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GuardianController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GuardianController.java index 286835fcb..37efc4833 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GuardianController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GuardianController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GuardianElderController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GuardianElderController.java index a898feadb..8315607ff 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GuardianElderController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/GuardianElderController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HoglinController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HoglinController.java index 24387e5d2..24c680c0e 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HoglinController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HoglinController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityHoglinNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseController.java index 72d233768..20ef3016d 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseController.java @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseDonkeyController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseDonkeyController.java index 2a3b090c5..a4c9d687e 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseDonkeyController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseDonkeyController.java @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseMuleController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseMuleController.java index 0489b8c92..47baa8526 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseMuleController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseMuleController.java @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseSkeletonController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseSkeletonController.java index a9bff6b5b..124b0c57e 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseSkeletonController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseSkeletonController.java @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseZombieController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseZombieController.java index 1fe92a52b..f93986592 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseZombieController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/HorseZombieController.java @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/IllusionerController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/IllusionerController.java index fd8aefb22..8052cefea 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/IllusionerController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/IllusionerController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/IronGolemController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/IronGolemController.java index 0b37d9a37..dbacf77f5 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/IronGolemController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/IronGolemController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/LlamaController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/LlamaController.java index 18eb9012f..974349d17 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/LlamaController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/LlamaController.java @@ -20,6 +20,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/MagmaCubeController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/MagmaCubeController.java index 8e8ba20f8..369df3755 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/MagmaCubeController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/MagmaCubeController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/MushroomCowController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/MushroomCowController.java index 86680c383..642b57bd9 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/MushroomCowController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/MushroomCowController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -46,6 +47,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/OcelotController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/OcelotController.java index ed6c307a6..43760f8dd 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/OcelotController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/OcelotController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PandaController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PandaController.java index 384a682e2..72fc8e736 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PandaController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PandaController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ParrotController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ParrotController.java index 4154d7a64..c82949a4d 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ParrotController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ParrotController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -43,6 +44,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PhantomController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PhantomController.java index 193aa954d..a69d67cb8 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PhantomController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PhantomController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private LookControl oldLookController; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PigController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PigController.java index f679723e7..daf5f65bd 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PigController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PigController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPigNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PigZombieController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PigZombieController.java index 8c20cdf19..cb99f85f7 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PigZombieController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PigZombieController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PiglinBruteController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PiglinBruteController.java index 8c593e771..8cbef040c 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PiglinBruteController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PiglinBruteController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PiglinController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PiglinController.java index 2035fbdd6..71041601d 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PiglinController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PiglinController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -47,6 +48,11 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPiglinNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PillagerController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PillagerController.java index 767ba0ac1..445809fde 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PillagerController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PillagerController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PolarBearController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PolarBearController.java index c3784d524..69a5ae9e0 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PolarBearController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PolarBearController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -41,6 +42,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PufferFishController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PufferFishController.java index 61c83dfa9..8a0e49a0f 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PufferFishController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/PufferFishController.java @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -52,6 +53,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/RabbitController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/RabbitController.java index 419aef64c..33f700995 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/RabbitController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/RabbitController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/RavagerController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/RavagerController.java index 0c5f21690..263fa9630 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/RavagerController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/RavagerController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SalmonController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SalmonController.java index 3812022e3..20b7a9de2 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SalmonController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SalmonController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -49,6 +50,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SheepController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SheepController.java index b7651a36f..86ab7fce9 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SheepController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SheepController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ShulkerController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ShulkerController.java index e63b116b9..a7216ad1f 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ShulkerController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ShulkerController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SilverfishController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SilverfishController.java index cff94b273..3cd06ff12 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SilverfishController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SilverfishController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SkeletonController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SkeletonController.java index eb80ff29e..fc99edf08 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SkeletonController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SkeletonController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SkeletonStrayController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SkeletonStrayController.java index fd44a81d6..8d4c7f333 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SkeletonStrayController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SkeletonStrayController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SkeletonWitherController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SkeletonWitherController.java index c4aafc40e..a4ac5f316 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SkeletonWitherController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SkeletonWitherController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SlimeController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SlimeController.java index 8e078926e..9b2147746 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SlimeController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SlimeController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SnifferController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SnifferController.java index 01d5c265e..878dc32de 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SnifferController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SnifferController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -48,6 +49,11 @@ public class SnifferController extends MobEntityController { } public static class EntitySnifferNPC extends Sniffer implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnifferNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SnowmanController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SnowmanController.java index 8908483c0..4c56341db 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SnowmanController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SnowmanController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SpiderController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SpiderController.java index 336a93a1c..a93e6e7a6 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SpiderController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SpiderController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SquidController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SquidController.java index 343b860a3..bf200d847 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SquidController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/SquidController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/StriderController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/StriderController.java index 01f5fd17e..2790da424 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/StriderController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/StriderController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityStriderNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TadpoleController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TadpoleController.java index 2bf683e6c..c84f91b2e 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TadpoleController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TadpoleController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; @@ -50,6 +51,11 @@ public class TadpoleController extends MobEntityController { } public static class EntityTadpoleNPC extends Tadpole implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TraderLlamaController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TraderLlamaController.java index f041d65f1..52ff5cffb 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TraderLlamaController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TraderLlamaController.java @@ -19,6 +19,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -51,6 +52,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TropicalFishController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TropicalFishController.java index 85d9fb575..4c6fee6cb 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TropicalFishController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TropicalFishController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -49,6 +50,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TurtleController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TurtleController.java index c2ab7b643..f145bae2a 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TurtleController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/TurtleController.java @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private JumpControl oldJumpController; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/VexController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/VexController.java index e0c002289..a8dd2eab4 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/VexController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/VexController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -40,6 +41,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityVexNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/VillagerController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/VillagerController.java index e350fe7dc..def691596 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/VillagerController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/VillagerController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -49,6 +50,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean blockingATrade; private final CitizensNPC npc; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/VindicatorController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/VindicatorController.java index a096622be..8e6f0feab 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/VindicatorController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/VindicatorController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WanderingTraderController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WanderingTraderController.java index fb6dee00a..0fe4fb27a 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WanderingTraderController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WanderingTraderController.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -48,6 +49,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean blockingATrade; private boolean blockTrades = true; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WardenController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WardenController.java index f43ecdd31..c6b2fddb1 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WardenController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WardenController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.util.Unit; @@ -44,6 +45,11 @@ public class WardenController extends MobEntityController { } public static class EntityWardenNPC extends Warden implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWardenNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WitchController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WitchController.java index a81f14f6d..364e12853 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WitchController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WitchController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WitherController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WitherController.java index e6898ba7f..6ed30fe14 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WitherController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WitherController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -40,6 +41,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WolfController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WolfController.java index febc2e8ca..579fc95a5 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WolfController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/WolfController.java @@ -18,6 +18,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZoglinController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZoglinController.java index e95d4630c..1f4e39b83 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZoglinController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZoglinController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZoglinNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZombieController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZombieController.java index 90e9dc888..65ee251de 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZombieController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZombieController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZombieHuskController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZombieHuskController.java index 1aa2cc515..d1cf010c2 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZombieHuskController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZombieHuskController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZombieVillagerController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZombieVillagerController.java index b614150aa..53e9c91c8 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZombieVillagerController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/ZombieVillagerController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/AreaEffectCloudController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/AreaEffectCloudController.java index fc54eff58..961648f71 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/AreaEffectCloudController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/AreaEffectCloudController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.AreaEffectCloud; import net.minecraft.world.entity.Entity; @@ -42,6 +44,11 @@ public class AreaEffectCloudController extends MobEntityController { } public static class EntityAreaEffectCloudNPC extends AreaEffectCloud implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityAreaEffectCloudNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/BlockDisplayController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/BlockDisplayController.java index 30ef10262..37d52063d 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/BlockDisplayController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/BlockDisplayController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Display.BlockDisplay; import net.minecraft.world.entity.Entity; @@ -55,6 +57,11 @@ public class BlockDisplayController extends MobEntityController { } public static class EntityBlockDisplayNPC extends BlockDisplay implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBlockDisplayNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/BoatController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/BoatController.java index a445dbb67..6d7857f9a 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/BoatController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/BoatController.java @@ -12,6 +12,7 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; @@ -48,6 +49,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double aC; private float aD; private Status aE; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/BreezeWindChargeController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/BreezeWindChargeController.java index 28db64de0..31ec8e056 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/BreezeWindChargeController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/BreezeWindChargeController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -42,6 +44,11 @@ public class BreezeWindChargeController extends MobEntityController { } public static class EntityBreezeWindChargeNPC extends BreezeWindCharge implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBreezeWindChargeNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ChestBoatController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ChestBoatController.java index 4ec3b6758..df1be2945 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ChestBoatController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ChestBoatController.java @@ -12,6 +12,7 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; @@ -49,6 +50,11 @@ public class ChestBoatController extends MobEntityController { } public static class EntityChestBoatNPC extends ChestBoat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double aC; private float aD; diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/DragonFireballController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/DragonFireballController.java index bd906662a..4036ee3b6 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/DragonFireballController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/DragonFireballController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -42,6 +44,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EggController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EggController.java index 897b5e716..71ddd1f30 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EggController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EggController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -51,6 +53,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEggNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EnderCrystalController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EnderCrystalController.java index eed54a5e9..f2642cfc5 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EnderCrystalController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EnderCrystalController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -42,6 +44,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EnderPearlController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EnderPearlController.java index b377b1dd3..999541b3d 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EnderPearlController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EnderPearlController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -43,6 +45,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EvokerFangsController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EvokerFangsController.java index a35307c4b..7b768093f 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EvokerFangsController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EvokerFangsController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -40,6 +42,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ExperienceOrbController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ExperienceOrbController.java index 4c286dadd..b229f606d 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ExperienceOrbController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ExperienceOrbController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EyeOfEnderController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EyeOfEnderController.java index 7df1b079b..88298a6f7 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EyeOfEnderController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/EyeOfEnderController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -43,6 +45,11 @@ public class EyeOfEnderController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/FallingBlockController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/FallingBlockController.java index 3b4757489..6371bf444 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/FallingBlockController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/FallingBlockController.java @@ -15,9 +15,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -52,6 +54,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends FallingBlockEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/FireworkController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/FireworkController.java index 7efccc098..c747ff913 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/FireworkController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/FireworkController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/FishingHookController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/FishingHookController.java index f4487d53b..23d384d82 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/FishingHookController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/FishingHookController.java @@ -19,6 +19,7 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ClientInformation; @@ -62,6 +63,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/GlowItemFrameController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/GlowItemFrameController.java index 49ee6b9cb..1a36056bf 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/GlowItemFrameController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/GlowItemFrameController.java @@ -12,11 +12,13 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -47,6 +49,11 @@ public class GlowItemFrameController extends MobEntityController { } public static class EntityGlowItemFrameNPC extends GlowItemFrame implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGlowItemFrameNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/InteractionController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/InteractionController.java index aaf4353c0..0a7b8bb26 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/InteractionController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/InteractionController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class InteractionController extends MobEntityController { } public static class EntityInteractionNPC extends Interaction implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityInteractionNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ItemController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ItemController.java index a6b93f42e..99c176dc5 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ItemController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ItemController.java @@ -15,9 +15,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -48,6 +50,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends ItemEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ItemDisplayController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ItemDisplayController.java index d70e5ec64..11484fa7d 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ItemDisplayController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ItemDisplayController.java @@ -15,9 +15,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Display.ItemDisplay; import net.minecraft.world.entity.Entity; @@ -49,6 +51,11 @@ public class ItemDisplayController extends MobEntityController { } public static class EntityItemDisplayNPC extends ItemDisplay implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemDisplayNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ItemFrameController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ItemFrameController.java index 0e4a39346..796f2ab15 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ItemFrameController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ItemFrameController.java @@ -12,11 +12,13 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -47,6 +49,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends ItemFrame implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/LargeFireballController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/LargeFireballController.java index 6fe897a88..4691d717e 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/LargeFireballController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/LargeFireballController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/LeashController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/LeashController.java index 140bf84a0..07f290560 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/LeashController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/LeashController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/LlamaSpitController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/LlamaSpitController.java index 968dce2f3..b7cd2b9d8 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/LlamaSpitController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/LlamaSpitController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -48,6 +50,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MarkerController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MarkerController.java index 15a86d58b..4c733b48e 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MarkerController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MarkerController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMarkerNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartChestController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartChestController.java index 2a7c13ed2..69889410a 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartChestController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartChestController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartCommandController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartCommandController.java index f65acb115..6f7c399ae 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartCommandController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartCommandController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartFurnaceController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartFurnaceController.java index 3257bf773..24bcf9e5b 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartFurnaceController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartFurnaceController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartHopperController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartHopperController.java index 68a9965c6..bf5c1c918 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartHopperController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartHopperController.java @@ -8,9 +8,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,6 +34,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartRideableController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartRideableController.java index f9acac6ac..d7801dbf9 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartRideableController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartRideableController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartSpawnerController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartSpawnerController.java index 08986f8d6..e6affd451 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartSpawnerController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartSpawnerController.java @@ -8,9 +8,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,6 +34,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartTNTController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartTNTController.java index 3fba9c6e7..f7b43c7ff 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartTNTController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/MinecartTNTController.java @@ -8,9 +8,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,6 +34,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/OminousItemSpawnerController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/OminousItemSpawnerController.java index 5740a3f5a..6c9f39dd5 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/OminousItemSpawnerController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/OminousItemSpawnerController.java @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -48,6 +50,11 @@ public class OminousItemSpawnerController extends MobEntityController { } public static class EntityOminousItemSpawnerNPC extends OminousItemSpawner implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityOminousItemSpawnerNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/PaintingController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/PaintingController.java index 5f475330e..4028c6bea 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/PaintingController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/PaintingController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ShulkerBulletController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ShulkerBulletController.java index 44e5d6691..ff773de89 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ShulkerBulletController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ShulkerBulletController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/SmallFireballController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/SmallFireballController.java index 434d167cb..ae6ab6376 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/SmallFireballController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/SmallFireballController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/SnowballController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/SnowballController.java index 185dfa22c..f2f235587 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/SnowballController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/SnowballController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/SpectralArrowController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/SpectralArrowController.java index c4afaf103..7c42fc9b7 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/SpectralArrowController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/SpectralArrowController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/TNTPrimedController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/TNTPrimedController.java index 30f72d45d..44a75aa8e 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/TNTPrimedController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/TNTPrimedController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/TextDisplayController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/TextDisplayController.java index e3a6049c4..b0379fc91 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/TextDisplayController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/TextDisplayController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Display.TextDisplay; import net.minecraft.world.entity.Entity; @@ -36,6 +38,11 @@ public class TextDisplayController extends MobEntityController { } public static class EntityTextDisplayNPC extends TextDisplay implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTextDisplayNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ThrownExpBottleController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ThrownExpBottleController.java index bb1abfa13..e12f38732 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ThrownExpBottleController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ThrownExpBottleController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ThrownPotionController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ThrownPotionController.java index 8f25e7af4..ed4bc12a2 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ThrownPotionController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ThrownPotionController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends ThrownPotion implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ThrownTridentController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ThrownTridentController.java index 58091aa5b..d950464d2 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ThrownTridentController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/ThrownTridentController.java @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/TippedArrowController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/TippedArrowController.java index 1e8d34507..8e2ab2dcd 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/TippedArrowController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/TippedArrowController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/WindChargeController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/WindChargeController.java index d11f73c8c..9e2c01a89 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/WindChargeController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/WindChargeController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class WindChargeController extends MobEntityController { } public static class EntityWindChargeNPC extends WindCharge implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWindChargeNPC(EntityType types, Level level) { diff --git a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/WitherSkullController.java b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/WitherSkullController.java index 5ac6ea326..9b622d6d2 100644 --- a/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/WitherSkullController.java +++ b/v1_20_R4/src/main/java/net/citizensnpcs/nms/v1_20_R4/entity/nonliving/WitherSkullController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_20_R4.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_20_R4.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { 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 a3391d278..cd4836030 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 @@ -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_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 3d69e8a62..24c658bde 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 @@ -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_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 e67f58c4a..6b59d6efb 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 @@ -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/entity/AllayController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/AllayController.java index a4eeb0ee0..2193d85bc 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/AllayController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/AllayController.java @@ -20,6 +20,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -57,6 +58,11 @@ public class AllayController extends MobEntityController { } public static class EntityAllayNPC extends Allay implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private int taskId = -1; diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ArmadilloController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ArmadilloController.java index 7dbe88733..5e3b84104 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ArmadilloController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/ArmadilloController.java @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -54,6 +55,11 @@ public class ArmadilloController extends MobEntityController { } public static class EntityArmadilloNPC extends Armadillo implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityArmadilloNPC(EntityType types, Level level) { 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 752d7046c..301e2c270 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 @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -46,6 +48,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends ArmorStand implements NPCHolder, ForwardingMobAI { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private MobAI ai; private final CitizensNPC npc; 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 68cb44fee..ff81e8ee1 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -55,6 +56,11 @@ public class AxolotlController extends MobEntityController { } public static class EntityAxolotlNPC extends Axolotl implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 34ea0cbae..7df7081c1 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 @@ -14,6 +14,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends Bat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBatNPC(EntityType types, Level level) { 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 81c2f48b9..69dbb527f 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 @@ -14,6 +14,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class BeeController extends MobEntityController { } public static class EntityBeeNPC extends Bee implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBeeNPC(EntityType types, Level level) { 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 6f9899800..cb1e44909 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 @@ -14,6 +14,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends Blaze implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(EntityType types, Level level) { 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 eb2a24d31..4e210f15b 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class BoggedController extends MobEntityController { } public static class EntityBoggedNPC extends Bogged implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBoggedNPC(EntityType types, Level level) { 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 9f59be1e1..59e1cc5dc 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class BreezeController extends MobEntityController { } public static class EntityBreezeNPC extends Breeze implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBreezeNPC(EntityType types, Level level) { 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 07640f35d..5e1737b19 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 @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -59,6 +60,11 @@ public class CamelController extends MobEntityController { } public static class EntityCamelNPC extends Camel implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; 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 6f8c6097e..7f8be554a 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class CatController extends MobEntityController { } public static class EntityCatNPC extends Cat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCatNPC(EntityType types, Level level) { 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 6610931f0..5ccc64858 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends CaveSpider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(EntityType types, Level level) { 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 f5e0b7c5c..e22038789 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends Chicken implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(EntityType types, Level level) { 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 463a43500..37206700a 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -54,6 +55,11 @@ public class CodController extends MobEntityController { } public static class EntityCodNPC extends Cod implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 9845afba2..511007853 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -54,6 +55,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends Cow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityCowNPC(EntityType types, Level level) { 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 0e4bdb841..7c55fb46a 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -50,6 +51,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends Creeper implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean allowPowered; private final CitizensNPC npc; 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 cd34d86ef..3439cc7e1 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -50,6 +51,11 @@ public class DolphinController extends MobEntityController { } public static class EntityDolphinNPC extends Dolphin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean inProtectedTick; private final CitizensNPC npc; private MoveControl oldMoveController; 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 f2e8ff192..ec79f966d 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class DrownedController extends MobEntityController { } public static class EntityDrownedNPC extends Drowned implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityDrownedNPC(EntityType types, Level level) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EnderDragonController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EnderDragonController.java index 3173fbec4..146522c9c 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EnderDragonController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EnderDragonController.java @@ -15,6 +15,7 @@ import net.citizensnpcs.trait.versioned.EnderDragonTrait; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -49,6 +50,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EnderDragon implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(EntityType types, Level level) { 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 a13d366f6..3391dca9d 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 @@ -18,6 +18,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -51,6 +52,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EnderMan implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(EntityType types, Level level) { 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 37dcb8c7c..c4396546c 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -48,6 +49,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends Endermite implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(EntityType types, Level level) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EntityHumanNPC.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EntityHumanNPC.java index d0c8aa347..970f2a5a7 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EntityHumanNPC.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/EntityHumanNPC.java @@ -84,6 +84,11 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable } } + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + @Override public boolean causeFallDamage(float f, float f1, DamageSource damagesource) { 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 a8963092c..631bf34b3 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class EvokerController extends MobEntityController { } public static class EntityEvokerNPC extends Evoker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEvokerNPC(EntityType types, Level level) { 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 e420158ae..9f31afe6c 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 @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class FoxController extends MobEntityController { } public static class EntityFoxNPC extends Fox implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFoxNPC(EntityType types, Level level) { 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 852fb61ef..05a6e50eb 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class FrogController extends MobEntityController { } public static class EntityFrogNPC extends Frog implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFrogNPC(EntityType types, Level level) { 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 0f621571b..fded6648e 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 @@ -14,6 +14,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -40,6 +41,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends Ghast implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(EntityType types, Level level) { 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 6b97b44f6..6961d9249 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends Giant implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(EntityType types, Level level) { 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 357681c1e..74ddf604a 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GlowSquidController extends MobEntityController { } public static class EntityGlowSquidNPC extends GlowSquid implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGlowSquidNPC(EntityType types, Level level) { 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 bb2e07547..32f0848d4 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class GoatController extends MobEntityController { } public static class EntityGoatNPC extends Goat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGoatNPC(EntityType types, Level level) { 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 373fa4978..34462bf8d 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends Guardian implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(EntityType types, Level level) { 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 f9fd6ab14..923a461ac 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class GuardianElderController extends MobEntityController { } public static class EntityGuardianElderNPC extends ElderGuardian implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGuardianElderNPC(EntityType types, Level level) { 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 3cf1f6b09..587f94ead 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class HoglinController extends MobEntityController { } public static class EntityHoglinNPC extends Hoglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityHoglinNPC(EntityType types, Level level) { 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 8a72f0e80..3d7ed5523 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 @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends Horse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; private boolean riding; 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 c63edaa52..380f23c2f 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 @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseDonkeyController extends MobEntityController { } public static class EntityHorseDonkeyNPC extends Donkey implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 453718f7e..8ab96e840 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 @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseMuleController extends MobEntityController { } public static class EntityHorseMuleNPC extends Mule implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 d38f28b4e..cf6c57c89 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 @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseSkeletonController extends MobEntityController { } public static class EntityHorseSkeletonNPC extends SkeletonHorse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 76eb753eb..87f652660 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 @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class HorseZombieController extends MobEntityController { } public static class EntityHorseZombieNPC extends ZombieHorse implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 3c396c5cc..d7342a12d 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class IllusionerController extends MobEntityController { } public static class EntityIllusionerNPC extends Illusioner implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityIllusionerNPC(EntityType types, Level level) { 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 c2e50984a..bf762aa77 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends IronGolem implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(EntityType types, Level level) { 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 96d19afeb..03ac47015 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 @@ -19,6 +19,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -53,6 +54,11 @@ public class LlamaController extends MobEntityController { } public static class EntityLlamaNPC extends Llama implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 ef0fe6689..5871b92cd 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends MagmaCube implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 988b3bab5..ef7a4f376 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -46,6 +47,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends MushroomCow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(EntityType types, Level level) { 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 bde0bf532..edd63d704 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends Ocelot implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(EntityType types, Level level) { 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 5973c8ef9..af822d953 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class PandaController extends MobEntityController { } public static class EntityPandaNPC extends Panda implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPandaNPC(EntityType types, Level level) { 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 7115864c0..3aa844263 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 @@ -14,6 +14,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -43,6 +44,11 @@ public class ParrotController extends MobEntityController { } public static class EntityParrotNPC extends Parrot implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityParrotNPC(EntityType types, Level level) { 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 ddb8a9872..49fe5e747 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class PhantomController extends MobEntityController { } public static class EntityPhantomNPC extends Phantom implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private LookControl oldLookController; 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 154a7e300..bd6cad669 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends Pig implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPigNPC(EntityType types, Level level) { 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 94585e882..485f073fd 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends ZombifiedPiglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(EntityType types, Level level) { 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 d30975c23..8b598f651 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class PiglinBruteController extends MobEntityController { } public static class EntityPiglinBruteNPC extends PiglinBrute implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPiglinBruteNPC(EntityType types, Level level) { 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 d9da8ef8b..12c0942d0 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -47,6 +48,11 @@ public class PiglinController extends MobEntityController { } public static class EntityPiglinNPC extends Piglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPiglinNPC(EntityType types, Level level) { 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 fc4c1f6be..a6ad41187 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class PillagerController extends MobEntityController { } public static class EntityPillagerNPC extends Pillager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPillagerNPC(EntityType types, Level level) { 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 eece06fce..03f9b6c69 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -41,6 +42,11 @@ public class PolarBearController extends MobEntityController { } public static class EntityPolarBearNPC extends PolarBear implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPolarBearNPC(EntityType types, Level level) { 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 eacf79386..8af9f247d 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -52,6 +53,11 @@ public class PufferFishController extends MobEntityController { } public static class EntityPufferFishNPC extends Pufferfish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 e244f7e16..4ee29c607 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -44,6 +45,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends Rabbit implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(EntityType types, Level level) { 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 e0565054c..b9464d21a 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class RavagerController extends MobEntityController { } public static class EntityRavagerNPC extends Ravager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityRavagerNPC(EntityType types, Level level) { 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 9cc417c27..ca44686de 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -49,6 +50,11 @@ public class SalmonController extends MobEntityController { } public static class EntitySalmonNPC extends Salmon implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 3bc5b52a6..804f1dda7 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends Sheep implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(EntityType types, Level level) { 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 114ea4f25..5465cdde2 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class ShulkerController extends MobEntityController { } public static class EntityShulkerNPC extends Shulker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityShulkerNPC(EntityType types, Level level) { 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 46dea4095..25622550b 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends Silverfish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(EntityType types, Level level) { 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 83cfefaae..036378447 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends Skeleton implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(EntityType types, Level level) { 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 e018cc23c..99b69ebf5 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SkeletonStrayController extends MobEntityController { } public static class EntityStrayNPC extends Stray implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityStrayNPC(EntityType types, Level level) { 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 f0ccf9aac..7a8b3541d 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SkeletonWitherController extends MobEntityController { } public static class EntitySkeletonWitherNPC extends WitherSkeleton implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySkeletonWitherNPC(EntityType types, Level level) { 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 e5870e472..6c1f7b7ba 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends Slime implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 7496d0485..a34b52739 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -48,6 +49,11 @@ public class SnifferController extends MobEntityController { } public static class EntitySnifferNPC extends Sniffer implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnifferNPC(EntityType types, Level level) { 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 5a7c52e5e..e4553329d 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends SnowGolem implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(EntityType types, Level level) { 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 1281f0962..f120a643d 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends Spider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(EntityType types, Level level) { 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 7bf4dffb4..c2ff4315e 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends Squid implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(EntityType types, Level level) { 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 8e926e1a9..6976c5bac 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class StriderController extends MobEntityController { } public static class EntityStriderNPC extends Strider implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityStriderNPC(EntityType types, Level level) { 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 a08a3b95e..2a9fdc196 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; @@ -50,6 +51,11 @@ public class TadpoleController extends MobEntityController { } public static class EntityTadpoleNPC extends Tadpole implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 1159835f1..cc5d463ec 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 @@ -18,6 +18,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -51,6 +52,11 @@ public class TraderLlamaController extends MobEntityController { } public static class EntityTraderLlamaNPC extends TraderLlama implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTraderLlamaNPC(EntityType types, Level level) { 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 c93044006..b3519a1bb 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -49,6 +50,11 @@ public class TropicalFishController extends MobEntityController { } public static class EntityTropicalFishNPC extends TropicalFish implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private MoveControl oldMoveController; 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 7b3afe159..5da204a34 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -46,6 +47,11 @@ public class TurtleController extends MobEntityController { } public static class EntityTurtleNPC extends Turtle implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; private JumpControl oldJumpController; 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 c6e4e0bf0..15c6907a0 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 @@ -14,6 +14,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -40,6 +41,11 @@ public class VexController extends MobEntityController { } public static class EntityVexNPC extends Vex implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityVexNPC(EntityType types, Level level) { 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 ab0668249..5d481f45e 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -50,6 +51,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends Villager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean blockingATrade; private final CitizensNPC npc; 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 6b7b2021d..cb4c474d7 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -43,6 +44,11 @@ public class VindicatorController extends MobEntityController { } public static class EntityVindicatorNPC extends Vindicator implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityVindicatorNPC(EntityType types, Level level) { 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 018faff50..125c4d094 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 @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; @@ -49,6 +50,11 @@ public class WanderingTraderController extends MobEntityController { } public static class EntityWanderingTraderNPC extends WanderingTrader implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private boolean blockingATrade; private boolean blockTrades = true; 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 52c11ba00..ad12799a2 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.util.Unit; @@ -44,6 +45,11 @@ public class WardenController extends MobEntityController { } public static class EntityWardenNPC extends Warden implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWardenNPC(EntityType types, Level level) { 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 ccf2a3709..a1a3d20c0 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends Witch implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(EntityType types, Level level) { 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 ef409c022..613af9237 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 @@ -14,6 +14,7 @@ import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -40,6 +41,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends WitherBoss implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(EntityType types, Level level) { 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 2ab187525..f72a9950b 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -45,6 +46,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends Wolf implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(EntityType types, Level level) { 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 dc62c3f3d..907597355 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class ZoglinController extends MobEntityController { } public static class EntityZoglinNPC extends Zoglin implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZoglinNPC(EntityType types, Level level) { 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 0524cd684..f3b170a0f 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends Zombie implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(EntityType types, Level level) { 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 c533bf43a..29e97171b 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class ZombieHuskController extends MobEntityController { } public static class EntityZombieHuskNPC extends Husk implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieHuskNPC(EntityType types, Level level) { 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 d1d8e438b..9532a6f11 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 @@ -15,6 +15,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.world.damagesource.DamageSource; @@ -42,6 +43,11 @@ public class ZombieVillagerController extends MobEntityController { } public static class EntityZombieVillagerNPC extends ZombieVillager implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityZombieVillagerNPC(EntityType types, Level level) { 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 7fae82308..6ad9630a1 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.AreaEffectCloud; import net.minecraft.world.entity.Entity; @@ -53,6 +55,11 @@ public class AreaEffectCloudController extends MobEntityController { this.npc = (CitizensNPC) npc; } + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + @Override public Entity changeDimension(DimensionTransition transition) { 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 656fd4d50..039c9897d 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 @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Display.BlockDisplay; import net.minecraft.world.entity.Entity; @@ -55,6 +57,11 @@ public class BlockDisplayController extends MobEntityController { } public static class EntityBlockDisplayNPC extends BlockDisplay implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBlockDisplayNPC(EntityType types, Level level) { 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 94dec6c8f..5e947d1be 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.FluidTags; import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; @@ -48,6 +50,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends Boat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private float invFriction; private float landFriction; private Status lastStatus; @@ -200,9 +207,8 @@ public class BoatController extends MobEntityController { FluidState fluid = this.level().getFluidState(blockposition_mutableblockposition); if (fluid.is(FluidTags.WATER) && d0 < blockposition_mutableblockposition.getY() + fluid.getHeight(this.level(), blockposition_mutableblockposition)) { - if (!fluid.isSource()) { + if (!fluid.isSource()) return net.minecraft.world.entity.vehicle.Boat.Status.UNDER_FLOWING_WATER; - } flag = true; } } 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 d32692d7e..c04a3f662 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -42,6 +44,11 @@ public class BreezeWindChargeController extends MobEntityController { } public static class EntityBreezeWindChargeNPC extends BreezeWindCharge implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityBreezeWindChargeNPC(EntityType types, Level level) { 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 c25fd3c29..1feb01bdb 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 @@ -12,6 +12,7 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; @@ -49,6 +50,11 @@ public class ChestBoatController extends MobEntityController { } public static class EntityChestBoatNPC extends ChestBoat implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private double aC; private float aD; 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 0a583a335..99dde6dcf 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -42,6 +44,11 @@ public class DragonFireballController extends MobEntityController { } public static class EntityDragonFireballNPC extends DragonFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityDragonFireballNPC(EntityType types, Level level) { 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 e3e9b036a..daecac643 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 @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -52,6 +54,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends ThrownEgg implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEggNPC(EntityType types, Level level) { 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 015c20e90..3243ae137 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -42,6 +44,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EndCrystal implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(EntityType types, Level level) { 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 a7b42d51a..a6f24d496 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 @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -43,6 +45,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends ThrownEnderpearl implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(EntityType types, Level level) { 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 1a297ab5f..cadf51c6c 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 @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -40,6 +42,11 @@ public class EvokerFangsController extends MobEntityController { } public static class EntityEvokerFangsNPC extends EvokerFangs implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEvokerFangsNPC(EntityType types, Level level) { 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 9123e51dd..c5d7a0291 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends ExperienceOrb implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(EntityType types, Level level) { 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 7bcbc6661..5b87db1fb 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 @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -43,6 +45,11 @@ public class EyeOfEnderController extends MobEntityController { } public static class EntityEnderSignalNPC extends EyeOfEnder implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(EntityType types, Level level) { 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 3d7e1ed74..511ec8a9d 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 @@ -15,9 +15,11 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -53,6 +55,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends FallingBlockEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(EntityType types, Level level) { 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 c4c46020c..9ce844aee 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 @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends FireworkRocketEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(EntityType types, Level level) { 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 4ce48bb12..6698932a5 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 @@ -19,6 +19,7 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ClientInformation; @@ -63,6 +64,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends FishingHook implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(EntityType types, Level level) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/GlowItemFrameController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/GlowItemFrameController.java index 3ed1810c5..18df3fd18 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/GlowItemFrameController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/GlowItemFrameController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -46,6 +48,11 @@ public class GlowItemFrameController extends MobEntityController { } public static class EntityGlowItemFrameNPC extends GlowItemFrame implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityGlowItemFrameNPC(EntityType types, Level level) { 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 32bb19e6d..9d24a7e68 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class InteractionController extends MobEntityController { } public static class EntityInteractionNPC extends Interaction implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityInteractionNPC(EntityType types, Level level) { 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 1edfa9487..281f8add0 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 @@ -15,8 +15,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -48,6 +50,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends ItemEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemNPC(EntityType types, Level level) { 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 c1e2e6787..4a464fdbb 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 @@ -15,8 +15,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Display.ItemDisplay; import net.minecraft.world.entity.Entity; @@ -49,6 +51,11 @@ public class ItemDisplayController extends MobEntityController { } public static class EntityItemDisplayNPC extends ItemDisplay implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemDisplayNPC(EntityType types, Level level) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ItemFrameController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ItemFrameController.java index 50b777569..d7fdb8382 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ItemFrameController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/ItemFrameController.java @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -46,6 +48,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends ItemFrame implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(EntityType types, Level level) { 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 5a601ac35..c8dab8187 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends LargeFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(EntityType types, Level level) { 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 8db399bb9..84379cb48 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 @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends LeashFenceKnotEntity implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(EntityType types, Level level) { 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 549e84778..23d624022 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 @@ -14,9 +14,11 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -49,6 +51,11 @@ public class LlamaSpitController extends AbstractEntityController { } public static class EntityLlamaSpitNPC extends LlamaSpit implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityLlamaSpitNPC(EntityType types, Level level) { 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 a03d7b33c..57c9402ae 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class MarkerController extends MobEntityController { } public static class EntityMarkerNPC extends Marker implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMarkerNPC(EntityType types, Level level) { 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 d46dc0f92..77faf7ee9 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 @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends MinecartChest implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(EntityType types, Level level) { 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 67ccd1787..8f40796a9 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 @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends MinecartCommandBlock implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(EntityType types, Level level) { 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 bb3757228..517524c12 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 @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends MinecartFurnace implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(EntityType types, Level level) { 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 7e9f3e2c7..fcf9a4f8b 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 @@ -8,8 +8,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,6 +34,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends MinecartHopper implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(EntityType types, Level level) { 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 2788f6a05..d67a0deae 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends Minecart implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(EntityType types, Level level) { 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 b8358a334..1a3ee7786 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 @@ -8,8 +8,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,6 +34,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends MinecartSpawner implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(EntityType types, Level level) { diff --git a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartTNTController.java b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartTNTController.java index 2748b44f6..4bf3176c7 100644 --- a/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartTNTController.java +++ b/v1_21_R1/src/main/java/net/citizensnpcs/nms/v1_21_R1/entity/nonliving/MinecartTNTController.java @@ -8,8 +8,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -32,6 +34,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends MinecartTNT implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(EntityType types, Level level) { 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 2c7b31942..030ffd6d1 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 @@ -14,8 +14,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -48,6 +50,11 @@ public class OminousItemSpawnerController extends MobEntityController { } public static class EntityOminousItemSpawnerNPC extends OminousItemSpawner implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityOminousItemSpawnerNPC(EntityType types, Level level) { 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 0bba9bd7f..072a9c86a 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends Painting implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(EntityType types, Level level) { 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 3b1258eb8..11b9472d9 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class ShulkerBulletController extends MobEntityController { } public static class EntityShulkerBulletNPC extends ShulkerBullet implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityShulkerBulletNPC(EntityType types, Level level) { 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 847fd82dc..c4e51fc57 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends SmallFireball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(EntityType types, Level level) { 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 9e74f78c7..3ff26f083 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends Snowball implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(EntityType types, Level level) { 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 3a1eb116e..0d7729214 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 @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class SpectralArrowController extends MobEntityController { } public static class EntitySpectralArrowNPC extends SpectralArrow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntitySpectralArrowNPC(EntityType types, Level level) { 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 065271f2a..ff801d273 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 @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends PrimedTnt implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(EntityType types, Level level) { 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 1d76a37ab..c0d2c8ef3 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Display.TextDisplay; import net.minecraft.world.entity.Entity; @@ -36,6 +38,11 @@ public class TextDisplayController extends MobEntityController { } public static class EntityTextDisplayNPC extends TextDisplay implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTextDisplayNPC(EntityType types, Level level) { 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 5371d01df..a4f0d0560 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 @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends ThrownExperienceBottle implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(EntityType types, Level level) { 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 14a3f16d0..aaff525e9 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class ThrownPotionController extends MobEntityController { } public static class EntityThrownPotionNPC extends ThrownPotion implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownPotionNPC(EntityType types, Level level) { 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 97ea7a3f2..a3b732728 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 @@ -13,8 +13,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -37,6 +39,11 @@ public class ThrownTridentController extends MobEntityController { } public static class EntityThrownTridentNPC extends ThrownTrident implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityThrownTridentNPC(EntityType types, Level level) { 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 a2a12d742..4bc387385 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class TippedArrowController extends MobEntityController { } public static class EntityTippedArrowNPC extends Arrow implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityTippedArrowNPC(EntityType types, Level level) { 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 755e8f1c5..18fd3d987 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class WindChargeController extends MobEntityController { } public static class EntityWindChargeNPC extends WindCharge implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWindChargeNPC(EntityType types, Level level) { 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 b193014ad..b67e5b32d 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_21_R1.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_21_R1.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.tags.TagKey; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -36,6 +38,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends WitherSkull implements NPCHolder { + @Override + public boolean broadcastToPlayer(ServerPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.broadcastToPlayer(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(EntityType types, Level level) { 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 74480a517..1617b8100 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 @@ -2557,11 +2557,8 @@ public class NMSImpl implements NMSBridge { private static final MethodHandle ADVANCEMENTS_PLAYER_SETTER = NMS.getFirstFinalSetter(ServerPlayer.class, PlayerAdvancements.class); - private static final MethodHandle ARMADILLO_SCUTE_TIME = NMS.getSetter(Armadillo.class, "cn"); - private static final MethodHandle ATTRIBUTE_PROVIDER_MAP = NMS.getFirstGetter(AttributeSupplier.class, Map.class); - private static final MethodHandle ATTRIBUTE_PROVIDER_MAP_SETTER = NMS.getFirstFinalSetter(AttributeSupplier.class, Map.class); private static final MethodHandle ATTRIBUTE_SUPPLIER = NMS.getFirstGetter(AttributeMap.class, @@ -2617,7 +2614,6 @@ public class NMSImpl implements NMSBridge { private static final MethodHandle NAVIGATION_PATHFINDER = NMS.getFirstFinalSetter(PathNavigation.class, PathFinder.class); private static final MethodHandle NAVIGATION_WORLD_FIELD = NMS.getFirstSetter(PathNavigation.class, Level.class); - private static final MethodHandle PLAYER_INFO_ENTRIES_LIST = NMS .getFirstFinalSetter(ClientboundPlayerInfoUpdatePacket.class, List.class); private static final MethodHandle PLAYERINFO_ENTRIES = PLAYER_INFO_ENTRIES_LIST; 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 e7df85da8..12b9f09e9 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 @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_8_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityArmorStand; import net.minecraft.server.v1_8_R3.EntityHuman; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.Vec3D; import net.minecraft.server.v1_8_R3.World; @@ -47,6 +49,11 @@ public class ArmorStandController extends MobEntityController { } public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityArmorStandNPC(World world) { 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 3b0a1a736..c42e9312a 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityBat; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -45,6 +46,11 @@ public class BatController extends MobEntityController { } public static class EntityBatNPC extends EntityBat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBatNPC(World world) { 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 cc07de5d0..c89f35fec 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityBlaze; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -45,6 +46,11 @@ public class BlazeController extends MobEntityController { } public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityBlazeNPC(World world) { 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 899b9884b..5fb18a6a7 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityCaveSpider; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -47,6 +48,11 @@ public class CaveSpiderController extends MobEntityController { } public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCaveSpiderNPC(World world) { 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 300f83a90..df9d8df1f 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityChicken; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -47,6 +48,11 @@ public class ChickenController extends MobEntityController { } public static class EntityChickenNPC extends EntityChicken implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityChickenNPC(World world) { 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 a2037fddf..76ac2c973 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityCow; import net.minecraft.server.v1_8_R3.EntityHuman; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.ItemStack; import net.minecraft.server.v1_8_R3.Items; import net.minecraft.server.v1_8_R3.NBTTagCompound; @@ -50,6 +51,11 @@ public class CowController extends MobEntityController { } public static class EntityCowNPC extends EntityCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityCowNPC(World world) { 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 62a1f5d9b..09234a262 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 @@ -21,6 +21,7 @@ import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityCreeper; import net.minecraft.server.v1_8_R3.EntityHuman; import net.minecraft.server.v1_8_R3.EntityLightning; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -49,6 +50,11 @@ public class CreeperController extends MobEntityController { } public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean allowPowered; private final CitizensNPC npc; 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 64d5fbf17..c702c50b8 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 @@ -21,6 +21,7 @@ import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.DamageSource; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityEnderDragon; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.Vec3D; import net.minecraft.server.v1_8_R3.World; @@ -50,6 +51,11 @@ public class EnderDragonController extends MobEntityController { } public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderDragonNPC(World world) { 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 685b2f0ea..c287c1a40 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityEnderman; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -47,6 +48,11 @@ public class EndermanController extends MobEntityController { } public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermanNPC(World world) { 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 df00cf6f7..716bfd5d8 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityEndermite; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -47,6 +48,11 @@ public class EndermiteController extends MobEntityController { } public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEndermiteNPC(World world) { 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 c61894195..a700d4b7f 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 @@ -28,7 +28,6 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSImpl; import net.citizensnpcs.nms.v1_8_R3.util.PlayerControllerJump; import net.citizensnpcs.nms.v1_8_R3.util.PlayerControllerMove; import net.citizensnpcs.nms.v1_8_R3.util.PlayerNavigation; -import net.citizensnpcs.nms.v1_8_R3.util.PlayerlistTrackerEntry; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.npc.skin.SkinPacketTracker; @@ -58,6 +57,7 @@ import net.minecraft.server.v1_8_R3.WorldSettings; public class EntityHumanNPC extends EntityPlayer implements NPCHolder, SkinnableEntity { private PlayerControllerJump controllerJump; + private PlayerControllerMove controllerMove; private final Map equipmentCache = new HashMap<>(); private int jumpTicks = 0; @@ -65,7 +65,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable private final CitizensNPC npc; private final Location packetLocationCache = new Location(null, 0, 0, 0); private final SkinPacketTracker skinTracker; - private PlayerlistTrackerEntry trackerEntry; public EntityHumanNPC(MinecraftServer minecraftServer, WorldServer world, GameProfile gameProfile, PlayerInteractManager playerInteractManager, NPC npc) { @@ -90,10 +89,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable } @Override - public boolean a(EntityPlayer entityplayer) { - if (npc != null && trackerEntry == null) - return false; - return super.a(entityplayer); + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); } @Override @@ -362,10 +359,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable npc.getOrAddTrait(SkinTrait.class).setSkinPersistent(skinName, signature, data); } - public void setTracked(PlayerlistTrackerEntry trackerEntry) { - this.trackerEntry = trackerEntry; - } - @Override public void t_() { super.t_(); 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 fef39d551..53413dd72 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 @@ -17,6 +17,7 @@ import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityGhast; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -31,6 +32,11 @@ public class GhastController extends MobEntityController { } public static class EntityGhastNPC extends EntityGhast implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGhastNPC(World world) { 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 d6d04e880..5dd55db36 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityGiantZombie; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class GiantController extends MobEntityController { } public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGiantNPC(World world) { 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 00d3d1ac0..c20a4ac13 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityGuardian; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class GuardianController extends MobEntityController { } public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityGuardianNPC(World world) { 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 49994e829..20cd9daa7 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 @@ -24,6 +24,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityHorse; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.GenericAttributes; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -45,6 +46,11 @@ public class HorseController extends MobEntityController { } public static class EntityHorseNPC extends EntityHorse implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double baseMovementSpeed; private final CitizensNPC npc; 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 c31664f77..659731d42 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityIronGolem; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class IronGolemController extends MobEntityController { } public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityIronGolemNPC(World world) { 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 6dca521fd..501d09768 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 @@ -21,6 +21,7 @@ import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityHuman; import net.minecraft.server.v1_8_R3.EntityMagmaCube; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -35,6 +36,11 @@ public class MagmaCubeController extends MobEntityController { } public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMagmaCubeNPC(World world) { 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 64d7e6940..be057ff23 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityHuman; import net.minecraft.server.v1_8_R3.EntityMushroomCow; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -34,6 +35,11 @@ public class MushroomCowController extends MobEntityController { } public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMushroomCowNPC(World world) { 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 53fead836..603defca7 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityOcelot; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class OcelotController extends MobEntityController { } public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityOcelotNPC(World world) { 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 e039e7c3b..4e9462edc 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityLightning; import net.minecraft.server.v1_8_R3.EntityPig; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -34,6 +35,11 @@ public class PigController extends MobEntityController { } public static class EntityPigNPC extends EntityPig implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigNPC(World world) { 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 52aec569d..50ba0f7e4 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityPigZombie; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class PigZombieController extends MobEntityController { } public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPigZombieNPC(World world) { 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 10b86d4e8..6c57d2be9 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 @@ -19,6 +19,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityLiving; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntityRabbit; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -34,6 +35,11 @@ public class RabbitController extends MobEntityController { } public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityRabbitNPC(World world) { 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 f9ba02b07..f9bf7b0d9 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntitySheep; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class SheepController extends MobEntityController { } public static class EntitySheepNPC extends EntitySheep implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySheepNPC(World world) { 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 c2b84cb29..3c023cb3e 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntitySilverfish; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class SilverfishController extends MobEntityController { } public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySilverfishNPC(World world) { 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 f71c0cab2..c7872b7aa 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntitySkeleton; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class SkeletonController extends MobEntityController { } public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySkeletonNPC(World world) { 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 d225a771a..e4f51b504 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityHuman; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntitySlime; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -35,6 +36,11 @@ public class SlimeController extends MobEntityController { } public static class EntitySlimeNPC extends EntitySlime implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySlimeNPC(World world) { 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 69adf490c..27c2ddb5a 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntitySnowman; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class SnowmanController extends MobEntityController { } public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowmanNPC(World world) { 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 6e061c328..efb8999de 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntitySpider; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class SpiderController extends MobEntityController { } public static class EntitySpiderNPC extends EntitySpider implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySpiderNPC(World world) { 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 3d6ff94e9..96e7bedbf 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntitySquid; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class SquidController extends MobEntityController { } public static class EntitySquidNPC extends EntitySquid implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySquidNPC(World world) { 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 1097e3a88..24641f2c5 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityHuman; import net.minecraft.server.v1_8_R3.EntityLightning; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntityVillager; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -35,6 +36,11 @@ public class VillagerController extends MobEntityController { } public static class EntityVillagerNPC extends EntityVillager implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private boolean blockingATrade; private final CitizensNPC npc; 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 4c56ad124..bbf83de41 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntityWitch; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class WitchController extends MobEntityController { } public static class EntityWitchNPC extends EntityWitch implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitchNPC(World world) { 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 4a84f9add..997a698df 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 @@ -16,6 +16,7 @@ import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Entity; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntityWither; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -31,6 +32,11 @@ public class WitherController extends MobEntityController { } public static class EntityWitherNPC extends EntityWither implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherNPC(World world) { 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 b7b9a3615..dd112b223 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 @@ -20,6 +20,7 @@ import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; import net.minecraft.server.v1_8_R3.EntityLiving; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntityWolf; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -35,6 +36,11 @@ public class WolfController extends MobEntityController { } public static class EntityWolfNPC extends EntityWolf implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWolfNPC(World world) { 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 af3c3ca95..bbba1a2f3 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 @@ -18,6 +18,7 @@ import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Entity; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntityZombie; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -33,6 +34,11 @@ public class ZombieController extends MobEntityController { } public static class EntityZombieNPC extends EntityZombie implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityZombieNPC(World world) { 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 60be59aae..2f205d6ca 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityArrow; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -43,6 +45,11 @@ public class ArrowController extends MobEntityController { } public static class EntityArrowNPC extends EntityArrow implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityArrowNPC(World world) { 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 7a3ae81e8..828b4974d 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 @@ -14,6 +14,7 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_8_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Block; @@ -21,6 +22,7 @@ import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.Blocks; import net.minecraft.server.v1_8_R3.EntityBoat; import net.minecraft.server.v1_8_R3.EntityLiving; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EnumParticle; import net.minecraft.server.v1_8_R3.Material; import net.minecraft.server.v1_8_R3.MathHelper; @@ -52,6 +54,11 @@ public class BoatController extends MobEntityController { } public static class EntityBoatNPC extends EntityBoat implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private double b; private final CitizensNPC npc; 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 6ebef2095..4c3222e59 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 @@ -15,9 +15,11 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityEgg; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; import net.minecraft.server.v1_8_R3.WorldServer; @@ -54,6 +56,11 @@ public class EggController extends AbstractEntityController { } public static class EntityEggNPC extends EntityEgg implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEggNPC(World world) { 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 f44e03854..e44088956 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityEnderCrystal; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -43,6 +45,11 @@ public class EnderCrystalController extends MobEntityController { } public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderCrystalNPC(World world) { 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 5bd30c6eb..911da7955 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityEnderPearl; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -43,6 +45,11 @@ public class EnderPearlController extends MobEntityController { } public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderPearlNPC(World world) { 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 228f37884..9a82621d7 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityEnderSignal; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -43,6 +45,11 @@ public class EnderSignalController extends MobEntityController { } public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityEnderSignalNPC(World world) { 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 cecfe66bb..3c70d30c6 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityExperienceOrb; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -29,6 +31,11 @@ public class ExperienceOrbController extends MobEntityController { } public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityExperienceOrbNPC(World world) { 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 896a1a4cd..75672cc67 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 @@ -17,10 +17,12 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSImpl; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.Block; import net.minecraft.server.v1_8_R3.EntityFallingBlock; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.IBlockData; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -46,6 +48,11 @@ public class FallingBlockController extends AbstractEntityController { } public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFallingBlockNPC(World world) { 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 17abbf0f9..48a1f9c96 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityFireworks; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -29,6 +31,11 @@ public class FireworkController extends MobEntityController { } public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFireworkNPC(World world) { 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 f53621e53..91d7a384d 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityFishingHook; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -29,6 +31,11 @@ public class FishingHookController extends MobEntityController { } public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityFishingHookNPC(World world) { 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 1c199f750..694c8c996 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 @@ -15,10 +15,12 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.AbstractEntityController; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityHuman; import net.minecraft.server.v1_8_R3.EntityItem; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.ItemStack; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -41,6 +43,11 @@ public class ItemController extends AbstractEntityController { } public static class EntityItemNPC extends EntityItem implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemNPC(World world) { 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 9181a28a5..b074b6c06 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 @@ -14,10 +14,12 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.EntityItemFrame; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EnumDirection; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -42,6 +44,11 @@ public class ItemFrameController extends MobEntityController { } public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityItemFrameNPC(World world) { 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 52e423fd5..46e30c787 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_8_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityLargeFireball; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -30,6 +32,11 @@ public class LargeFireballController extends MobEntityController { } public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLargeFireballNPC(World world) { 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 16b1556fd..097eb0608 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityLeash; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -29,6 +31,11 @@ public class LeashController extends MobEntityController { } public static class EntityLeashNPC extends EntityLeash implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityLeashNPC(World world) { 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 e521ba636..1c67ca639 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_8_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityMinecartChest; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -30,6 +32,11 @@ public class MinecartChestController extends MobEntityController { } public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartChestNPC(World world) { 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 627f192ec..58d8ed28b 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_8_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityMinecartCommandBlock; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -30,6 +32,11 @@ public class MinecartCommandController extends MobEntityController { } public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartCommandNPC(World world) { 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 307f884cf..4a6189f3d 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_8_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityMinecartFurnace; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -30,6 +32,11 @@ public class MinecartFurnaceController extends MobEntityController { } public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartFurnaceNPC(World world) { 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 5f232e900..00fb5ab43 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 @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_8_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityMinecartHopper; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -26,6 +28,11 @@ public class MinecartHopperController extends MobEntityController { } public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartHopperNPC(World world) { 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 68e98b15a..b0d834a4f 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 @@ -13,9 +13,11 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_8_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityMinecartRideable; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -30,6 +32,11 @@ public class MinecartRideableController extends MobEntityController { } public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartRideableNPC(World world) { 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 b1ffbd49a..eb950320f 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 @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_8_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityMinecartMobSpawner; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -26,6 +28,11 @@ public class MinecartSpawnerController extends MobEntityController { } public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartSpawnerNPC(World world) { 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 c2e06a602..f29a4c518 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 @@ -9,9 +9,11 @@ import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.nms.v1_8_R3.util.NMSImpl; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityMinecartTNT; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -26,6 +28,11 @@ public class MinecartTNTController extends MobEntityController { } public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityMinecartTNTNPC(World world) { 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 dd69116f6..1f1f3ad47 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 @@ -12,9 +12,11 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; import net.minecraft.server.v1_8_R3.EntityPainting; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -29,6 +31,11 @@ public class PaintingController extends MobEntityController { } public static class EntityPaintingNPC extends EntityPainting implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPaintingNPC(World world) { 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 ade813c8c..8ba95824c 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntitySmallFireball; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -29,6 +31,11 @@ public class SmallFireballController extends MobEntityController { } public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySmallFireballNPC(World world) { 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 a6e8da085..fd75c2380 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntitySnowball; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -29,6 +31,11 @@ public class SnowballController extends MobEntityController { } public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntitySnowballNPC(World world) { 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 850472b86..9e8c54332 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntityPotion; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -29,6 +31,11 @@ public class SplashPotionController extends MobEntityController { } public static class EntityPotionNPC extends EntityPotion implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityPotionNPC(World world) { 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 721afe92c..89c4eb077 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntityTNTPrimed; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -29,6 +31,11 @@ public class TNTPrimedController extends MobEntityController { } public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityTNTPrimedNPC(World world) { 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 97f747273..6ea6f4e4b 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntityThrownExpBottle; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -29,6 +31,11 @@ public class ThrownExpBottleController extends MobEntityController { } public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityThrownExpBottleNPC(World world) { 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 6fb658827..d6a599fce 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 @@ -12,8 +12,10 @@ import net.citizensnpcs.nms.v1_8_R3.entity.MobEntityController; import net.citizensnpcs.nms.v1_8_R3.util.NMSBoundingBox; import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; +import net.citizensnpcs.util.NMS; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_8_R3.AxisAlignedBB; +import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.EntityWitherSkull; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.World; @@ -29,6 +31,11 @@ public class WitherSkullController extends MobEntityController { } public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder { + @Override + public boolean a(EntityPlayer player) { + return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player)); + } + private final CitizensNPC npc; public EntityWitherSkullNPC(World world) { diff --git a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/NMSImpl.java b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/NMSImpl.java index 2567e8ed1..b9c227b7d 100644 --- a/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/NMSImpl.java +++ b/v1_8_R3/src/main/java/net/citizensnpcs/nms/v1_8_R3/util/NMSImpl.java @@ -987,9 +987,6 @@ public class NMSImpl implements NMSBridge { e.printStackTrace(); } } - if (getHandle(entity) instanceof EntityHumanNPC) { - ((EntityHumanNPC) getHandle(entity)).setTracked(replace); - } } @Override 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 bfd525578..aa13b6f87 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 @@ -163,9 +163,13 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry { } catch (Throwable e) { return null; } - return delegate.keySet().stream().map((Function) EntityPlayer::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()); + return tracker.trackedPlayers.stream() + .map((Function) EntityPlayer::getBukkitEntity) + .collect(Collectors.toSet()); } private static boolean getU(EntityTrackerEntry entry) {