Remove NMS#getNPC and NMS#getMethod, fix Fox setFaceplanted mapping

This commit is contained in:
fullwall 2024-09-05 23:57:54 +08:00
parent 7cabe94b14
commit 81794f5ece
1313 changed files with 6541 additions and 6651 deletions

View File

@ -264,7 +264,7 @@ public class Settings {
PATHFINDER_FALL_DISTANCE(
"The default allowed maximum fall distance when pathfinding, set to -1 to use the default value",
"npc.pathfinding.allowed-fall-distance", -1),
PLACEHOLDER_SKIN_UPDATE_FREQUENCY("How often to update placeholders",
PLACEHOLDER_SKIN_UPDATE_FREQUENCY("How often to update skin placeholders",
"npc.skins.placeholder-update-frequency-ticks", "npc.skins.placeholder-update-frequency", "5m"),
PLAYER_TELEPORT_DELAY("npc.delay-player-teleport-ticks", "npc.delay-player-teleport", -1),
REMOVE_PLAYERS_FROM_PLAYER_LIST("Whether to remove NPCs from the Java list of players",

View File

@ -32,7 +32,6 @@ import net.citizensnpcs.api.util.RemoveReason;
import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.trait.ArmorStandTrait;
import net.citizensnpcs.trait.LookClose;
import net.citizensnpcs.util.NMS;
public class CitizensNPCRegistry implements NPCRegistry {
private final String name;
@ -187,9 +186,7 @@ public class CitizensNPCRegistry implements NPCRegistry {
@Override
public NPC getNPC(Entity entity) {
if (entity == null)
return null;
return entity instanceof NPCHolder ? ((NPCHolder) entity).getNPC() : NMS.getNPC(entity);
return entity instanceof NPCHolder ? ((NPCHolder) entity).getNPC() : null;
}
@Override

View File

@ -505,29 +505,13 @@ public class NMS {
return original;
}
public static Method getMethod(Class<?> clazz, String method, boolean log, Class<?>... params) {
if (clazz == null)
return null;
Method f = null;
try {
f = clazz.getDeclaredMethod(method, params);
f.setAccessible(true);
} catch (Exception e) {
if (log) {
Messaging.severeTr(Messages.ERROR_GETTING_METHOD, method, e.getLocalizedMessage());
if (Messaging.isDebugging()) {
e.printStackTrace();
}
}
}
return f;
}
public static MethodHandle getMethodHandle(Class<?> clazz, String method, boolean log, Class<?>... params) {
if (clazz == null)
return null;
try {
return LOOKUP.unreflect(getMethod(clazz, method, log, params));
Method m = clazz.getDeclaredMethod(method, params);
m.setAccessible(true);
return LOOKUP.unreflect(m);
} catch (Exception e) {
if (log) {
Messaging.severeTr(Messages.ERROR_GETTING_METHOD, method, e.getLocalizedMessage());
@ -547,10 +531,6 @@ public class NMS {
return Lists.newArrayList(CitizensAPI.getLocationLookup().getNearbyVisiblePlayers(from, location, radius));
}
public static NPC getNPC(Entity entity) {
return BRIDGE.getNPC(entity);
}
public static EntityPacketTracker getPacketTracker(Entity entity) {
if (entity == null)
return null;

View File

@ -97,8 +97,6 @@ public interface NMSBridge {
public float getHorizontalMovement(Entity entity);
public NPC getNPC(Entity entity);
public EntityPacketTracker getPacketTracker(Entity entity);
public List<Entity> getPassengers(Entity entity);

View File

@ -52,11 +52,6 @@ public class ArmorStandController extends MobEntityController {
}
public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityArmorStandNPC(World world) {
@ -83,6 +78,11 @@ public class ArmorStandController extends MobEntityController {
return event.isCancelled() ? EnumInteractionResult.FAIL : EnumInteractionResult.SUCCESS;
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -47,11 +47,6 @@ public class BatController extends MobEntityController {
}
public static class EntityBatNPC extends EntityBat implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityBatNPC(World world) {
@ -77,6 +72,11 @@ public class BatController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -47,11 +47,6 @@ public class BlazeController extends MobEntityController {
}
public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityBlazeNPC(World world) {
@ -74,6 +69,11 @@ public class BlazeController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -49,11 +49,6 @@ public class CaveSpiderController extends MobEntityController {
}
public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityCaveSpiderNPC(World world) {
@ -83,6 +78,11 @@ public class CaveSpiderController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -49,11 +49,6 @@ public class ChickenController extends MobEntityController {
}
public static class EntityChickenNPC extends EntityChicken implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityChickenNPC(World world) {
@ -92,6 +87,11 @@ public class ChickenController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -53,11 +53,6 @@ public class CowController extends MobEntityController {
}
public static class EntityCowNPC extends EntityCow implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityCowNPC(World world) {
@ -106,6 +101,11 @@ public class CowController extends MobEntityController {
return super.a(entityhuman, enumhand, itemstack);
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -53,11 +53,6 @@ public class CreeperController extends MobEntityController {
}
public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private boolean allowPowered;
private final CitizensNPC npc;
@ -94,6 +89,11 @@ public class CreeperController extends MobEntityController {
return npc == null || !npc.isProtected() ? super.a(entityhuman, enumhand, itemstack) : false;
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -53,11 +53,6 @@ public class EnderDragonController extends MobEntityController {
}
public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityEnderDragonNPC(World world) {
@ -80,6 +75,11 @@ public class EnderDragonController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -49,11 +49,6 @@ public class EndermanController extends MobEntityController {
}
public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityEndermanNPC(World world) {
@ -83,6 +78,11 @@ public class EndermanController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -49,11 +49,6 @@ public class EndermiteController extends MobEntityController {
}
public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityEndermiteNPC(World world) {
@ -83,6 +78,11 @@ public class EndermiteController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -33,11 +33,6 @@ public class GhastController extends MobEntityController {
}
public static class EntityGhastNPC extends EntityGhast implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityGhastNPC(World world) {
@ -60,6 +55,11 @@ public class GhastController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class GiantController extends MobEntityController {
}
public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityGiantNPC(World world) {
@ -69,6 +64,11 @@ public class GiantController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class GuardianController extends MobEntityController {
}
public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityGuardianNPC(World world) {
@ -69,6 +64,11 @@ public class GuardianController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -47,11 +47,6 @@ public class HorseController extends MobEntityController {
}
public static class EntityHorseNPC extends EntityHorse implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private double baseMovementSpeed;
private final CitizensNPC npc;
@ -98,6 +93,11 @@ public class HorseController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class IronGolemController extends MobEntityController {
}
public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityIronGolemNPC(World world) {
@ -69,6 +64,11 @@ public class IronGolemController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -37,11 +37,6 @@ public class MagmaCubeController extends MobEntityController {
}
public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityMagmaCubeNPC(World world) {
@ -75,6 +70,11 @@ public class MagmaCubeController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -38,11 +38,6 @@ public class MushroomCowController extends MobEntityController {
}
public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityMushroomCowNPC(World world) {
@ -88,6 +83,11 @@ public class MushroomCowController extends MobEntityController {
return false;
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class OcelotController extends MobEntityController {
}
public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityOcelotNPC(World world) {
@ -78,6 +73,11 @@ public class OcelotController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -36,11 +36,6 @@ public class PigController extends MobEntityController {
}
public static class EntityPigNPC extends EntityPig implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityPigNPC(World world) {
@ -79,6 +74,11 @@ public class PigController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class PigZombieController extends MobEntityController {
}
public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityPigZombieNPC(World world) {
@ -69,6 +64,11 @@ public class PigZombieController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -33,11 +33,6 @@ public class PolarBearController extends MobEntityController {
}
public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityPolarBearNPC(World world) {
@ -69,6 +64,11 @@ public class PolarBearController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -36,11 +36,6 @@ public class RabbitController extends MobEntityController {
}
public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityRabbitNPC(World world) {
@ -79,6 +74,11 @@ public class RabbitController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class SheepController extends MobEntityController {
}
public static class EntitySheepNPC extends EntitySheep implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntitySheepNPC(World world) {
@ -78,6 +73,11 @@ public class SheepController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -36,11 +36,6 @@ public class ShulkerController extends MobEntityController {
}
public static class EntityShulkerNPC extends EntityShulker implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityShulkerNPC(World world) {
@ -70,6 +65,11 @@ public class ShulkerController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class SilverfishController extends MobEntityController {
}
public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntitySilverfishNPC(World world) {
@ -69,6 +64,11 @@ public class SilverfishController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class SkeletonController extends MobEntityController {
}
public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntitySkeletonNPC(World world) {
@ -69,6 +64,11 @@ public class SkeletonController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -37,11 +37,6 @@ public class SlimeController extends MobEntityController {
}
public static class EntitySlimeNPC extends EntitySlime implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntitySlimeNPC(World world) {
@ -75,6 +70,11 @@ public class SlimeController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class SnowmanController extends MobEntityController {
}
public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntitySnowmanNPC(World world) {
@ -69,6 +64,11 @@ public class SnowmanController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class SpiderController extends MobEntityController {
}
public static class EntitySpiderNPC extends EntitySpider implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntitySpiderNPC(World world) {
@ -69,6 +64,11 @@ public class SpiderController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class SquidController extends MobEntityController {
}
public static class EntitySquidNPC extends EntitySquid implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntitySquidNPC(World world) {
@ -69,6 +64,11 @@ public class SquidController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -39,11 +39,6 @@ public class VillagerController extends MobEntityController {
}
public static class EntityVillagerNPC extends EntityVillager implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private boolean blockingATrade;
private final CitizensNPC npc;
@ -92,6 +87,11 @@ public class VillagerController extends MobEntityController {
return super.a(entityhuman, enumhand, itemstack);
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class WitchController extends MobEntityController {
}
public static class EntityWitchNPC extends EntityWitch implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityWitchNPC(World world) {
@ -69,6 +64,11 @@ public class WitchController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -33,11 +33,6 @@ public class WitherController extends MobEntityController {
}
public static class EntityWitherNPC extends EntityWither implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityWitherNPC(World world) {
@ -60,6 +55,11 @@ public class WitherController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -37,11 +37,6 @@ public class WolfController extends MobEntityController {
}
public static class EntityWolfNPC extends EntityWolf implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityWolfNPC(World world) {
@ -80,6 +75,11 @@ public class WolfController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class ZombieController extends MobEntityController {
}
public static class EntityZombieNPC extends EntityZombie implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityZombieNPC(World world) {
@ -69,6 +64,11 @@ public class ZombieController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -45,11 +45,6 @@ public class AreaEffectCloudController extends MobEntityController {
}
public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityAreaEffectCloudNPC(World world) {
@ -66,6 +61,11 @@ public class AreaEffectCloudController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -46,11 +46,6 @@ public class BoatController extends MobEntityController {
}
public static class EntityBoatNPC extends EntityBoat implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityBoatNPC(World world) {
@ -67,6 +62,11 @@ public class BoatController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -46,11 +46,6 @@ public class DragonFireballController extends MobEntityController {
}
public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityDragonFireballNPC(World world) {
@ -67,6 +62,11 @@ public class DragonFireballController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -56,11 +56,6 @@ public class EggController extends AbstractEntityController {
}
public static class EntityEggNPC extends EntityEgg implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityEggNPC(World world) {
@ -82,6 +77,11 @@ public class EggController extends AbstractEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -45,11 +45,6 @@ public class EnderCrystalController extends MobEntityController {
}
public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityEnderCrystalNPC(World world) {
@ -66,6 +61,11 @@ public class EnderCrystalController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -45,11 +45,6 @@ public class EnderPearlController extends MobEntityController {
}
public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityEnderPearlNPC(World world) {
@ -66,6 +61,11 @@ public class EnderPearlController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -45,11 +45,6 @@ public class EnderSignalController extends MobEntityController {
}
public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityEnderSignalNPC(World world) {
@ -66,6 +61,11 @@ public class EnderSignalController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class ExperienceOrbController extends MobEntityController {
}
public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityExperienceOrbNPC(World world) {
@ -52,6 +47,11 @@ public class ExperienceOrbController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -48,11 +48,6 @@ public class FallingBlockController extends AbstractEntityController {
}
public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityFallingBlockNPC(World world) {
@ -74,6 +69,11 @@ public class FallingBlockController extends AbstractEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class FireworkController extends MobEntityController {
}
public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityFireworkNPC(World world) {
@ -52,6 +47,11 @@ public class FireworkController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class FishingHookController extends MobEntityController {
}
public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityFishingHookNPC(World world) {
@ -52,6 +47,11 @@ public class FishingHookController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -43,11 +43,6 @@ public class ItemController extends AbstractEntityController {
}
public static class EntityItemNPC extends EntityItem implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityItemNPC(World world) {
@ -65,6 +60,11 @@ public class ItemController extends AbstractEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -44,11 +44,6 @@ public class ItemFrameController extends MobEntityController {
}
public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityItemFrameNPC(World world) {
@ -65,6 +60,11 @@ public class ItemFrameController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -32,11 +32,6 @@ public class LargeFireballController extends MobEntityController {
}
public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityLargeFireballNPC(World world) {
@ -53,6 +48,11 @@ public class LargeFireballController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class LeashController extends MobEntityController {
}
public static class EntityLeashNPC extends EntityLeash implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityLeashNPC(World world) {
@ -52,6 +47,11 @@ public class LeashController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -32,11 +32,6 @@ public class MinecartChestController extends MobEntityController {
}
public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityMinecartChestNPC(World world) {
@ -53,6 +48,11 @@ public class MinecartChestController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -32,11 +32,6 @@ public class MinecartCommandController extends MobEntityController {
}
public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityMinecartCommandNPC(World world) {
@ -53,6 +48,11 @@ public class MinecartCommandController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -32,11 +32,6 @@ public class MinecartFurnaceController extends MobEntityController {
}
public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityMinecartFurnaceNPC(World world) {
@ -53,6 +48,11 @@ public class MinecartFurnaceController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -28,11 +28,6 @@ public class MinecartHopperController extends MobEntityController {
}
public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityMinecartHopperNPC(World world) {
@ -49,6 +44,11 @@ public class MinecartHopperController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -32,11 +32,6 @@ public class MinecartRideableController extends MobEntityController {
}
public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityMinecartRideableNPC(World world) {
@ -53,6 +48,11 @@ public class MinecartRideableController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -28,11 +28,6 @@ public class MinecartSpawnerController extends MobEntityController {
}
public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityMinecartSpawnerNPC(World world) {
@ -49,6 +44,11 @@ public class MinecartSpawnerController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -28,11 +28,6 @@ public class MinecartTNTController extends MobEntityController {
}
public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityMinecartTNTNPC(World world) {
@ -49,6 +44,11 @@ public class MinecartTNTController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class PaintingController extends MobEntityController {
}
public static class EntityPaintingNPC extends EntityPainting implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityPaintingNPC(World world) {
@ -52,6 +47,11 @@ public class PaintingController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class ShulkerBulletController extends MobEntityController {
}
public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityShulkerBulletNPC(World world) {
@ -52,6 +47,11 @@ public class ShulkerBulletController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class SmallFireballController extends MobEntityController {
}
public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntitySmallFireballNPC(World world) {
@ -52,6 +47,11 @@ public class SmallFireballController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class SnowballController extends MobEntityController {
}
public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntitySnowballNPC(World world) {
@ -52,6 +47,11 @@ public class SnowballController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class SpectralArrowController extends MobEntityController {
}
public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntitySpectralArrowNPC(World world) {
@ -52,6 +47,11 @@ public class SpectralArrowController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class TNTPrimedController extends MobEntityController {
}
public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityTNTPrimedNPC(World world) {
@ -52,6 +47,11 @@ public class TNTPrimedController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class ThrownExpBottleController extends MobEntityController {
}
public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityThrownExpBottleNPC(World world) {
@ -52,6 +47,11 @@ public class ThrownExpBottleController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -32,11 +32,6 @@ public class ThrownPotionController extends MobEntityController {
}
public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityThrownPotionNPC(World world) {
@ -53,6 +48,11 @@ public class ThrownPotionController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class TippedArrowController extends MobEntityController {
}
public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityTippedArrowNPC(World world) {
@ -52,6 +47,11 @@ public class TippedArrowController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -31,11 +31,6 @@ public class WitherSkullController extends MobEntityController {
}
public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityWitherSkullNPC(World world) {
@ -52,6 +47,11 @@ public class WitherSkullController extends MobEntityController {
super.a(NMSBoundingBox.makeBB(npc, bb));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public boolean bg() {
return npc == null ? super.bg() : npc.isPushableByFluids();

View File

@ -482,12 +482,6 @@ public class NMSImpl implements NMSBridge {
return handle.bg;
}
@Override
public NPC getNPC(org.bukkit.entity.Entity entity) {
Entity handle = getHandle(entity);
return handle instanceof NPCHolder ? ((NPCHolder) handle).getNPC() : null;
}
@Override
public EntityPacketTracker getPacketTracker(org.bukkit.entity.Entity entity) {
WorldServer server = (WorldServer) NMSImpl.getHandle(entity).getWorld();

View File

@ -50,11 +50,6 @@ public class ArmorStandController extends MobEntityController {
}
public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityArmorStandNPC(World world) {
@ -81,6 +76,11 @@ public class ArmorStandController extends MobEntityController {
return event.isCancelled() ? EnumInteractionResult.FAIL : EnumInteractionResult.SUCCESS;
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public void A_() {
super.A_();

View File

@ -47,11 +47,6 @@ public class BatController extends MobEntityController {
}
public static class EntityBatNPC extends EntityBat implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityBatNPC(World world) {
@ -77,6 +72,11 @@ public class BatController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -47,11 +47,6 @@ public class BlazeController extends MobEntityController {
}
public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityBlazeNPC(World world) {
@ -74,6 +69,11 @@ public class BlazeController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -49,11 +49,6 @@ public class CaveSpiderController extends MobEntityController {
}
public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityCaveSpiderNPC(World world) {
@ -83,6 +78,11 @@ public class CaveSpiderController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -49,11 +49,6 @@ public class ChickenController extends MobEntityController {
}
public static class EntityChickenNPC extends EntityChicken implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityChickenNPC(World world) {
@ -92,6 +87,11 @@ public class ChickenController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -53,11 +53,6 @@ public class CowController extends MobEntityController {
}
public static class EntityCowNPC extends EntityCow implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityCowNPC(World world) {
@ -106,6 +101,11 @@ public class CowController extends MobEntityController {
return super.a(entityhuman, enumhand);
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -50,11 +50,6 @@ public class CreeperController extends MobEntityController {
}
public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private boolean allowPowered;
private final CitizensNPC npc;
@ -86,6 +81,11 @@ public class CreeperController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -54,11 +54,6 @@ public class EnderDragonController extends MobEntityController {
}
public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityEnderDragonNPC(World world) {
@ -81,6 +76,11 @@ public class EnderDragonController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -49,11 +49,6 @@ public class EndermanController extends MobEntityController {
}
public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityEndermanNPC(World world) {
@ -83,6 +78,11 @@ public class EndermanController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -49,11 +49,6 @@ public class EndermiteController extends MobEntityController {
}
public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityEndermiteNPC(World world) {
@ -83,6 +78,11 @@ public class EndermiteController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class EvokerController extends MobEntityController {
}
public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityEvokerNPC(World world) {
@ -69,6 +64,11 @@ public class EvokerController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -33,11 +33,6 @@ public class GhastController extends MobEntityController {
}
public static class EntityGhastNPC extends EntityGhast implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityGhastNPC(World world) {
@ -60,6 +55,11 @@ public class GhastController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class GiantController extends MobEntityController {
}
public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityGiantNPC(World world) {
@ -69,6 +64,11 @@ public class GiantController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class GuardianController extends MobEntityController {
}
public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityGuardianNPC(World world) {
@ -69,6 +64,11 @@ public class GuardianController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class GuardianElderController extends MobEntityController {
}
public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityGuardianElderNPC(World world) {
@ -69,6 +64,11 @@ public class GuardianElderController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -45,11 +45,6 @@ public class HorseController extends MobEntityController {
}
public static class EntityHorseNPC extends EntityHorse implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private double baseMovementSpeed;
private final CitizensNPC npc;
@ -96,6 +91,11 @@ public class HorseController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -46,11 +46,6 @@ public class HorseDonkeyController extends MobEntityController {
}
public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private double baseMovementSpeed;
private final CitizensNPC npc;
@ -98,6 +93,11 @@ public class HorseDonkeyController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -46,11 +46,6 @@ public class HorseMuleController extends MobEntityController {
}
public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private double baseMovementSpeed;
private final CitizensNPC npc;
@ -98,6 +93,11 @@ public class HorseMuleController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -46,11 +46,6 @@ public class HorseSkeletonController extends MobEntityController {
}
public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private double baseMovementSpeed;
private final CitizensNPC npc;
@ -98,6 +93,11 @@ public class HorseSkeletonController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -46,11 +46,6 @@ public class HorseZombieController extends MobEntityController {
}
public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private double baseMovementSpeed;
private final CitizensNPC npc;
@ -98,6 +93,11 @@ public class HorseZombieController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class IronGolemController extends MobEntityController {
}
public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityIronGolemNPC(World world) {
@ -69,6 +64,11 @@ public class IronGolemController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -43,11 +43,6 @@ public class LlamaController extends MobEntityController {
}
public static class EntityLlamaNPC extends EntityLlama implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityLlamaNPC(World world) {
@ -89,6 +84,11 @@ public class LlamaController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -37,11 +37,6 @@ public class MagmaCubeController extends MobEntityController {
}
public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityMagmaCubeNPC(World world) {
@ -75,6 +70,11 @@ public class MagmaCubeController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public void A_() {
super.A_();

View File

@ -37,11 +37,6 @@ public class MushroomCowController extends MobEntityController {
}
public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityMushroomCowNPC(World world) {
@ -87,6 +82,11 @@ public class MushroomCowController extends MobEntityController {
return false;
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class OcelotController extends MobEntityController {
}
public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityOcelotNPC(World world) {
@ -78,6 +73,11 @@ public class OcelotController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -36,11 +36,6 @@ public class PigController extends MobEntityController {
}
public static class EntityPigNPC extends EntityPig implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityPigNPC(World world) {
@ -79,6 +74,11 @@ public class PigController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -35,11 +35,6 @@ public class PigZombieController extends MobEntityController {
}
public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityPigZombieNPC(World world) {
@ -69,6 +64,11 @@ public class PigZombieController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

View File

@ -33,11 +33,6 @@ public class PolarBearController extends MobEntityController {
}
public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder {
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
private final CitizensNPC npc;
public EntityPolarBearNPC(World world) {
@ -69,6 +64,11 @@ public class PolarBearController extends MobEntityController {
evt.getKnockbackVector().getX(), evt.getKnockbackVector().getZ()));
}
@Override
public boolean a(EntityPlayer player) {
return NMS.shouldBroadcastToPlayer(npc, () -> super.a(player));
}
@Override
public int aY() {
return NMS.getFallDistance(npc, super.aY());

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