mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-23 19:16:34 +01:00
Fix monsters despawning when an NPC of the same type is spawned
This commit is contained in:
parent
b10299a742
commit
07b6c24f1d
@ -38,8 +38,9 @@ public class EquipmentEditor extends Editor {
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
if (event.getAction() == Action.RIGHT_CLICK_AIR && Editor.hasEditor(event.getPlayer()))
|
||||
if (event.getAction() == Action.RIGHT_CLICK_AIR && Editor.hasEditor(event.getPlayer())) {
|
||||
event.setUseItemInHand(Result.DENY);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityBat;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -65,7 +66,8 @@ public class BatController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String aU() {
|
||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.aU() : npc.data().get(NPC.DEATH_SOUND_METADATA, super.aU());
|
||||
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.aU() : npc.data().get(
|
||||
NPC.DEATH_SOUND_METADATA, super.aU());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -101,6 +103,11 @@ public class BatController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void g(double x, double y, double z) {
|
||||
if (npc == null) {
|
||||
@ -149,7 +156,8 @@ public class BatController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityBlaze;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -99,6 +100,11 @@ public class BlazeController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void g(double x, double y, double z) {
|
||||
if (npc == null) {
|
||||
@ -135,7 +141,8 @@ public class BlazeController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityCaveSpider;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -80,6 +81,14 @@ public class CaveSpiderController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null) {
|
||||
@ -95,14 +104,6 @@ public class CaveSpiderController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bq() {
|
||||
if (npc == null) {
|
||||
@ -123,6 +124,11 @@ public class CaveSpiderController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -177,7 +183,8 @@ public class CaveSpiderController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityChicken;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -91,6 +92,13 @@ public class ChickenController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -104,13 +112,6 @@ public class ChickenController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -120,6 +121,11 @@ public class ChickenController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -174,7 +180,8 @@ public class ChickenController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityCow;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -92,6 +93,14 @@ public class CowController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -105,14 +114,6 @@ public class CowController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -123,6 +124,11 @@ public class CowController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -177,7 +183,8 @@ public class CowController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -9,6 +9,7 @@ import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityCreeper;
|
||||
import net.minecraft.server.v1_7_R4.EntityLightning;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -88,6 +89,14 @@ public class CreeperController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -101,14 +110,6 @@ public class CreeperController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -118,6 +119,11 @@ public class CreeperController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -176,7 +182,8 @@ public class CreeperController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityEnderDragon;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -95,6 +96,11 @@ public class EnderDragonController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e() {
|
||||
if (npc != null) {
|
||||
@ -156,7 +162,8 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityEnderman;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -120,6 +121,11 @@ public class EndermanController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e() {
|
||||
if (npc == null)
|
||||
@ -192,7 +198,8 @@ public class EndermanController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
private void updateAIWithMovement() {
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityGhast;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -82,6 +83,11 @@ public class GhastController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void g(double x, double y, double z) {
|
||||
if (npc == null) {
|
||||
@ -118,7 +124,8 @@ public class GhastController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityGiantZombie;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -98,6 +99,11 @@ public class GiantController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -152,7 +158,8 @@ public class GiantController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -9,6 +9,7 @@ import net.citizensnpcs.trait.HorseModifiers;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityHorse;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -110,6 +111,11 @@ public class HorseController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e() {
|
||||
if (npc == null) {
|
||||
@ -175,7 +181,8 @@ public class HorseController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
private void updateAIWithMovement() {
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityIronGolem;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -66,6 +67,13 @@ public class IronGolemController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -79,13 +87,6 @@ public class IronGolemController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -95,6 +96,11 @@ public class IronGolemController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -149,7 +155,8 @@ public class IronGolemController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityMagmaCube;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -67,6 +68,13 @@ public class MagmaCubeController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -80,13 +88,6 @@ public class MagmaCubeController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bq() {
|
||||
if (npc == null)
|
||||
@ -106,6 +107,11 @@ public class MagmaCubeController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -160,7 +166,8 @@ public class MagmaCubeController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityMushroomCow;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -78,6 +79,13 @@ public class MushroomCowController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -91,13 +99,6 @@ public class MushroomCowController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -107,6 +108,11 @@ public class MushroomCowController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -161,7 +167,8 @@ public class MushroomCowController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityOcelot;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -77,6 +78,13 @@ public class OcelotController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -90,13 +98,6 @@ public class OcelotController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -106,6 +107,11 @@ public class OcelotController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -160,7 +166,8 @@ public class OcelotController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -9,6 +9,7 @@ import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityLightning;
|
||||
import net.minecraft.server.v1_7_R4.EntityPig;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -63,8 +64,9 @@ public class PigController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void a(EntityLightning entitylightning) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.a(entitylightning);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -84,6 +86,13 @@ public class PigController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -97,20 +106,19 @@ public class PigController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
// it will not stop the NPC from moving.
|
||||
super.collide(entity);
|
||||
if (npc != null)
|
||||
if (npc != null) {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -167,7 +175,8 @@ public class PigController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityPigZombie;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -67,6 +68,13 @@ public class PigZombieController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -80,13 +88,6 @@ public class PigZombieController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bq() {
|
||||
if (npc == null) {
|
||||
@ -106,6 +107,11 @@ public class PigZombieController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -160,7 +166,8 @@ public class PigZombieController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntitySheep;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -77,6 +78,13 @@ public class SheepController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -90,13 +98,6 @@ public class SheepController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -106,6 +107,11 @@ public class SheepController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -160,7 +166,8 @@ public class SheepController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntitySilverfish;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -66,6 +67,13 @@ public class SilverfishController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -79,13 +87,6 @@ public class SilverfishController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bq() {
|
||||
if (npc == null) {
|
||||
@ -105,6 +106,11 @@ public class SilverfishController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -159,7 +165,8 @@ public class SilverfishController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntitySkeleton;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -96,6 +97,11 @@ public class SkeletonController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -150,7 +156,8 @@ public class SkeletonController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntitySlime;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -68,6 +69,13 @@ public class SlimeController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -81,13 +89,6 @@ public class SlimeController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bq() {
|
||||
if (npc == null) {
|
||||
@ -107,6 +108,11 @@ public class SlimeController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -161,7 +167,8 @@ public class SlimeController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntitySnowman;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -66,6 +67,13 @@ public class SnowmanController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -79,13 +87,6 @@ public class SnowmanController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -95,6 +96,11 @@ public class SnowmanController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -149,7 +155,8 @@ public class SnowmanController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntitySpider;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -66,6 +67,13 @@ public class SpiderController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -79,13 +87,6 @@ public class SpiderController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bq() {
|
||||
if (npc == null)
|
||||
@ -105,6 +106,11 @@ public class SpiderController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -159,7 +165,8 @@ public class SpiderController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntitySquid;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -96,6 +97,11 @@ public class SquidController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -150,7 +156,8 @@ public class SquidController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -9,6 +9,7 @@ import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityHuman;
|
||||
import net.minecraft.server.v1_7_R4.EntityVillager;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -85,6 +86,14 @@ public class VillagerController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -98,14 +107,6 @@ public class VillagerController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -116,6 +117,11 @@ public class VillagerController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -178,7 +184,8 @@ public class VillagerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityWitch;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -66,6 +67,13 @@ public class WitchController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -79,13 +87,6 @@ public class WitchController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null)
|
||||
npc.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -95,6 +96,11 @@ public class WitchController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -149,7 +155,8 @@ public class WitchController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityWither;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -83,6 +84,11 @@ public class WitherController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e() {
|
||||
if (npc == null) {
|
||||
@ -128,7 +134,8 @@ public class WitherController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
private void updateAIWithMovement() {
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityWolf;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -77,6 +78,14 @@ public class WolfController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -90,14 +99,6 @@ public class WolfController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -108,6 +109,11 @@ public class WolfController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -162,7 +168,8 @@ public class WolfController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityZombie;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -66,6 +67,14 @@ public class ZombieController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bN() {
|
||||
if (npc == null)
|
||||
@ -79,14 +88,6 @@ public class ZombieController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bn() {
|
||||
super.bn();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -96,6 +97,11 @@ public class ZombieController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(float f, float f1) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
@ -150,7 +156,8 @@ public class ZombieController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String t() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.t() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.t());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityArrow;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -47,6 +48,11 @@ public class ArrowController extends MobEntityController {
|
||||
this(world, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
public EntityArrowNPC(World world, NPC npc) {
|
||||
super(world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityBoat;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -47,6 +48,11 @@ public class BoatController extends MobEntityController {
|
||||
this(world, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
public EntityBoatNPC(World world, NPC npc) {
|
||||
super(world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityEgg;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
import net.minecraft.server.v1_7_R4.WorldServer;
|
||||
|
||||
@ -63,6 +64,11 @@ public class EggController extends AbstractEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
public EntityEggNPC(World world, NPC npc, double d0, double d1, double d2) {
|
||||
super(world, d0, d1, d2);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityEnderCrystal;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -47,6 +48,11 @@ public class EnderCrystalController extends MobEntityController {
|
||||
this(world, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
public EntityEnderCrystalNPC(World world, NPC npc) {
|
||||
super(world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityEnderPearl;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -47,6 +48,11 @@ public class EnderPearlController extends MobEntityController {
|
||||
this(world, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
public EntityEnderPearlNPC(World world, NPC npc) {
|
||||
super(world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityEnderSignal;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -47,6 +48,11 @@ public class EnderSignalController extends MobEntityController {
|
||||
this(world, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
public EntityEnderSignalNPC(World world, NPC npc) {
|
||||
super(world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityExperienceOrb;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -48,6 +49,11 @@ public class ExperienceOrbController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void g(double x, double y, double z) {
|
||||
if (npc == null) {
|
||||
|
@ -9,6 +9,7 @@ import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.Block;
|
||||
import net.minecraft.server.v1_7_R4.Blocks;
|
||||
import net.minecraft.server.v1_7_R4.EntityFallingBlock;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
import net.minecraft.server.v1_7_R4.WorldServer;
|
||||
|
||||
@ -65,6 +66,11 @@ public class FallingBlockController extends AbstractEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityFireworks;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -38,6 +39,11 @@ public class FireworkController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityFishingHook;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -38,6 +39,11 @@ public class FishingHookController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -9,6 +9,7 @@ import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityHuman;
|
||||
import net.minecraft.server.v1_7_R4.EntityItem;
|
||||
import net.minecraft.server.v1_7_R4.ItemStack;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
import net.minecraft.server.v1_7_R4.WorldServer;
|
||||
|
||||
@ -50,6 +51,11 @@ public class ItemController extends AbstractEntityController {
|
||||
public static class EntityItemNPC extends EntityItem implements NPCHolder {
|
||||
private final CitizensNPC npc;
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
public EntityItemNPC(World world) {
|
||||
super(world);
|
||||
this.npc = null;
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityItemFrame;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -42,6 +43,11 @@ public class ItemFrameController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityLargeFireball;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -38,6 +39,11 @@ public class LargeFireballController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityLeash;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -48,6 +49,11 @@ public class LeashController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void g(double x, double y, double z) {
|
||||
if (npc == null) {
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityMinecartChest;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -49,6 +50,11 @@ public class MinecartChestController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void g(double x, double y, double z) {
|
||||
if (npc == null) {
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityMinecartCommandBlock;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -39,6 +40,11 @@ public class MinecartCommandController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityMinecartFurnace;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -39,6 +40,11 @@ public class MinecartFurnaceController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityMinecartHopper;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.entity.Minecart;
|
||||
@ -35,6 +36,11 @@ public class MinecartHopperController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityMinecartRideable;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -39,6 +40,11 @@ public class MinecartRideableController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityMinecartMobSpawner;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.entity.Minecart;
|
||||
@ -35,6 +36,11 @@ public class MinecartSpawnerController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -8,6 +8,7 @@ import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityMinecartTNT;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.entity.Minecart;
|
||||
@ -35,6 +36,11 @@ public class MinecartTNTController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityPainting;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -38,6 +39,11 @@ public class PaintingController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntitySmallFireball;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -33,6 +34,11 @@ public class SmallFireballController extends MobEntityController {
|
||||
this(world, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
public EntitySmallFireballNPC(World world, NPC npc) {
|
||||
super(world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
|
@ -7,12 +7,13 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntitySnowball;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftSnowball;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftSnowball;
|
||||
import org.bukkit.entity.Snowball;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -47,6 +48,11 @@ public class SnowballController extends MobEntityController {
|
||||
this(world, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
public EntitySnowballNPC(World world, NPC npc) {
|
||||
super(world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityTNTPrimed;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -33,6 +34,11 @@ public class TNTPrimedController extends MobEntityController {
|
||||
this(world, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
public EntityTNTPrimedNPC(World world, NPC npc) {
|
||||
super(world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityThrownExpBottle;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -38,6 +39,11 @@ public class ThrownExpBottleController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_7_R4.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityPotion;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -33,6 +34,11 @@ public class ThrownPotionController extends MobEntityController {
|
||||
this(world, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
public EntityThrownPotionNPC(World world, NPC npc) {
|
||||
super(world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
|
@ -7,6 +7,7 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_7_R4.EntityWitherSkull;
|
||||
import net.minecraft.server.v1_7_R4.NBTTagCompound;
|
||||
import net.minecraft.server.v1_7_R4.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -33,6 +34,11 @@ public class WitherSkullController extends MobEntityController {
|
||||
this(world, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
}
|
||||
|
||||
public EntityWitherSkullNPC(World world, NPC npc) {
|
||||
super(world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
|
@ -345,6 +345,7 @@ public class NMS {
|
||||
int code = ENTITY_CLASS_TO_INT.get(search);
|
||||
ENTITY_INT_TO_CLASS.put(code, clazz);
|
||||
ENTITY_CLASS_TO_INT.put(clazz, code);
|
||||
ENTITY_CLASS_TO_NAME.put(clazz, ENTITY_CLASS_TO_NAME.get(search));
|
||||
return;
|
||||
}
|
||||
throw new IllegalArgumentException("unable to find valid entity superclass");
|
||||
@ -554,6 +555,7 @@ public class NMS {
|
||||
|
||||
private static final float DEFAULT_SPEED = 1F;
|
||||
private static Map<Class<?>, Integer> ENTITY_CLASS_TO_INT;
|
||||
private static Map<Class<?>, String> ENTITY_CLASS_TO_NAME;
|
||||
private static final Map<Class<?>, Constructor<?>> ENTITY_CONSTRUCTOR_CACHE = new WeakHashMap<Class<?>, Constructor<?>>();
|
||||
private static Map<Integer, Class<?>> ENTITY_INT_TO_CLASS;
|
||||
private static Field GOAL_FIELD = getField(PathfinderGoalSelector.class, "b");
|
||||
@ -573,6 +575,8 @@ public class NMS {
|
||||
ENTITY_INT_TO_CLASS = (Map<Integer, Class<?>>) field.get(null);
|
||||
field = getField(EntityTypes.class, "f");
|
||||
ENTITY_CLASS_TO_INT = (Map<Class<?>, Integer>) field.get(null);
|
||||
field = getField(EntityTypes.class, "d");
|
||||
ENTITY_CLASS_TO_NAME = (Map<Class<?>, String>) field.get(null);
|
||||
} catch (Exception e) {
|
||||
Messaging.logTr(Messages.ERROR_GETTING_ID_MAPPING, e.getMessage());
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user