Reduce allocation pressure from fluid push

This commit is contained in:
fullwall 2023-06-17 15:46:07 +08:00
parent 3e263bed97
commit 3cb63f5ab5
874 changed files with 8500 additions and 2037 deletions

View File

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

View File

@ -78,7 +78,19 @@ public class BatController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -116,8 +128,6 @@ public class BatController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -75,7 +75,19 @@ public class BlazeController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -113,8 +125,6 @@ public class BlazeController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -93,7 +93,19 @@ public class CaveSpiderController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -138,8 +150,6 @@ public class CaveSpiderController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -104,7 +104,19 @@ public class ChickenController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -149,8 +161,6 @@ public class ChickenController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -114,7 +114,19 @@ public class CodController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -158,8 +170,6 @@ public class CodController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -117,7 +117,19 @@ public class CowController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -162,8 +174,6 @@ public class CowController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -96,7 +96,19 @@ public class CreeperController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -147,8 +159,6 @@ public class CreeperController extends MobEntityController {
}
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -108,7 +108,19 @@ public class DolphinController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -152,8 +164,6 @@ public class DolphinController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -93,7 +93,19 @@ public class DrownedController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -137,8 +149,6 @@ public class DrownedController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

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

View File

@ -93,7 +93,19 @@ public class EndermanController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -137,8 +149,6 @@ public class EndermanController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -93,7 +93,19 @@ public class EndermiteController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -137,8 +149,6 @@ public class EndermiteController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class EvokerController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -124,8 +136,6 @@ public class EvokerController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -61,7 +61,19 @@ public class GhastController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -99,8 +111,6 @@ public class GhastController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class GiantController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class GiantController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -81,7 +81,19 @@ public class GuardianController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -126,8 +138,6 @@ public class GuardianController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -81,7 +81,19 @@ public class GuardianElderController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -126,8 +138,6 @@ public class GuardianElderController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -105,7 +105,19 @@ public class HorseController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -158,8 +170,6 @@ public class HorseController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -105,7 +105,19 @@ public class HorseDonkeyController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -158,8 +170,6 @@ public class HorseDonkeyController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -105,7 +105,19 @@ public class HorseMuleController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -158,8 +170,6 @@ public class HorseMuleController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

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

View File

@ -106,7 +106,19 @@ public class HorseZombieController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -159,8 +171,6 @@ public class HorseZombieController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class IllusionerController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -124,8 +136,6 @@ public class IllusionerController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class IronGolemController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class IronGolemController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

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

View File

@ -85,7 +85,19 @@ public class MagmaCubeController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -136,8 +148,6 @@ public class MagmaCubeController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -97,7 +97,19 @@ public class MushroomCowController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -141,8 +153,6 @@ public class MushroomCowController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -88,7 +88,19 @@ public class OcelotController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -140,8 +152,6 @@ public class OcelotController extends MobEntityController {
}
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -72,7 +72,19 @@ public class ParrotController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -110,8 +122,6 @@ public class ParrotController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -90,7 +90,19 @@ public class PhantomController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -141,8 +153,6 @@ public class PhantomController extends MobEntityController {
return false;
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -89,7 +89,19 @@ public class PigController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -140,8 +152,6 @@ public class PigController extends MobEntityController {
return npc == null ? super.dh() : false;
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class PigZombieController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class PigZombieController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -70,7 +70,19 @@ public class PolarBearController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -108,8 +120,6 @@ public class PolarBearController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -101,7 +101,19 @@ public class PufferFishController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -146,8 +158,6 @@ public class PufferFishController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -89,7 +89,19 @@ public class RabbitController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -134,8 +146,6 @@ public class RabbitController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -100,7 +100,19 @@ public class SalmonController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -144,8 +156,6 @@ public class SalmonController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -88,7 +88,19 @@ public class SheepController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -132,8 +144,6 @@ public class SheepController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -82,7 +82,19 @@ public class ShulkerController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -126,8 +138,6 @@ public class ShulkerController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class SilverfishController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class SilverfishController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class SkeletonController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class SkeletonController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class SkeletonStrayController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class SkeletonStrayController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class SkeletonWitherController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class SkeletonWitherController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -85,7 +85,19 @@ public class SlimeController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -137,8 +149,6 @@ public class SlimeController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class SnowmanController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class SnowmanController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class SpiderController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class SpiderController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class SquidController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class SquidController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -100,7 +100,19 @@ public class TropicalFishController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -144,8 +156,6 @@ public class TropicalFishController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -88,7 +88,19 @@ public class TurtleController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -132,8 +144,6 @@ public class TurtleController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -64,7 +64,19 @@ public class VexController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -102,8 +114,6 @@ public class VexController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -108,7 +108,19 @@ public class VillagerController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -162,8 +174,6 @@ public class VillagerController extends MobEntityController {
return super.dB();
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -88,7 +88,19 @@ public class VindicatorController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -133,8 +145,6 @@ public class VindicatorController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class WitchController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class WitchController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -61,7 +61,19 @@ public class WitherController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -104,8 +116,6 @@ public class WitherController extends MobEntityController {
: npc.data().get("wither-arrow-shield");
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -90,7 +90,19 @@ public class WolfController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -135,8 +147,6 @@ public class WolfController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class ZombieController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class ZombieController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class ZombieHuskController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class ZombieHuskController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -79,7 +79,19 @@ public class ZombieVillagerController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
double mx = motX;
double my = motY;
double mz = motZ;
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
motX = mx;
motY = my;
motZ = mz;
}
return res;
}
@Override
@ -123,8 +135,6 @@ public class ZombieVillagerController extends MobEntityController {
return NMSImpl.getSoundEffect(npc, super.D(), NPC.Metadata.AMBIENT_SOUND);
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1758,22 +1758,6 @@ public class NMSImpl implements NMSBridge {
return null;
}
public static boolean fluidPush(NPC npc, Entity entity, Supplier<Boolean> func) {
if (npc == null) {
return func.get();
}
double mx = entity.motX;
double my = entity.motY;
double mz = entity.motZ;
boolean res = func.get();
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

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

View File

@ -25,6 +25,7 @@ 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 {
@ -79,7 +80,15 @@ public class BatController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
Vec3D old = getMot().add(0, 0, 0);
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
setMot(old);
}
return res;
}
@Override
@ -109,8 +118,6 @@ public class BatController extends MobEntityController {
return npc == null ? super.d(save) : false;
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -25,6 +25,7 @@ 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 {
@ -76,7 +77,15 @@ public class BlazeController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
Vec3D old = getMot().add(0, 0, 0);
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
setMot(old);
}
return res;
}
@Override
@ -106,8 +115,6 @@ public class BlazeController extends MobEntityController {
return npc == null ? super.d(save) : false;
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -103,7 +103,15 @@ public class CatController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
Vec3D old = getMot().add(0, 0, 0);
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
setMot(old);
}
return res;
}
@Override
@ -142,8 +150,6 @@ public class CatController extends MobEntityController {
}
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -93,7 +93,15 @@ public class CaveSpiderController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
Vec3D old = getMot().add(0, 0, 0);
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
setMot(old);
}
return res;
}
@Override
@ -132,8 +140,6 @@ public class CaveSpiderController extends MobEntityController {
}
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

View File

@ -103,7 +103,15 @@ public class ChickenController extends MobEntityController {
@Override
public boolean b(Tag<FluidType> tag) {
return NMSImpl.fluidPush(npc, this, () -> super.b(tag));
if (npc == null) {
return super.b(tag);
}
Vec3D old = getMot().add(0, 0, 0);
boolean res = super.b(tag);
if (!npc.isPushableByFluids()) {
setMot(old);
}
return res;
}
@Override
@ -142,8 +150,6 @@ public class ChickenController extends MobEntityController {
}
}
@Override
public void f(double x, double y, double z) {
Vector vector = Util.callPushEvent(npc, x, y, z);

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