Fix /npc item parsing behavior
This commit is contained in:
parent
d39c198956
commit
5b5811cfea
|
@ -725,12 +725,7 @@ public class NPCCommands {
|
|||
}
|
||||
|
||||
if (item != null) {
|
||||
ItemStack stack = new ItemStack(Material.STONE, 1);
|
||||
try {
|
||||
Bukkit.getUnsafe().modifyItemStack(stack, item);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
ItemStack stack = Util.parseItemStack(null, item);
|
||||
npc = registry.createNPCUsingItem(type, name, stack);
|
||||
} else {
|
||||
npc = registry.createNPC(type, name);
|
||||
|
@ -1362,19 +1357,17 @@ public class NPCCommands {
|
|||
public void item(CommandContext args, CommandSender sender, NPC npc, @Arg(1) Material mat, @Arg(2) String modify)
|
||||
throws CommandException {
|
||||
EntityType type = npc.getOrAddTrait(MobType.class).getType();
|
||||
if (!type.name().contains("ITEM_FRAME") && type != EntityType.DROPPED_ITEM && type != EntityType.FALLING_BLOCK)
|
||||
throw new CommandException(CommandMessages.REQUIREMENTS_INVALID_MOB_TYPE);
|
||||
if (!type.name().contains("ITEM_FRAME") && !type.name().contains("ITEM_DISPLAY")
|
||||
&& type != EntityType.DROPPED_ITEM && type != EntityType.FALLING_BLOCK)
|
||||
throw new CommandException(CommandMessages.REQUIREMENTS_INVALID_MOB_TYPE, Util.prettyEnum(type));
|
||||
ItemStack stack = args.hasFlag('h') ? ((Player) sender).getItemInHand() : new ItemStack(mat, 1);
|
||||
if (modify != null) {
|
||||
try {
|
||||
Bukkit.getUnsafe().modifyItemStack(stack, modify);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
stack = Util.parseItemStack(stack, modify);
|
||||
}
|
||||
if (mat == null && !args.hasFlag('h'))
|
||||
throw new CommandException(Messages.UNKNOWN_MATERIAL);
|
||||
npc.setItemProvider(() -> stack);
|
||||
ItemStack fstack = stack.clone();
|
||||
npc.setItemProvider(() -> fstack);
|
||||
if (npc.isSpawned()) {
|
||||
npc.despawn(DespawnReason.PENDING_RESPAWN);
|
||||
npc.spawn(npc.getStoredLocation(), SpawnReason.RESPAWN);
|
||||
|
@ -2348,14 +2341,13 @@ public class NPCCommands {
|
|||
public void profession(CommandContext args, CommandSender sender, NPC npc, @Arg(1) Profession parsed)
|
||||
throws CommandException {
|
||||
EntityType type = npc.getOrAddTrait(MobType.class).getType();
|
||||
if (type != EntityType.VILLAGER && !type.name().equals("ZOMBIE_VILLAGER")) {
|
||||
throw new RequirementMissingException(Messaging.tr(CommandMessages.REQUIREMENTS_INVALID_MOB_TYPE,
|
||||
type.name().toLowerCase().replace('_', ' ')));
|
||||
}
|
||||
if (parsed == null) {
|
||||
if (type != EntityType.VILLAGER && !type.name().equals("ZOMBIE_VILLAGER"))
|
||||
throw new CommandException(CommandMessages.REQUIREMENTS_INVALID_MOB_TYPE, Util.prettyEnum(type));
|
||||
|
||||
if (parsed == null)
|
||||
throw new CommandException(Messages.INVALID_PROFESSION, args.getString(1),
|
||||
Util.listValuesPretty(Profession.values()));
|
||||
}
|
||||
|
||||
npc.getOrAddTrait(VillagerProfession.class).setProfession(parsed);
|
||||
Messaging.sendTr(sender, Messages.PROFESSION_SET, npc.getName(), Util.prettyEnum(parsed));
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.citizensnpcs.trait.versioned;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Llama;
|
||||
import org.bukkit.entity.Llama.Color;
|
||||
|
||||
|
@ -67,8 +68,9 @@ public class LlamaTrait extends Trait {
|
|||
@Requirements(selected = true, ownership = true)
|
||||
public static void llama(CommandContext args, CommandSender sender, NPC npc,
|
||||
@Flag({ "color", "colour" }) Color color, @Flag("strength") Integer strength) throws CommandException {
|
||||
if (!npc.getOrAddTrait(MobType.class).getType().name().contains("LLAMA"))
|
||||
throw new CommandException(CommandMessages.REQUIREMENTS_INVALID_MOB_TYPE);
|
||||
EntityType type = npc.getOrAddTrait(MobType.class).getType();
|
||||
if (!type.name().contains("LLAMA"))
|
||||
throw new CommandException(CommandMessages.REQUIREMENTS_INVALID_MOB_TYPE, Util.prettyEnum(type));
|
||||
LlamaTrait trait = npc.getOrAddTrait(LlamaTrait.class);
|
||||
String output = "";
|
||||
if (args.hasAnyValueFlag("color", "colour")) {
|
||||
|
|
|
@ -33,8 +33,10 @@ import org.bukkit.util.Vector;
|
|||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.io.ByteArrayDataOutput;
|
||||
import com.google.common.io.ByteStreams;
|
||||
import com.google.common.primitives.Ints;
|
||||
|
||||
import net.citizensnpcs.Settings.Setting;
|
||||
import net.citizensnpcs.api.CitizensAPI;
|
||||
|
@ -369,6 +371,32 @@ public class Util {
|
|||
return list;
|
||||
}
|
||||
|
||||
public static ItemStack parseItemStack(ItemStack stack, String item) {
|
||||
if (stack == null || stack.getType() == Material.AIR) {
|
||||
stack = new ItemStack(Material.STONE, 1);
|
||||
}
|
||||
if (item.charAt(0) == '{') {
|
||||
try {
|
||||
Bukkit.getUnsafe().modifyItemStack(stack, item);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
} else if (!item.isEmpty()) {
|
||||
String[] parts = Iterables.toArray(Splitter.on(',').split(item), String.class);
|
||||
if (parts.length == 0)
|
||||
return stack;
|
||||
stack.setType(Material.matchMaterial(parts[0]));
|
||||
if (parts.length > 1) {
|
||||
stack.setAmount(Ints.tryParse(parts[1]));
|
||||
}
|
||||
if (parts.length > 2) {
|
||||
Integer durability = Ints.tryParse(parts[2]);
|
||||
stack.setDurability(durability.shortValue());
|
||||
}
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
public static int parseTicks(String raw) {
|
||||
Duration duration = SpigotUtil.parseDuration(raw, null);
|
||||
return duration == null ? -1 : toTicks(duration);
|
||||
|
|
|
@ -83,7 +83,7 @@ citizens.commands.npc.controllable.removed=[[{0}]] can no longer be controlled.
|
|||
citizens.commands.npc.controllable.set=[[{0}]] can now be controlled.
|
||||
citizens.commands.npc.copy.copied=[[{0}]] has been copied.
|
||||
citizens.commands.npc.create.mobtype-missing=[[{0}]] is not supported as an NPC mobtype.
|
||||
citizens.commands.npc.create.invalid-location=Spawn location could not be parsed or was not found.
|
||||
citizens.commands.npc.create.invalid-location=Location could not be parsed or was not found.
|
||||
citizens.commands.npc.create.invalid-mobtype=[[{0}]] is not a valid mob type.
|
||||
citizens.commands.npc.create.npc-name-too-long=NPC names cannot be longer than [[{0}]] characters. The name has been shortened.
|
||||
citizens.commands.npc.create.no-player-for-spawn=No player could be found by that name to spawn an NPC at.
|
||||
|
|
|
@ -49,11 +49,6 @@ public class ArmorStandController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityArmorStandNPC(World world) {
|
||||
|
@ -124,5 +119,10 @@ public class ArmorStandController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -48,11 +48,6 @@ public class BatController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityBatNPC extends EntityBat implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityBatNPC(World world) {
|
||||
|
@ -134,6 +129,11 @@ public class BatController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -48,11 +48,6 @@ public class BlazeController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityBlazeNPC(World world) {
|
||||
|
@ -131,6 +126,11 @@ public class BlazeController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -50,11 +50,6 @@ public class CaveSpiderController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityCaveSpiderNPC(World world) {
|
||||
|
@ -156,6 +151,11 @@ public class CaveSpiderController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -50,11 +50,6 @@ public class ChickenController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityChickenNPC extends EntityChicken implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityChickenNPC(World world) {
|
||||
|
@ -165,6 +160,11 @@ public class ChickenController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -54,11 +54,6 @@ public class CowController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityCowNPC extends EntityCow implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityCowNPC(World world) {
|
||||
|
@ -180,6 +175,11 @@ public class CowController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -51,11 +51,6 @@ public class CreeperController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private boolean allowPowered;
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
@ -165,6 +160,11 @@ public class CreeperController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -54,11 +54,6 @@ public class EnderDragonController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityEnderDragonNPC(World world) {
|
||||
|
@ -151,6 +146,11 @@ public class EnderDragonController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -50,11 +50,6 @@ public class EndermanController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityEndermanNPC(World world) {
|
||||
|
@ -155,6 +150,11 @@ public class EndermanController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -50,11 +50,6 @@ public class EndermiteController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityEndermiteNPC extends EntityEndermite implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityEndermiteNPC(World world) {
|
||||
|
@ -155,6 +150,11 @@ public class EndermiteController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class EvokerController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityEvokerNPC extends EntityEvoker implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityEvokerNPC(World world) {
|
||||
|
@ -142,6 +137,11 @@ public class EvokerController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -34,11 +34,6 @@ public class GhastController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityGhastNPC extends EntityGhast implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityGhastNPC(World world) {
|
||||
|
@ -122,6 +117,11 @@ public class GhastController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class GiantController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityGiantNPC extends EntityGiantZombie implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityGiantNPC(World world) {
|
||||
|
@ -141,6 +136,11 @@ public class GiantController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class GuardianController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityGuardianNPC extends EntityGuardian implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityGuardianNPC(World world) {
|
||||
|
@ -142,6 +137,11 @@ public class GuardianController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class GuardianElderController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityGuardianElderNPC extends EntityGuardianElder implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityGuardianElderNPC(World world) {
|
||||
|
@ -142,6 +137,11 @@ public class GuardianElderController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -46,16 +46,11 @@ public class HorseController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityHorseNPC extends EntityHorse implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private double baseMovementSpeed;
|
||||
|
||||
private final CitizensNPC npc;
|
||||
private boolean riding;
|
||||
|
||||
private boolean riding;
|
||||
public EntityHorseNPC(World world) {
|
||||
this(world, null);
|
||||
}
|
||||
|
@ -176,6 +171,11 @@ public class HorseController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -46,15 +46,10 @@ public class HorseDonkeyController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityHorseDonkeyNPC extends EntityHorseDonkey implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private double baseMovementSpeed;
|
||||
|
||||
private final CitizensNPC npc;
|
||||
private boolean riding;
|
||||
|
||||
public EntityHorseDonkeyNPC(World world) {
|
||||
this(world, null);
|
||||
}
|
||||
|
@ -175,6 +170,11 @@ public class HorseDonkeyController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -46,16 +46,11 @@ public class HorseMuleController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityHorseMuleNPC extends EntityHorseMule implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private double baseMovementSpeed;
|
||||
|
||||
private final CitizensNPC npc;
|
||||
private boolean riding;
|
||||
|
||||
private boolean riding;
|
||||
public EntityHorseMuleNPC(World world) {
|
||||
this(world, null);
|
||||
}
|
||||
|
@ -176,6 +171,11 @@ public class HorseMuleController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -46,16 +46,11 @@ public class HorseSkeletonController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityHorseSkeletonNPC extends EntityHorseSkeleton implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private double baseMovementSpeed;
|
||||
|
||||
private final CitizensNPC npc;
|
||||
private boolean riding;
|
||||
|
||||
private boolean riding;
|
||||
public EntityHorseSkeletonNPC(World world) {
|
||||
this(world, null);
|
||||
}
|
||||
|
@ -177,6 +172,11 @@ public class HorseSkeletonController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -46,16 +46,11 @@ public class HorseZombieController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityHorseZombieNPC extends EntityHorseZombie implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private double baseMovementSpeed;
|
||||
|
||||
private final CitizensNPC npc;
|
||||
private boolean riding;
|
||||
|
||||
private boolean riding;
|
||||
public EntityHorseZombieNPC(World world) {
|
||||
this(world, null);
|
||||
}
|
||||
|
@ -177,6 +172,11 @@ public class HorseZombieController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class IllusionerController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityIllusionerNPC extends EntityIllagerIllusioner implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityIllusionerNPC(World world) {
|
||||
|
@ -141,6 +136,11 @@ public class IllusionerController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class IronGolemController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityIronGolemNPC extends EntityIronGolem implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityIronGolemNPC(World world) {
|
||||
|
@ -141,6 +136,11 @@ public class IronGolemController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -46,15 +46,10 @@ public class LlamaController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityLlamaNPC extends EntityLlama implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private double baseMovementSpeed;
|
||||
|
||||
private final CitizensNPC npc;
|
||||
private boolean riding;
|
||||
|
||||
public EntityLlamaNPC(World world) {
|
||||
this(world, null);
|
||||
}
|
||||
|
@ -175,6 +170,11 @@ public class LlamaController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -38,11 +38,6 @@ public class MagmaCubeController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityMagmaCubeNPC extends EntityMagmaCube implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityMagmaCubeNPC(World world) {
|
||||
|
@ -162,6 +157,11 @@ public class MagmaCubeController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -38,11 +38,6 @@ public class MushroomCowController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityMushroomCowNPC extends EntityMushroomCow implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityMushroomCowNPC(World world) {
|
||||
|
@ -159,6 +154,11 @@ public class MushroomCowController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class OcelotController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityOcelotNPC extends EntityOcelot implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityOcelotNPC(World world) {
|
||||
|
@ -158,6 +153,11 @@ public class OcelotController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class ParrotController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityParrotNPC extends EntityParrot implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityParrotNPC(World world) {
|
||||
|
@ -128,6 +123,11 @@ public class ParrotController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -37,11 +37,6 @@ public class PigController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityPigNPC extends EntityPig implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityPigNPC(World world) {
|
||||
|
@ -158,6 +153,11 @@ public class PigController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class PigZombieController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityPigZombieNPC extends EntityPigZombie implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityPigZombieNPC(World world) {
|
||||
|
@ -141,6 +136,11 @@ public class PigZombieController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -34,11 +34,6 @@ public class PolarBearController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityPolarBearNPC extends EntityPolarBear implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityPolarBearNPC(World world) {
|
||||
|
@ -126,6 +121,11 @@ public class PolarBearController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -37,11 +37,6 @@ public class RabbitController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityRabbitNPC extends EntityRabbit implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityRabbitNPC(World world) {
|
||||
|
@ -157,6 +152,11 @@ public class RabbitController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class SheepController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntitySheepNPC extends EntitySheep implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntitySheepNPC(World world) {
|
||||
|
@ -150,6 +145,11 @@ public class SheepController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -37,11 +37,6 @@ public class ShulkerController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityShulkerNPC extends EntityShulker implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityShulkerNPC(World world) {
|
||||
|
@ -150,6 +145,11 @@ public class ShulkerController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class SilverfishController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntitySilverfishNPC extends EntitySilverfish implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntitySilverfishNPC(World world) {
|
||||
|
@ -140,6 +135,11 @@ public class SilverfishController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class SkeletonController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntitySkeletonNPC extends EntitySkeleton implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntitySkeletonNPC(World world) {
|
||||
|
@ -140,6 +135,11 @@ public class SkeletonController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class SkeletonStrayController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityStrayNPC extends EntitySkeletonStray implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityStrayNPC(World world) {
|
||||
|
@ -140,6 +135,11 @@ public class SkeletonStrayController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class SkeletonWitherController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntitySkeletonWitherNPC extends EntitySkeletonWither implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntitySkeletonWitherNPC(World world) {
|
||||
|
@ -140,6 +135,11 @@ public class SkeletonWitherController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -38,11 +38,6 @@ public class SlimeController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntitySlimeNPC extends EntitySlime implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntitySlimeNPC(World world) {
|
||||
|
@ -162,6 +157,11 @@ public class SlimeController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class SnowmanController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntitySnowmanNPC extends EntitySnowman implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntitySnowmanNPC(World world) {
|
||||
|
@ -140,6 +135,11 @@ public class SnowmanController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class SpiderController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntitySpiderNPC extends EntitySpider implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntitySpiderNPC(World world) {
|
||||
|
@ -140,6 +135,11 @@ public class SpiderController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class SquidController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntitySquidNPC extends EntitySquid implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntitySquidNPC(World world) {
|
||||
|
@ -140,6 +135,11 @@ public class SquidController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -34,11 +34,6 @@ public class VexController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityVexNPC extends EntityVex implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityVexNPC(World world) {
|
||||
|
@ -119,6 +114,11 @@ public class VexController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -42,11 +42,6 @@ public class VillagerController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityVillagerNPC extends EntityVillager implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private boolean blockingATrade;
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
@ -179,6 +174,11 @@ public class VillagerController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class VindicatorController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityVindicatorNPC extends EntityVindicator implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityVindicatorNPC(World world) {
|
||||
|
@ -150,6 +145,11 @@ public class VindicatorController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class WitchController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityWitchNPC extends EntityWitch implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityWitchNPC(World world) {
|
||||
|
@ -140,6 +135,11 @@ public class WitchController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -34,11 +34,6 @@ public class WitherController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityWitherNPC extends EntityWither implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityWitherNPC(World world) {
|
||||
|
@ -121,6 +116,11 @@ public class WitherController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -38,11 +38,6 @@ public class WolfController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityWolfNPC extends EntityWolf implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityWolfNPC(World world) {
|
||||
|
@ -152,6 +147,11 @@ public class WolfController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class ZombieController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityZombieNPC extends EntityZombie implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityZombieNPC(World world) {
|
||||
|
@ -140,6 +135,11 @@ public class ZombieController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class ZombieHuskController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityZombieHuskNPC extends EntityZombieHusk implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityZombieHuskNPC(World world) {
|
||||
|
@ -140,6 +135,11 @@ public class ZombieHuskController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -36,11 +36,6 @@ public class ZombieVillagerController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityZombieVillagerNPC extends EntityZombieVillager implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityZombieVillagerNPC(World world) {
|
||||
|
@ -140,6 +135,11 @@ public class ZombieVillagerController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeashed() {
|
||||
return NMSImpl.isLeashed(npc, super::isLeashed, this);
|
||||
|
|
|
@ -44,11 +44,6 @@ public class AreaEffectCloudController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityAreaEffectCloudNPC extends EntityAreaEffectCloud implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityAreaEffectCloudNPC(World world) {
|
||||
|
@ -109,5 +104,10 @@ public class AreaEffectCloudController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -45,11 +45,6 @@ public class BoatController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityBoatNPC extends EntityBoat implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityBoatNPC(World world) {
|
||||
|
@ -111,6 +106,11 @@ public class BoatController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSize(float f, float f1) {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -45,11 +45,6 @@ public class DragonFireballController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityDragonFireballNPC extends EntityDragonFireball implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityDragonFireballNPC(World world) {
|
||||
|
@ -114,6 +109,11 @@ public class DragonFireballController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSize(float f, float f1) {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -55,11 +55,6 @@ public class EggController extends AbstractEntityController {
|
|||
}
|
||||
|
||||
public static class EntityEggNPC extends EntityEgg implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityEggNPC(World world) {
|
||||
|
@ -128,5 +123,10 @@ public class EggController extends AbstractEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -44,11 +44,6 @@ public class EnderCrystalController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityEnderCrystalNPC extends EntityEnderCrystal implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityEnderCrystalNPC(World world) {
|
||||
|
@ -109,5 +104,10 @@ public class EnderCrystalController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -44,11 +44,6 @@ public class EnderPearlController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityEnderPearlNPC extends EntityEnderPearl implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityEnderPearlNPC(World world) {
|
||||
|
@ -112,5 +107,10 @@ public class EnderPearlController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -44,11 +44,6 @@ public class EnderSignalController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityEnderSignalNPC extends EntityEnderSignal implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityEnderSignalNPC(World world) {
|
||||
|
@ -109,5 +104,10 @@ public class EnderSignalController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -36,11 +36,6 @@ public class EvokerFangsController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityEvokerFangsNPC extends EntityEvokerFangs implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityEvokerFangsNPC(World world) {
|
||||
|
@ -111,6 +106,11 @@ public class EvokerFangsController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class EvokerFangsNPC extends CraftEvokerFangs implements NPCHolder {
|
||||
|
|
|
@ -30,11 +30,6 @@ public class ExperienceOrbController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityExperienceOrbNPC extends EntityExperienceOrb implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityExperienceOrbNPC(World world) {
|
||||
|
@ -95,6 +90,11 @@ public class ExperienceOrbController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class ExperienceOrbNPC extends CraftExperienceOrb implements NPCHolder {
|
||||
|
|
|
@ -48,11 +48,6 @@ public class FallingBlockController extends AbstractEntityController {
|
|||
}
|
||||
|
||||
public static class EntityFallingBlockNPC extends EntityFallingBlock implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityFallingBlockNPC(World world) {
|
||||
|
@ -125,6 +120,11 @@ public class FallingBlockController extends AbstractEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSize(float f, float f1) {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -30,11 +30,6 @@ public class FireworkController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityFireworkNPC extends EntityFireworks implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityFireworkNPC(World world) {
|
||||
|
@ -95,6 +90,11 @@ public class FireworkController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class FireworkNPC extends CraftFirework implements NPCHolder {
|
||||
|
|
|
@ -30,11 +30,6 @@ public class FishingHookController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityFishingHookNPC extends EntityFishingHook implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityFishingHookNPC(World world) {
|
||||
|
@ -95,6 +90,11 @@ public class FishingHookController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class FishingHookNPC extends CraftFish implements NPCHolder {
|
||||
|
|
|
@ -42,11 +42,6 @@ public class ItemController extends AbstractEntityController {
|
|||
}
|
||||
|
||||
public static class EntityItemNPC extends EntityItem implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityItemNPC(World world) {
|
||||
|
@ -115,6 +110,11 @@ public class ItemController extends AbstractEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class ItemNPC extends CraftItem implements NPCHolder {
|
||||
|
|
|
@ -43,11 +43,6 @@ public class ItemFrameController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityItemFrameNPC extends EntityItemFrame implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityItemFrameNPC(World world) {
|
||||
|
@ -109,6 +104,11 @@ public class ItemFrameController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean survives() {
|
||||
return npc == null || !npc.isProtected() ? super.survives() : true;
|
||||
|
|
|
@ -31,11 +31,6 @@ public class LargeFireballController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityLargeFireballNPC extends EntityLargeFireball implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityLargeFireballNPC(World world) {
|
||||
|
@ -100,6 +95,11 @@ public class LargeFireballController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSize(float f, float f1) {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -30,11 +30,6 @@ public class LeashController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityLeashNPC extends EntityLeash implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityLeashNPC(World world) {
|
||||
|
@ -96,6 +91,11 @@ public class LeashController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean survives() {
|
||||
return npc == null || !npc.isProtected() ? super.survives() : true;
|
||||
|
|
|
@ -43,11 +43,6 @@ public class LlamaSpitController extends AbstractEntityController {
|
|||
}
|
||||
|
||||
public static class EntityLlamaSpitNPC extends EntityLlamaSpit implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityLlamaSpitNPC(World world) {
|
||||
|
@ -116,6 +111,11 @@ public class LlamaSpitController extends AbstractEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class LlamaSpitNPC extends CraftLlamaSpit implements NPCHolder {
|
||||
|
|
|
@ -31,11 +31,6 @@ public class MinecartChestController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityMinecartChestNPC extends EntityMinecartChest implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityMinecartChestNPC(World world) {
|
||||
|
@ -96,6 +91,11 @@ public class MinecartChestController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class MinecartChestNPC extends CraftMinecartChest implements NPCHolder {
|
||||
|
|
|
@ -31,11 +31,6 @@ public class MinecartCommandController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityMinecartCommandNPC extends EntityMinecartCommandBlock implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityMinecartCommandNPC(World world) {
|
||||
|
@ -96,6 +91,11 @@ public class MinecartCommandController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class MinecartCommandNPC extends CraftMinecartCommand implements NPCHolder {
|
||||
|
|
|
@ -31,11 +31,6 @@ public class MinecartFurnaceController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityMinecartFurnaceNPC extends EntityMinecartFurnace implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityMinecartFurnaceNPC(World world) {
|
||||
|
@ -96,6 +91,11 @@ public class MinecartFurnaceController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class MinecartFurnaceNPC extends CraftMinecartFurnace implements NPCHolder {
|
||||
|
|
|
@ -27,11 +27,6 @@ public class MinecartHopperController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityMinecartHopperNPC extends EntityMinecartHopper implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityMinecartHopperNPC(World world) {
|
||||
|
@ -84,5 +79,10 @@ public class MinecartHopperController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,11 +31,6 @@ public class MinecartRideableController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityMinecartRideableNPC extends EntityMinecartRideable implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityMinecartRideableNPC(World world) {
|
||||
|
@ -96,6 +91,11 @@ public class MinecartRideableController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class MinecartRideableNPC extends CraftMinecartRideable implements NPCHolder {
|
||||
|
|
|
@ -27,11 +27,6 @@ public class MinecartSpawnerController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityMinecartSpawnerNPC extends EntityMinecartMobSpawner implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityMinecartSpawnerNPC(World world) {
|
||||
|
@ -84,5 +79,10 @@ public class MinecartSpawnerController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -27,11 +27,6 @@ public class MinecartTNTController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityMinecartTNTNPC extends EntityMinecartTNT implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityMinecartTNTNPC(World world) {
|
||||
|
@ -84,5 +79,10 @@ public class MinecartTNTController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -30,11 +30,6 @@ public class PaintingController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityPaintingNPC extends EntityPainting implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityPaintingNPC(World world) {
|
||||
|
@ -96,6 +91,11 @@ public class PaintingController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean survives() {
|
||||
return npc == null || !npc.isProtected() ? super.survives() : true;
|
||||
|
|
|
@ -30,11 +30,6 @@ public class ShulkerBulletController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityShulkerBulletNPC extends EntityShulkerBullet implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityShulkerBulletNPC(World world) {
|
||||
|
@ -95,6 +90,11 @@ public class ShulkerBulletController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class ShulkerBulletNPC extends CraftShulkerBullet implements NPCHolder {
|
||||
|
|
|
@ -30,11 +30,6 @@ public class SmallFireballController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntitySmallFireballNPC extends EntitySmallFireball implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntitySmallFireballNPC(World world) {
|
||||
|
@ -98,6 +93,11 @@ public class SmallFireballController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class SmallFireballNPC extends CraftSmallFireball implements NPCHolder {
|
||||
|
|
|
@ -30,11 +30,6 @@ public class SnowballController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntitySnowballNPC extends EntitySnowball implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntitySnowballNPC(World world) {
|
||||
|
@ -95,6 +90,11 @@ public class SnowballController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class SnowballNPC extends CraftSnowball implements NPCHolder {
|
||||
|
|
|
@ -30,11 +30,6 @@ public class SpectralArrowController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntitySpectralArrowNPC extends EntitySpectralArrow implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntitySpectralArrowNPC(World world) {
|
||||
|
@ -95,6 +90,11 @@ public class SpectralArrowController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class SpectralArrowNPC extends CraftArrow implements NPCHolder {
|
||||
|
|
|
@ -30,11 +30,6 @@ public class TNTPrimedController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityTNTPrimedNPC extends EntityTNTPrimed implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityTNTPrimedNPC(World world) {
|
||||
|
@ -95,6 +90,11 @@ public class TNTPrimedController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class TNTPrimedNPC extends CraftTNTPrimed implements NPCHolder {
|
||||
|
|
|
@ -30,11 +30,6 @@ public class ThrownExpBottleController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityThrownExpBottleNPC extends EntityThrownExpBottle implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityThrownExpBottleNPC(World world) {
|
||||
|
@ -98,6 +93,11 @@ public class ThrownExpBottleController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class ThrownExpBottleNPC extends CraftThrownExpBottle implements NPCHolder {
|
||||
|
|
|
@ -31,11 +31,6 @@ public class ThrownPotionController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityThrownPotionNPC extends EntityPotion implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityThrownPotionNPC(World world) {
|
||||
|
@ -100,6 +95,11 @@ public class ThrownPotionController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class LingeringThrownPotionNPC extends CraftLingeringPotion implements NPCHolder {
|
||||
|
|
|
@ -30,11 +30,6 @@ public class TippedArrowController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityTippedArrowNPC extends EntityTippedArrow implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityTippedArrowNPC(World world) {
|
||||
|
@ -95,6 +90,11 @@ public class TippedArrowController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class TippedArrowNPC extends CraftTippedArrow implements NPCHolder {
|
||||
|
|
|
@ -30,11 +30,6 @@ public class WitherSkullController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityWitherSkullNPC extends EntityWitherSkull implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityWitherSkullNPC(World world) {
|
||||
|
@ -95,6 +90,11 @@ public class WitherSkullController extends MobEntityController {
|
|||
public NPC getNPC() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
}
|
||||
|
||||
public static class WitherSkullNPC extends CraftWitherSkull implements NPCHolder {
|
||||
|
|
|
@ -51,11 +51,6 @@ public class ArmorStandController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityArmorStandNPC extends EntityArmorStand implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityArmorStandNPC(World world) {
|
||||
|
@ -136,6 +131,11 @@ public class ArmorStandController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
|
|
|
@ -52,11 +52,6 @@ public class BatController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityBatNPC extends EntityBat implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityBatNPC(World world) {
|
||||
|
@ -155,6 +150,11 @@ public class BatController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void I() {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -52,11 +52,6 @@ public class BlazeController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityBlazeNPC extends EntityBlaze implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityBlazeNPC(World world) {
|
||||
|
@ -152,6 +147,11 @@ public class BlazeController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void I() {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -54,11 +54,6 @@ public class CaveSpiderController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityCaveSpiderNPC extends EntityCaveSpider implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityCaveSpiderNPC(World world) {
|
||||
|
@ -177,6 +172,11 @@ public class CaveSpiderController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void I() {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -56,11 +56,6 @@ public class ChickenController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityChickenNPC extends EntityChicken implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityChickenNPC(World world) {
|
||||
|
@ -188,6 +183,11 @@ public class ChickenController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void I() {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -59,11 +59,6 @@ public class CodController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityCodNPC extends EntityCod implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityCodNPC(World world) {
|
||||
|
@ -196,6 +191,11 @@ public class CodController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void I() {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -58,11 +58,6 @@ public class CowController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityCowNPC extends EntityCow implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityCowNPC(World world) {
|
||||
|
@ -201,6 +196,11 @@ public class CowController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void I() {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -55,11 +55,6 @@ public class CreeperController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityCreeperNPC extends EntityCreeper implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private boolean allowPowered;
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
@ -186,6 +181,11 @@ public class CreeperController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void I() {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -55,11 +55,6 @@ public class DolphinController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityDolphinNPC extends EntityDolphin implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private boolean inProtectedTick;
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
@ -190,6 +185,11 @@ public class DolphinController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void I() {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -54,11 +54,6 @@ public class DrownedController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityDrownedNPC extends EntityDrowned implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityDrownedNPC(World world) {
|
||||
|
@ -175,6 +170,11 @@ public class DrownedController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void I() {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -59,11 +59,6 @@ public class EnderDragonController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityEnderDragonNPC extends EntityEnderDragon implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityEnderDragonNPC(World world) {
|
||||
|
@ -173,6 +168,11 @@ public class EnderDragonController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void I() {
|
||||
if (npc == null) {
|
||||
|
|
|
@ -54,11 +54,6 @@ public class EndermanController extends MobEntityController {
|
|||
}
|
||||
|
||||
public static class EntityEndermanNPC extends EntityEnderman implements NPCHolder {
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
private final CitizensNPC npc;
|
||||
|
||||
public EntityEndermanNPC(World world) {
|
||||
|
@ -176,6 +171,11 @@ public class EndermanController extends MobEntityController {
|
|||
return npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPistonReaction getPushReaction() {
|
||||
return Util.callPistonPushEvent(npc) ? EnumPistonReaction.IGNORE : super.getPushReaction();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void I() {
|
||||
if (npc == null) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue