More code refactoring

This commit is contained in:
fullwall 2023-02-13 22:20:13 +08:00
parent ad218261ff
commit 871c7c0259
749 changed files with 842 additions and 4929 deletions

View File

@ -98,6 +98,7 @@ public class HologramTrait extends Trait {
Material item = SpigotUtil.isUsing1_13API() ? Material.matchMaterial(itemMatcher.group(1), false)
: Material.matchMaterial(itemMatcher.group(1));
NPC itemNPC = registry.createNPCUsingItem(EntityType.DROPPED_ITEM, "", new ItemStack(item, 1));
itemNPC.data().setPersistent(NPC.Metadata.NAMEPLATE_VISIBLE, false);
if (itemMatcher.group(2) != null) {
itemNPC.getOrAddTrait(ScoreboardTrait.class)
.setColor(Util.matchEnum(ChatColor.values(), itemMatcher.group(2).substring(1)));

View File

@ -78,16 +78,7 @@ public class BatController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -75,16 +75,7 @@ public class BlazeController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -93,16 +93,7 @@ public class CaveSpiderController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -106,16 +106,7 @@ public class ChickenController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -114,16 +114,7 @@ public class CodController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -119,16 +119,7 @@ public class CowController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -96,16 +96,7 @@ public class CreeperController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -108,16 +108,7 @@ public class DolphinController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -93,16 +93,7 @@ public class DrownedController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -77,16 +77,7 @@ public class EnderDragonController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -93,16 +93,7 @@ public class EndermanController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -93,16 +93,7 @@ public class EndermiteController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class EvokerController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -61,16 +61,7 @@ public class GhastController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class GiantController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -81,16 +81,7 @@ public class GuardianController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -81,16 +81,7 @@ public class GuardianElderController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -108,16 +108,7 @@ public class HorseController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -108,16 +108,7 @@ public class HorseDonkeyController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -108,16 +108,7 @@ public class HorseMuleController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -109,16 +109,7 @@ public class HorseSkeletonController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -109,16 +109,7 @@ public class HorseZombieController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class IllusionerController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class IronGolemController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -101,16 +101,7 @@ public class LlamaController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -85,16 +85,7 @@ public class MagmaCubeController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -100,16 +100,7 @@ public class MushroomCowController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -90,16 +90,7 @@ public class OcelotController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -72,16 +72,7 @@ public class ParrotController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -90,16 +90,7 @@ public class PhantomController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -91,16 +91,7 @@ public class PigController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -80,16 +80,7 @@ public class PigZombieController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -72,16 +72,7 @@ public class PolarBearController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -101,16 +101,7 @@ public class PufferFishController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -91,16 +91,7 @@ public class RabbitController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -100,16 +100,7 @@ public class SalmonController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -90,16 +90,7 @@ public class SheepController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -82,16 +82,7 @@ public class ShulkerController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class SilverfishController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class SkeletonController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class SkeletonStrayController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class SkeletonWitherController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -85,16 +85,7 @@ public class SlimeController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class SnowmanController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class SpiderController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class SquidController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -100,16 +100,7 @@ public class TropicalFishController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -88,16 +88,7 @@ public class TurtleController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -64,16 +64,7 @@ public class VexController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -110,16 +110,7 @@ public class VillagerController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -90,16 +90,7 @@ public class VindicatorController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class WitchController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -61,16 +61,7 @@ public class WitherController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -92,16 +92,7 @@ public class WolfController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class ZombieController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class ZombieHuskController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -79,16 +79,7 @@ public class ZombieVillagerController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -63,16 +64,7 @@ public class AreaEffectCloudController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -12,6 +12,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -80,16 +81,7 @@ public class ArmorStandController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -64,16 +64,7 @@ public class BoatController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -64,16 +64,7 @@ public class DragonFireballController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -12,6 +12,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.AbstractEntityController;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
@ -79,16 +80,7 @@ public class EggController extends AbstractEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -63,16 +64,7 @@ public class EnderCrystalController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -63,16 +64,7 @@ public class EnderPearlController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -63,16 +64,7 @@ public class EnderSignalController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -12,6 +12,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -66,16 +67,7 @@ public class EvokerFangsController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class ExperienceOrbController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -72,16 +72,7 @@ public class FallingBlockController extends AbstractEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class FireworkController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -14,6 +14,7 @@ import com.mojang.authlib.GameProfile;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -58,16 +59,7 @@ public class FishingHookController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -12,6 +12,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.AbstractEntityController;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
@ -62,16 +63,7 @@ public class ItemController extends AbstractEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -12,6 +12,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -62,16 +63,7 @@ public class ItemFrameController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -50,16 +50,7 @@ public class LargeFireballController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class LeashController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -12,6 +12,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.AbstractEntityController;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
@ -67,16 +68,7 @@ public class LlamaSpitController extends AbstractEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -50,16 +50,7 @@ public class MinecartChestController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -50,16 +50,7 @@ public class MinecartCommandController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -50,16 +50,7 @@ public class MinecartFurnaceController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -46,16 +46,7 @@ public class MinecartHopperController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -50,16 +50,7 @@ public class MinecartRideableController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -46,16 +46,7 @@ public class MinecartSpawnerController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -46,16 +46,7 @@ public class MinecartTNTController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class PaintingController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class ShulkerBulletController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class SmallFireballController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class SnowballController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class SpectralArrowController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class TNTPrimedController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class ThrownExpBottleController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -50,16 +51,7 @@ public class ThrownPotionController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class ThrownTridentController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class TippedArrowController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -10,6 +10,7 @@ import org.bukkit.util.Vector;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.nms.v1_13_R2.entity.MobEntityController;
import net.citizensnpcs.nms.v1_13_R2.util.NMSBoundingBox;
import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.Util;
@ -49,16 +50,7 @@ public class WitherSkullController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -259,6 +259,7 @@ import net.minecraft.server.v1_13_R2.EntityTurtle;
import net.minecraft.server.v1_13_R2.EntityTypes;
import net.minecraft.server.v1_13_R2.EntityWither;
import net.minecraft.server.v1_13_R2.EnumMoveType;
import net.minecraft.server.v1_13_R2.FluidType;
import net.minecraft.server.v1_13_R2.GenericAttributes;
import net.minecraft.server.v1_13_R2.IBlockData;
import net.minecraft.server.v1_13_R2.IChatBaseComponent;
@ -1708,6 +1709,19 @@ public class NMSImpl implements NMSBridge {
return null;
}
public static boolean fluidPush(NPC npc, Entity entity, net.minecraft.server.v1_13_R2.Tag<FluidType> tag) {
double mx = entity.motX;
double my = entity.motY;
double mz = entity.motZ;
boolean res = entity.b(tag);
if (!npc.isPushableByFluids()) {
entity.motX = mx;
entity.motY = my;
entity.motZ = mz;
}
return res;
}
public static void flyingMoveLogic(EntityLiving entity, float f, float f1, float f2) {
if ((entity.cP()) || (entity.bT())) {
double d0 = 0.08D;

View File

@ -25,7 +25,6 @@ import net.minecraft.server.v1_14_R1.FluidType;
import net.minecraft.server.v1_14_R1.NBTTagCompound;
import net.minecraft.server.v1_14_R1.SoundEffect;
import net.minecraft.server.v1_14_R1.Tag;
import net.minecraft.server.v1_14_R1.Vec3D;
import net.minecraft.server.v1_14_R1.World;
public class BatController extends MobEntityController {
@ -80,12 +79,7 @@ public class BatController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
Vec3D old = getMot().add(0, 0, 0);
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
this.setMot(old);
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -25,7 +25,6 @@ import net.minecraft.server.v1_14_R1.FluidType;
import net.minecraft.server.v1_14_R1.NBTTagCompound;
import net.minecraft.server.v1_14_R1.SoundEffect;
import net.minecraft.server.v1_14_R1.Tag;
import net.minecraft.server.v1_14_R1.Vec3D;
import net.minecraft.server.v1_14_R1.World;
public class BlazeController extends MobEntityController {
@ -77,12 +76,7 @@ public class BlazeController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
Vec3D old = getMot().add(0, 0, 0);
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
this.setMot(old);
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -106,12 +106,7 @@ public class CatController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
Vec3D old = getMot().add(0, 0, 0);
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
this.setMot(old);
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -93,12 +93,7 @@ public class CaveSpiderController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
Vec3D old = getMot().add(0, 0, 0);
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
this.setMot(old);
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

View File

@ -107,12 +107,7 @@ public class ChickenController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
Vec3D old = getMot().add(0, 0, 0);
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
this.setMot(old);
}
return res;
return NMSImpl.fluidPush(npc, this, tag);
}
@Override

Some files were not shown because too many files have changed in this diff Show More