mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-09-29 07:37:46 +02:00
Cleanup
This commit is contained in:
parent
d7ce79fe85
commit
b28348ec52
@ -53,7 +53,6 @@ public class BatController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
setFlying(false);
|
setFlying(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,9 +52,6 @@ public class BlazeController extends MobEntityController {
|
|||||||
public EntityBlazeNPC(World world, NPC npc) {
|
public EntityBlazeNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,9 +54,6 @@ public class CaveSpiderController extends MobEntityController {
|
|||||||
public EntityCaveSpiderNPC(World world, NPC npc) {
|
public EntityCaveSpiderNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,9 +54,6 @@ public class ChickenController extends MobEntityController {
|
|||||||
public EntityChickenNPC(World world, NPC npc) {
|
public EntityChickenNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,10 +58,6 @@ public class CowController extends MobEntityController {
|
|||||||
public EntityCowNPC(World world, NPC npc) {
|
public EntityCowNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -59,9 +59,6 @@ public class CreeperController extends MobEntityController {
|
|||||||
public EntityCreeperNPC(World world, NPC npc) {
|
public EntityCreeperNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -52,9 +52,6 @@ public class EnderDragonController extends MobEntityController {
|
|||||||
public EntityEnderDragonNPC(World world, NPC npc) {
|
public EntityEnderDragonNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,9 +54,6 @@ public class EndermanController extends MobEntityController {
|
|||||||
public EntityEndermanNPC(World world, NPC npc) {
|
public EntityEndermanNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,9 +54,6 @@ public class EndermiteController extends MobEntityController {
|
|||||||
public EntityEndermiteNPC(World world, NPC npc) {
|
public EntityEndermiteNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -38,9 +38,6 @@ public class GhastController extends MobEntityController {
|
|||||||
public EntityGhastNPC(World world, NPC npc) {
|
public EntityGhastNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class GiantController extends MobEntityController {
|
|||||||
public EntityGiantNPC(World world, NPC npc) {
|
public EntityGiantNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class GuardianController extends MobEntityController {
|
|||||||
public EntityGuardianNPC(World world, NPC npc) {
|
public EntityGuardianNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -50,7 +50,6 @@ public class HorseController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
((Horse) getBukkitEntity()).setDomestication(((Horse) getBukkitEntity()).getMaxDomestication());
|
((Horse) getBukkitEntity()).setDomestication(((Horse) getBukkitEntity()).getMaxDomestication());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,9 +40,6 @@ public class IronGolemController extends MobEntityController {
|
|||||||
public EntityIronGolemNPC(World world, NPC npc) {
|
public EntityIronGolemNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -44,7 +44,6 @@ public class MagmaCubeController extends MobEntityController {
|
|||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
setSize(3);
|
setSize(3);
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
this.moveController = new PlayerControllerMove(this);
|
this.moveController = new PlayerControllerMove(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,11 @@ import org.bukkit.entity.Entity;
|
|||||||
|
|
||||||
import net.citizensnpcs.Settings.Setting;
|
import net.citizensnpcs.Settings.Setting;
|
||||||
import net.citizensnpcs.api.npc.NPC;
|
import net.citizensnpcs.api.npc.NPC;
|
||||||
|
import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl;
|
||||||
import net.citizensnpcs.npc.AbstractEntityController;
|
import net.citizensnpcs.npc.AbstractEntityController;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
|
import net.minecraft.server.v1_10_R1.EntityInsentient;
|
||||||
import net.minecraft.server.v1_10_R1.World;
|
import net.minecraft.server.v1_10_R1.World;
|
||||||
|
|
||||||
public abstract class MobEntityController extends AbstractEntityController {
|
public abstract class MobEntityController extends AbstractEntityController {
|
||||||
@ -29,6 +31,9 @@ public abstract class MobEntityController extends AbstractEntityController {
|
|||||||
protected Entity createEntity(Location at, NPC npc) {
|
protected Entity createEntity(Location at, NPC npc) {
|
||||||
net.minecraft.server.v1_10_R1.Entity entity = createEntityFromClass(((CraftWorld) at.getWorld()).getHandle(),
|
net.minecraft.server.v1_10_R1.Entity entity = createEntityFromClass(((CraftWorld) at.getWorld()).getHandle(),
|
||||||
npc);
|
npc);
|
||||||
|
if (entity instanceof EntityInsentient) {
|
||||||
|
NMSImpl.clearGoals(((EntityInsentient) entity).goalSelector, ((EntityInsentient) entity).targetSelector);
|
||||||
|
}
|
||||||
entity.setPositionRotation(at.getX(), at.getY(), at.getZ(), at.getYaw(), at.getPitch());
|
entity.setPositionRotation(at.getX(), at.getY(), at.getZ(), at.getYaw(), at.getPitch());
|
||||||
|
|
||||||
// entity.onGround isn't updated right away - we approximate here so
|
// entity.onGround isn't updated right away - we approximate here so
|
||||||
|
@ -44,9 +44,6 @@ public class MushroomCowController extends MobEntityController {
|
|||||||
public EntityMushroomCowNPC(World world, NPC npc) {
|
public EntityMushroomCowNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class OcelotController extends MobEntityController {
|
|||||||
public EntityOcelotNPC(World world, NPC npc) {
|
public EntityOcelotNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,9 +41,6 @@ public class PigController extends MobEntityController {
|
|||||||
public EntityPigNPC(World world, NPC npc) {
|
public EntityPigNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,9 +41,6 @@ public class PigZombieController extends MobEntityController {
|
|||||||
public EntityPigZombieNPC(World world, NPC npc) {
|
public EntityPigZombieNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -38,9 +38,6 @@ public class PolarBearController extends MobEntityController {
|
|||||||
public EntityPolarBearNPC(World world, NPC npc) {
|
public EntityPolarBearNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,9 +41,6 @@ public class RabbitController extends MobEntityController {
|
|||||||
public EntityRabbitNPC(World world, NPC npc) {
|
public EntityRabbitNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class SheepController extends MobEntityController {
|
|||||||
public EntitySheepNPC(World world, NPC npc) {
|
public EntitySheepNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,9 +41,6 @@ public class ShulkerController extends MobEntityController {
|
|||||||
public EntityShulkerNPC(World world, NPC npc) {
|
public EntityShulkerNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class SilverfishController extends MobEntityController {
|
|||||||
public EntitySilverfishNPC(World world, NPC npc) {
|
public EntitySilverfishNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class SkeletonController extends MobEntityController {
|
|||||||
public EntitySkeletonNPC(World world, NPC npc) {
|
public EntitySkeletonNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -44,7 +44,6 @@ public class SlimeController extends MobEntityController {
|
|||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
setSize(3);
|
setSize(3);
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
this.moveController = new PlayerControllerMove(this);
|
this.moveController = new PlayerControllerMove(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,9 +40,6 @@ public class SnowmanController extends MobEntityController {
|
|||||||
public EntitySnowmanNPC(World world, NPC npc) {
|
public EntitySnowmanNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class SpiderController extends MobEntityController {
|
|||||||
public EntitySpiderNPC(World world, NPC npc) {
|
public EntitySpiderNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class SquidController extends MobEntityController {
|
|||||||
public EntitySquidNPC(World world, NPC npc) {
|
public EntitySquidNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -45,9 +45,6 @@ public class VillagerController extends MobEntityController {
|
|||||||
public EntityVillagerNPC(World world, NPC npc) {
|
public EntityVillagerNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class WitchController extends MobEntityController {
|
|||||||
public EntityWitchNPC(World world, NPC npc) {
|
public EntityWitchNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -38,9 +38,6 @@ public class WitherController extends MobEntityController {
|
|||||||
public EntityWitherNPC(World world, NPC npc) {
|
public EntityWitherNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -42,9 +42,6 @@ public class WolfController extends MobEntityController {
|
|||||||
public EntityWolfNPC(World world, NPC npc) {
|
public EntityWolfNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class ZombieController extends MobEntityController {
|
|||||||
public EntityZombieNPC(World world, NPC npc) {
|
public EntityZombieNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,7 +53,6 @@ public class BatController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
setFlying(false);
|
setFlying(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,9 +52,6 @@ public class BlazeController extends MobEntityController {
|
|||||||
public EntityBlazeNPC(World world, NPC npc) {
|
public EntityBlazeNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,9 +54,6 @@ public class CaveSpiderController extends MobEntityController {
|
|||||||
public EntityCaveSpiderNPC(World world, NPC npc) {
|
public EntityCaveSpiderNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,9 +54,6 @@ public class ChickenController extends MobEntityController {
|
|||||||
public EntityChickenNPC(World world, NPC npc) {
|
public EntityChickenNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,10 +58,6 @@ public class CowController extends MobEntityController {
|
|||||||
public EntityCowNPC(World world, NPC npc) {
|
public EntityCowNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -56,9 +56,6 @@ public class CreeperController extends MobEntityController {
|
|||||||
public EntityCreeperNPC(World world, NPC npc) {
|
public EntityCreeperNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -52,9 +52,6 @@ public class EnderDragonController extends MobEntityController {
|
|||||||
public EntityEnderDragonNPC(World world, NPC npc) {
|
public EntityEnderDragonNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,9 +54,6 @@ public class EndermanController extends MobEntityController {
|
|||||||
public EntityEndermanNPC(World world, NPC npc) {
|
public EntityEndermanNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,9 +54,6 @@ public class EndermiteController extends MobEntityController {
|
|||||||
public EntityEndermiteNPC(World world, NPC npc) {
|
public EntityEndermiteNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class EvokerController extends MobEntityController {
|
|||||||
public EntityEvokerNPC(World world, NPC npc) {
|
public EntityEvokerNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -38,9 +38,6 @@ public class GhastController extends MobEntityController {
|
|||||||
public EntityGhastNPC(World world, NPC npc) {
|
public EntityGhastNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class GiantController extends MobEntityController {
|
|||||||
public EntityGiantNPC(World world, NPC npc) {
|
public EntityGiantNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class GuardianController extends MobEntityController {
|
|||||||
public EntityGuardianNPC(World world, NPC npc) {
|
public EntityGuardianNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class GuardianElderController extends MobEntityController {
|
|||||||
public EntityGuardianElderNPC(World world, NPC npc) {
|
public EntityGuardianElderNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -50,7 +50,6 @@ public class HorseController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
((Horse) getBukkitEntity()).setDomestication(((Horse) getBukkitEntity()).getMaxDomestication());
|
((Horse) getBukkitEntity()).setDomestication(((Horse) getBukkitEntity()).getMaxDomestication());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@ public class HorseDonkeyController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
((Donkey) getBukkitEntity()).setDomestication(((Donkey) getBukkitEntity()).getMaxDomestication());
|
((Donkey) getBukkitEntity()).setDomestication(((Donkey) getBukkitEntity()).getMaxDomestication());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@ public class HorseMuleController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
((Mule) getBukkitEntity()).setDomestication(((Mule) getBukkitEntity()).getMaxDomestication());
|
((Mule) getBukkitEntity()).setDomestication(((Mule) getBukkitEntity()).getMaxDomestication());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@ public class HorseSkeletonController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
((SkeletonHorse) getBukkitEntity())
|
((SkeletonHorse) getBukkitEntity())
|
||||||
.setDomestication(((SkeletonHorse) getBukkitEntity()).getMaxDomestication());
|
.setDomestication(((SkeletonHorse) getBukkitEntity()).getMaxDomestication());
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@ public class HorseZombieController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
((ZombieHorse) getBukkitEntity())
|
((ZombieHorse) getBukkitEntity())
|
||||||
.setDomestication(((ZombieHorse) getBukkitEntity()).getMaxDomestication());
|
.setDomestication(((ZombieHorse) getBukkitEntity()).getMaxDomestication());
|
||||||
}
|
}
|
||||||
|
@ -40,9 +40,6 @@ public class IronGolemController extends MobEntityController {
|
|||||||
public EntityIronGolemNPC(World world, NPC npc) {
|
public EntityIronGolemNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -50,7 +50,6 @@ public class LlamaController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
((Llama) getBukkitEntity()).setDomestication(((Llama) getBukkitEntity()).getMaxDomestication());
|
((Llama) getBukkitEntity()).setDomestication(((Llama) getBukkitEntity()).getMaxDomestication());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,6 @@ public class MagmaCubeController extends MobEntityController {
|
|||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
setSize(3, true);
|
setSize(3, true);
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
this.moveController = new PlayerControllerMove(this);
|
this.moveController = new PlayerControllerMove(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,11 @@ import org.bukkit.entity.Entity;
|
|||||||
|
|
||||||
import net.citizensnpcs.Settings.Setting;
|
import net.citizensnpcs.Settings.Setting;
|
||||||
import net.citizensnpcs.api.npc.NPC;
|
import net.citizensnpcs.api.npc.NPC;
|
||||||
|
import net.citizensnpcs.nms.v1_11_R1.util.NMSImpl;
|
||||||
import net.citizensnpcs.npc.AbstractEntityController;
|
import net.citizensnpcs.npc.AbstractEntityController;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.Util;
|
import net.citizensnpcs.util.Util;
|
||||||
|
import net.minecraft.server.v1_11_R1.EntityInsentient;
|
||||||
import net.minecraft.server.v1_11_R1.World;
|
import net.minecraft.server.v1_11_R1.World;
|
||||||
|
|
||||||
public abstract class MobEntityController extends AbstractEntityController {
|
public abstract class MobEntityController extends AbstractEntityController {
|
||||||
@ -29,6 +31,9 @@ public abstract class MobEntityController extends AbstractEntityController {
|
|||||||
protected Entity createEntity(Location at, NPC npc) {
|
protected Entity createEntity(Location at, NPC npc) {
|
||||||
net.minecraft.server.v1_11_R1.Entity entity = createEntityFromClass(((CraftWorld) at.getWorld()).getHandle(),
|
net.minecraft.server.v1_11_R1.Entity entity = createEntityFromClass(((CraftWorld) at.getWorld()).getHandle(),
|
||||||
npc);
|
npc);
|
||||||
|
if (entity instanceof EntityInsentient) {
|
||||||
|
NMSImpl.clearGoals(((EntityInsentient) entity).goalSelector, ((EntityInsentient) entity).targetSelector);
|
||||||
|
}
|
||||||
entity.setPositionRotation(at.getX(), at.getY(), at.getZ(), at.getYaw(), at.getPitch());
|
entity.setPositionRotation(at.getX(), at.getY(), at.getZ(), at.getYaw(), at.getPitch());
|
||||||
|
|
||||||
// entity.onGround isn't updated right away - we approximate here so
|
// entity.onGround isn't updated right away - we approximate here so
|
||||||
|
@ -43,9 +43,6 @@ public class MushroomCowController extends MobEntityController {
|
|||||||
public EntityMushroomCowNPC(World world, NPC npc) {
|
public EntityMushroomCowNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class OcelotController extends MobEntityController {
|
|||||||
public EntityOcelotNPC(World world, NPC npc) {
|
public EntityOcelotNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,9 +41,6 @@ public class PigController extends MobEntityController {
|
|||||||
public EntityPigNPC(World world, NPC npc) {
|
public EntityPigNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,9 +41,6 @@ public class PigZombieController extends MobEntityController {
|
|||||||
public EntityPigZombieNPC(World world, NPC npc) {
|
public EntityPigZombieNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -38,9 +38,6 @@ public class PolarBearController extends MobEntityController {
|
|||||||
public EntityPolarBearNPC(World world, NPC npc) {
|
public EntityPolarBearNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,9 +41,6 @@ public class RabbitController extends MobEntityController {
|
|||||||
public EntityRabbitNPC(World world, NPC npc) {
|
public EntityRabbitNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class SheepController extends MobEntityController {
|
|||||||
public EntitySheepNPC(World world, NPC npc) {
|
public EntitySheepNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -42,9 +42,6 @@ public class ShulkerController extends MobEntityController {
|
|||||||
public EntityShulkerNPC(World world, NPC npc) {
|
public EntityShulkerNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class SilverfishController extends MobEntityController {
|
|||||||
public EntitySilverfishNPC(World world, NPC npc) {
|
public EntitySilverfishNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class SkeletonController extends MobEntityController {
|
|||||||
public EntitySkeletonNPC(World world, NPC npc) {
|
public EntitySkeletonNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class SkeletonStrayController extends MobEntityController {
|
|||||||
public EntityStrayNPC(World world, NPC npc) {
|
public EntityStrayNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class SkeletonWitherController extends MobEntityController {
|
|||||||
public EntitySkeletonWitherNPC(World world, NPC npc) {
|
public EntitySkeletonWitherNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -44,7 +44,6 @@ public class SlimeController extends MobEntityController {
|
|||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
setSize(3, true);
|
setSize(3, true);
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
this.moveController = new PlayerControllerMove(this);
|
this.moveController = new PlayerControllerMove(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,9 +40,6 @@ public class SnowmanController extends MobEntityController {
|
|||||||
public EntitySnowmanNPC(World world, NPC npc) {
|
public EntitySnowmanNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class SpiderController extends MobEntityController {
|
|||||||
public EntitySpiderNPC(World world, NPC npc) {
|
public EntitySpiderNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class SquidController extends MobEntityController {
|
|||||||
public EntitySquidNPC(World world, NPC npc) {
|
public EntitySquidNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -39,7 +39,6 @@ public class VexController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
setNoGravity(true);
|
setNoGravity(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,9 +47,6 @@ public class VillagerController extends MobEntityController {
|
|||||||
public EntityVillagerNPC(World world, NPC npc) {
|
public EntityVillagerNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class VindicatorController extends MobEntityController {
|
|||||||
public EntityVindicatorNPC(World world, NPC npc) {
|
public EntityVindicatorNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class WitchController extends MobEntityController {
|
|||||||
public EntityWitchNPC(World world, NPC npc) {
|
public EntityWitchNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -38,9 +38,6 @@ public class WitherController extends MobEntityController {
|
|||||||
public EntityWitherNPC(World world, NPC npc) {
|
public EntityWitherNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -42,9 +42,6 @@ public class WolfController extends MobEntityController {
|
|||||||
public EntityWolfNPC(World world, NPC npc) {
|
public EntityWolfNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class ZombieController extends MobEntityController {
|
|||||||
public EntityZombieNPC(World world, NPC npc) {
|
public EntityZombieNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class ZombieHuskController extends MobEntityController {
|
|||||||
public EntityZombieHuskNPC(World world, NPC npc) {
|
public EntityZombieHuskNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,9 +40,6 @@ public class ZombieVillagerController extends MobEntityController {
|
|||||||
public EntityZombieVillagerNPC(World world, NPC npc) {
|
public EntityZombieVillagerNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,7 +54,6 @@ public class BatController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
setFlying(false);
|
setFlying(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,9 +53,6 @@ public class BlazeController extends MobEntityController {
|
|||||||
public EntityBlazeNPC(World world, NPC npc) {
|
public EntityBlazeNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,9 +55,6 @@ public class CaveSpiderController extends MobEntityController {
|
|||||||
public EntityCaveSpiderNPC(World world, NPC npc) {
|
public EntityCaveSpiderNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,9 +55,6 @@ public class ChickenController extends MobEntityController {
|
|||||||
public EntityChickenNPC(World world, NPC npc) {
|
public EntityChickenNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -59,10 +59,6 @@ public class CowController extends MobEntityController {
|
|||||||
public EntityCowNPC(World world, NPC npc) {
|
public EntityCowNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,9 +57,6 @@ public class CreeperController extends MobEntityController {
|
|||||||
public EntityCreeperNPC(World world, NPC npc) {
|
public EntityCreeperNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,9 +53,6 @@ public class EnderDragonController extends MobEntityController {
|
|||||||
public EntityEnderDragonNPC(World world, NPC npc) {
|
public EntityEnderDragonNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,9 +55,6 @@ public class EndermanController extends MobEntityController {
|
|||||||
public EntityEndermanNPC(World world, NPC npc) {
|
public EntityEndermanNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,9 +55,6 @@ public class EndermiteController extends MobEntityController {
|
|||||||
public EntityEndermiteNPC(World world, NPC npc) {
|
public EntityEndermiteNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,9 +41,6 @@ public class EvokerController extends MobEntityController {
|
|||||||
public EntityEvokerNPC(World world, NPC npc) {
|
public EntityEvokerNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -39,9 +39,6 @@ public class GhastController extends MobEntityController {
|
|||||||
public EntityGhastNPC(World world, NPC npc) {
|
public EntityGhastNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,9 +41,6 @@ public class GiantController extends MobEntityController {
|
|||||||
public EntityGiantNPC(World world, NPC npc) {
|
public EntityGiantNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,9 +41,6 @@ public class GuardianController extends MobEntityController {
|
|||||||
public EntityGuardianNPC(World world, NPC npc) {
|
public EntityGuardianNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,9 +41,6 @@ public class GuardianElderController extends MobEntityController {
|
|||||||
public EntityGuardianElderNPC(World world, NPC npc) {
|
public EntityGuardianElderNPC(World world, NPC npc) {
|
||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,7 +55,6 @@ public class HorseController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
((Horse) getBukkitEntity()).setDomestication(((Horse) getBukkitEntity()).getMaxDomestication());
|
((Horse) getBukkitEntity()).setDomestication(((Horse) getBukkitEntity()).getMaxDomestication());
|
||||||
baseMovementSpeed = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue();
|
baseMovementSpeed = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue();
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,6 @@ public class HorseDonkeyController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
((Donkey) getBukkitEntity()).setDomestication(((Donkey) getBukkitEntity()).getMaxDomestication());
|
((Donkey) getBukkitEntity()).setDomestication(((Donkey) getBukkitEntity()).getMaxDomestication());
|
||||||
baseMovementSpeed = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue();
|
baseMovementSpeed = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue();
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,6 @@ public class HorseMuleController extends MobEntityController {
|
|||||||
super(world);
|
super(world);
|
||||||
this.npc = (CitizensNPC) npc;
|
this.npc = (CitizensNPC) npc;
|
||||||
if (npc != null) {
|
if (npc != null) {
|
||||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
|
||||||
((Mule) getBukkitEntity()).setDomestication(((Mule) getBukkitEntity()).getMaxDomestication());
|
((Mule) getBukkitEntity()).setDomestication(((Mule) getBukkitEntity()).getMaxDomestication());
|
||||||
baseMovementSpeed = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue();
|
baseMovementSpeed = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue();
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user