mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-19 14:41:42 +01:00
Remove flyable code for phantoms and allays which should be always flyable
This commit is contained in:
parent
ff00cf1111
commit
0c88991c2c
@ -17,7 +17,6 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_13_R2.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_13_R2.BlockPosition;
|
||||
import net.minecraft.server.v1_13_R2.ControllerLook;
|
||||
import net.minecraft.server.v1_13_R2.ControllerMove;
|
||||
import net.minecraft.server.v1_13_R2.DamageSource;
|
||||
@ -29,7 +28,6 @@ import net.minecraft.server.v1_13_R2.EntityPlayer;
|
||||
import net.minecraft.server.v1_13_R2.EnumDifficulty;
|
||||
import net.minecraft.server.v1_13_R2.EnumPistonReaction;
|
||||
import net.minecraft.server.v1_13_R2.FluidType;
|
||||
import net.minecraft.server.v1_13_R2.IBlockData;
|
||||
import net.minecraft.server.v1_13_R2.NBTTagCompound;
|
||||
import net.minecraft.server.v1_13_R2.SoundEffect;
|
||||
import net.minecraft.server.v1_13_R2.Tag;
|
||||
@ -68,13 +66,6 @@ public class PhantomController extends MobEntityController {
|
||||
super.a(NMSBoundingBox.makeBB(npc, bb));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void a(double d0, boolean flag, IBlockData block, BlockPosition blockposition) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(d0, flag, block, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(Entity entity, float strength, double dx, double dz) {
|
||||
NMS.callKnockbackEvent(npc, strength, dx, dz, evt -> super.a(entity, (float) evt.getStrength(),
|
||||
@ -86,15 +77,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean b(Tag<FluidType> tag) {
|
||||
if (npc == null)
|
||||
@ -116,13 +98,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMS.getFallDistance(npc, super.bn());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void c(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.c(f, f1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float cG() {
|
||||
return NMS.getJumpPower(npc, super.cG());
|
||||
@ -242,14 +217,6 @@ public class PhantomController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean z_() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.z_();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
private static final MethodHandle MOVEMENT_TICK = NMS.getMethodHandle(EntityPhantom.class, "k", false);
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,6 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_14_R1.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_14_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_14_R1.ControllerLook;
|
||||
import net.minecraft.server.v1_14_R1.ControllerMove;
|
||||
import net.minecraft.server.v1_14_R1.DamageSource;
|
||||
@ -28,7 +27,6 @@ import net.minecraft.server.v1_14_R1.EntityTypes;
|
||||
import net.minecraft.server.v1_14_R1.EnumDifficulty;
|
||||
import net.minecraft.server.v1_14_R1.EnumPistonReaction;
|
||||
import net.minecraft.server.v1_14_R1.FluidType;
|
||||
import net.minecraft.server.v1_14_R1.IBlockData;
|
||||
import net.minecraft.server.v1_14_R1.NBTTagCompound;
|
||||
import net.minecraft.server.v1_14_R1.SoundEffect;
|
||||
import net.minecraft.server.v1_14_R1.Tag;
|
||||
@ -67,13 +65,6 @@ public class PhantomController extends MobEntityController {
|
||||
super.a(NMSBoundingBox.makeBB(npc, bb));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void a(double d0, boolean flag, IBlockData block, BlockPosition blockposition) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(d0, flag, block, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(Entity entity, float strength, double dx, double dz) {
|
||||
NMS.callKnockbackEvent(npc, strength, dx, dz, evt -> super.a(entity, (float) evt.getStrength(),
|
||||
@ -85,13 +76,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void b(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.b(f, f1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean b(Tag<FluidType> tag) {
|
||||
if (npc == null)
|
||||
@ -143,15 +127,6 @@ public class PhantomController extends MobEntityController {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(Vec3D vec3d) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.e(vec3d);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, vec3d);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void f(double x, double y, double z) {
|
||||
Vector vector = Util.callPushEvent(npc, x, y, z);
|
||||
@ -193,14 +168,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMSImpl.getSoundEffect(npc, super.getSoundHurt(damagesource), NPC.Metadata.HURT_SOUND);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isClimbing() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.isClimbing();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
@ -17,7 +17,6 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_15_R1.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_15_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_15_R1.ControllerLook;
|
||||
import net.minecraft.server.v1_15_R1.ControllerMove;
|
||||
import net.minecraft.server.v1_15_R1.DamageSource;
|
||||
@ -29,7 +28,6 @@ import net.minecraft.server.v1_15_R1.EntityPlayer;
|
||||
import net.minecraft.server.v1_15_R1.EntityTypes;
|
||||
import net.minecraft.server.v1_15_R1.EnumPistonReaction;
|
||||
import net.minecraft.server.v1_15_R1.FluidType;
|
||||
import net.minecraft.server.v1_15_R1.IBlockData;
|
||||
import net.minecraft.server.v1_15_R1.NBTTagCompound;
|
||||
import net.minecraft.server.v1_15_R1.SoundEffect;
|
||||
import net.minecraft.server.v1_15_R1.Tag;
|
||||
@ -74,13 +72,6 @@ public class PhantomController extends MobEntityController {
|
||||
super.a(NMSBoundingBox.makeBB(npc, bb));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void a(double d0, boolean flag, IBlockData block, BlockPosition blockposition) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(d0, flag, block, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(Entity entity, float strength, double dx, double dz) {
|
||||
NMS.callKnockbackEvent(npc, strength, dx, dz, evt -> super.a(entity, (float) evt.getStrength(),
|
||||
@ -92,13 +83,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean b(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.b(f, f1);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean b(Tag<FluidType> tag) {
|
||||
if (npc == null)
|
||||
@ -143,15 +127,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMS.getJumpPower(npc, super.dp());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(Vec3D vec3d) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.e(vec3d);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, vec3d);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean en() {
|
||||
if (npc == null || !npc.isProtected())
|
||||
@ -200,14 +175,6 @@ public class PhantomController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isClimbing() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.isClimbing();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
@ -17,7 +17,6 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_16_R3.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_16_R3.BlockPosition;
|
||||
import net.minecraft.server.v1_16_R3.ControllerLook;
|
||||
import net.minecraft.server.v1_16_R3.ControllerMove;
|
||||
import net.minecraft.server.v1_16_R3.DamageSource;
|
||||
@ -30,7 +29,6 @@ import net.minecraft.server.v1_16_R3.EntityPlayer;
|
||||
import net.minecraft.server.v1_16_R3.EntityTypes;
|
||||
import net.minecraft.server.v1_16_R3.EnumPistonReaction;
|
||||
import net.minecraft.server.v1_16_R3.FluidType;
|
||||
import net.minecraft.server.v1_16_R3.IBlockData;
|
||||
import net.minecraft.server.v1_16_R3.NBTTagCompound;
|
||||
import net.minecraft.server.v1_16_R3.SoundEffect;
|
||||
import net.minecraft.server.v1_16_R3.Tag;
|
||||
@ -84,13 +82,6 @@ public class PhantomController extends MobEntityController {
|
||||
NMSImpl.checkAndUpdateHeight(this, datawatcherobject, super::a);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void a(double d0, boolean flag, IBlockData block, BlockPosition blockposition) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(d0, flag, block, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean a(EntityPlayer player) {
|
||||
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
|
||||
@ -114,13 +105,6 @@ public class PhantomController extends MobEntityController {
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean b(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.b(f, f1);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bP() {
|
||||
return NMS.getFallDistance(npc, super.bP());
|
||||
@ -160,15 +144,6 @@ public class PhantomController extends MobEntityController {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void g(Vec3D vec3d) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.g(vec3d);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, vec3d);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(super.getBukkitEntity() instanceof NPCHolder)) {
|
||||
@ -210,14 +185,6 @@ public class PhantomController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isClimbing() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.isClimbing();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
@ -15,7 +15,6 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
@ -30,7 +29,6 @@ import net.minecraft.world.entity.monster.Phantom;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
import net.minecraft.world.entity.vehicle.Boat;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.PushReaction;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
@ -101,13 +99,6 @@ public class PhantomController extends MobEntityController {
|
||||
return super.canRide(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float f, float f1, DamageSource damagesource) {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.causeFallDamage(f, f1, damagesource);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkDespawn() {
|
||||
if (npc == null) {
|
||||
@ -115,13 +106,6 @@ public class PhantomController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void checkFallDamage(double d0, boolean flag, BlockState iblockdata, BlockPos blockposition) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.checkFallDamage(d0, flag, iblockdata, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEvent getAmbientSound() {
|
||||
return NMSImpl.getSoundEffect(npc, super.getAmbientSound(), NPC.Metadata.AMBIENT_SOUND);
|
||||
@ -194,14 +178,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMSBoundingBox.makeBB(npc, super.makeBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClimbable() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.onClimbable();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncedDataUpdated(EntityDataAccessor<?> datawatcherobject) {
|
||||
if (npc == null) {
|
||||
@ -239,15 +215,6 @@ public class PhantomController extends MobEntityController {
|
||||
return npc != null ? false : super.shouldDespawnInPeaceful();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void travel(Vec3 vec3d) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.travel(vec3d);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, vec3d);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateFluidHeightAndDoFluidPushing(Tag<Fluid> Tag, double d0) {
|
||||
if (npc == null)
|
||||
|
@ -31,7 +31,6 @@ import net.minecraft.world.entity.monster.Phantom;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
import net.minecraft.world.entity.vehicle.Boat;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.PushReaction;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
@ -102,13 +101,6 @@ public class PhantomController extends MobEntityController {
|
||||
return super.canRide(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float f, float f1, DamageSource damagesource) {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.causeFallDamage(f, f1, damagesource);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkDespawn() {
|
||||
if (npc == null) {
|
||||
@ -116,13 +108,6 @@ public class PhantomController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void checkFallDamage(double d0, boolean flag, BlockState iblockdata, BlockPos blockposition) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.checkFallDamage(d0, flag, iblockdata, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEvent getAmbientSound() {
|
||||
return NMSImpl.getSoundEffect(npc, super.getAmbientSound(), NPC.Metadata.AMBIENT_SOUND);
|
||||
@ -195,14 +180,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMSBoundingBox.makeBB(npc, super.makeBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClimbable() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.onClimbable();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncedDataUpdated(EntityDataAccessor<?> datawatcherobject) {
|
||||
if (npc == null) {
|
||||
@ -247,15 +224,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMSImpl.teleportAcrossWorld(this, worldserver, location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void travel(Vec3 vec3d) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.travel(vec3d);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, vec3d);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tagkey, double d0) {
|
||||
if (npc == null)
|
||||
|
@ -18,7 +18,6 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.PositionImpl;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket;
|
||||
@ -37,7 +36,6 @@ import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
import net.minecraft.world.entity.vehicle.Boat;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.PushReaction;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
@ -85,13 +83,6 @@ public class AllayController extends MobEntityController {
|
||||
return super.canRide(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float f, float f1, DamageSource damagesource) {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.causeFallDamage(f, f1, damagesource);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkDespawn() {
|
||||
if (npc == null) {
|
||||
@ -99,13 +90,6 @@ public class AllayController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void checkFallDamage(double d0, boolean flag, BlockState iblockdata, BlockPos blockposition) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.checkFallDamage(d0, flag, iblockdata, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void customServerAiStep() {
|
||||
super.customServerAiStep();
|
||||
@ -202,14 +186,6 @@ public class AllayController extends MobEntityController {
|
||||
return super.mobInteract(var0, var1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClimbable() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.onClimbable();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void push(double x, double y, double z) {
|
||||
Vector vector = Util.callPushEvent(npc, x, y, z);
|
||||
@ -240,15 +216,6 @@ public class AllayController extends MobEntityController {
|
||||
return NMSImpl.teleportAcrossWorld(this, worldserver, location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void travel(Vec3 vec3d) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.travel(vec3d);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, vec3d);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tagkey, double d0) {
|
||||
if (npc == null)
|
||||
|
@ -15,7 +15,6 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.PositionImpl;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
@ -32,7 +31,6 @@ import net.minecraft.world.entity.monster.Phantom;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
import net.minecraft.world.entity.vehicle.Boat;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.PushReaction;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
@ -103,13 +101,6 @@ public class PhantomController extends MobEntityController {
|
||||
return super.canRide(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float f, float f1, DamageSource damagesource) {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.causeFallDamage(f, f1, damagesource);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkDespawn() {
|
||||
if (npc == null) {
|
||||
@ -117,13 +108,6 @@ public class PhantomController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void checkFallDamage(double d0, boolean flag, BlockState iblockdata, BlockPos blockposition) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.checkFallDamage(d0, flag, iblockdata, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEvent getAmbientSound() {
|
||||
return NMSImpl.getSoundEffect(npc, super.getAmbientSound(), NPC.Metadata.AMBIENT_SOUND);
|
||||
@ -196,14 +180,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMSBoundingBox.makeBB(npc, super.makeBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClimbable() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.onClimbable();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncedDataUpdated(EntityDataAccessor<?> datawatcherobject) {
|
||||
if (npc == null) {
|
||||
@ -248,15 +224,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMSImpl.teleportAcrossWorld(this, worldserver, location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void travel(Vec3 vec3d) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.travel(vec3d);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, vec3d);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tagkey, double d0) {
|
||||
if (npc == null)
|
||||
|
@ -17,7 +17,6 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
@ -35,7 +34,6 @@ import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
import net.minecraft.world.entity.vehicle.Boat;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.PushReaction;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
@ -83,13 +81,6 @@ public class AllayController extends MobEntityController {
|
||||
return super.canRide(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float f, float f1, DamageSource damagesource) {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.causeFallDamage(f, f1, damagesource);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkDespawn() {
|
||||
if (npc == null) {
|
||||
@ -97,13 +88,6 @@ public class AllayController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void checkFallDamage(double d0, boolean flag, BlockState iblockdata, BlockPos blockposition) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.checkFallDamage(d0, flag, iblockdata, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void customServerAiStep() {
|
||||
super.customServerAiStep();
|
||||
@ -200,14 +184,6 @@ public class AllayController extends MobEntityController {
|
||||
return super.mobInteract(var0, var1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClimbable() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.onClimbable();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void push(Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -230,15 +206,6 @@ public class AllayController extends MobEntityController {
|
||||
return NMSImpl.teleportAcrossWorld(this, worldserver, location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void travel(Vec3 vec3d) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.travel(vec3d);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, vec3d);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tagkey, double d0) {
|
||||
if (npc == null)
|
||||
|
@ -14,7 +14,6 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
@ -30,7 +29,6 @@ import net.minecraft.world.entity.monster.Phantom;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
import net.minecraft.world.entity.vehicle.Boat;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.PushReaction;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
@ -101,13 +99,6 @@ public class PhantomController extends MobEntityController {
|
||||
return super.canRide(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float f, float f1, DamageSource damagesource) {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.causeFallDamage(f, f1, damagesource);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkDespawn() {
|
||||
if (npc == null) {
|
||||
@ -115,13 +106,6 @@ public class PhantomController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void checkFallDamage(double d0, boolean flag, BlockState iblockdata, BlockPos blockposition) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.checkFallDamage(d0, flag, iblockdata, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEvent getAmbientSound() {
|
||||
return NMSImpl.getSoundEffect(npc, super.getAmbientSound(), NPC.Metadata.AMBIENT_SOUND);
|
||||
@ -194,14 +178,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMSBoundingBox.makeBB(npc, super.makeBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClimbable() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.onClimbable();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncedDataUpdated(EntityDataAccessor<?> datawatcherobject) {
|
||||
if (npc == null) {
|
||||
@ -238,15 +214,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMSImpl.teleportAcrossWorld(this, worldserver, location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void travel(Vec3 vec3d) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.travel(vec3d);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, vec3d);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tagkey, double d0) {
|
||||
if (npc == null)
|
||||
|
@ -17,7 +17,6 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
@ -35,7 +34,6 @@ import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
import net.minecraft.world.entity.vehicle.Boat;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.PushReaction;
|
||||
import net.minecraft.world.level.portal.TeleportTransition;
|
||||
@ -83,13 +81,6 @@ public class AllayController extends MobEntityController {
|
||||
return super.canRide(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float f, float f1, DamageSource damagesource) {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.causeFallDamage(f, f1, damagesource);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkDespawn() {
|
||||
if (npc == null) {
|
||||
@ -97,13 +88,6 @@ public class AllayController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void checkFallDamage(double d0, boolean flag, BlockState iblockdata, BlockPos blockposition) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.checkFallDamage(d0, flag, iblockdata, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void customServerAiStep(ServerLevel level) {
|
||||
super.customServerAiStep(level);
|
||||
@ -200,14 +184,6 @@ public class AllayController extends MobEntityController {
|
||||
return super.mobInteract(var0, var1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClimbable() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.onClimbable();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void push(Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -230,15 +206,6 @@ public class AllayController extends MobEntityController {
|
||||
return NMSImpl.teleportAcrossWorld(this, transition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void travel(Vec3 vec3d) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.travel(vec3d);
|
||||
} else {
|
||||
NMSImpl.moveLogic(this, vec3d);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tagkey, double d0) {
|
||||
if (npc == null)
|
||||
|
@ -14,7 +14,6 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
@ -29,7 +28,6 @@ import net.minecraft.world.entity.monster.Phantom;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
import net.minecraft.world.entity.vehicle.Boat;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.PushReaction;
|
||||
import net.minecraft.world.level.portal.TeleportTransition;
|
||||
@ -99,13 +97,6 @@ public class PhantomController extends MobEntityController {
|
||||
return super.canRide(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float f, float f1, DamageSource damagesource) {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.causeFallDamage(f, f1, damagesource);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkDespawn() {
|
||||
if (npc == null) {
|
||||
@ -113,13 +104,6 @@ public class PhantomController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void checkFallDamage(double d0, boolean flag, BlockState iblockdata, BlockPos blockposition) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.checkFallDamage(d0, flag, iblockdata, blockposition);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEvent getAmbientSound() {
|
||||
return NMSImpl.getSoundEffect(npc, super.getAmbientSound(), NPC.Metadata.AMBIENT_SOUND);
|
||||
@ -192,14 +176,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMSBoundingBox.makeBB(npc, super.makeBoundingBox(vec3));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClimbable() {
|
||||
if (npc == null || !npc.isFlyable())
|
||||
return super.onClimbable();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncedDataUpdated(EntityDataAccessor<?> datawatcherobject) {
|
||||
if (npc == null) {
|
||||
@ -236,15 +212,6 @@ public class PhantomController extends MobEntityController {
|
||||
return NMSImpl.teleportAcrossWorld(this, transition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void travel(Vec3 vec3d) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.travel(vec3d);
|
||||
} else {
|
||||
NMSImpl.moveLogic(this, vec3d);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tagkey, double d0) {
|
||||
if (npc == null)
|
||||
|
Loading…
Reference in New Issue
Block a user