From 44ce5646095c18bd9f6a089ac38d98aaa8bc970f Mon Sep 17 00:00:00 2001 From: fullwall Date: Fri, 12 Apr 2013 17:57:15 +0800 Subject: [PATCH] Possible fix for Vec3D error --- src/main/java/net/citizensnpcs/npc/CitizensNPC.java | 2 +- src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java | 1 - src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java | 3 ++- .../java/net/citizensnpcs/npc/entity/MagmaCubeController.java | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/citizensnpcs/npc/CitizensNPC.java b/src/main/java/net/citizensnpcs/npc/CitizensNPC.java index bfbbe63fc..1e4d2f7f2 100644 --- a/src/main/java/net/citizensnpcs/npc/CitizensNPC.java +++ b/src/main/java/net/citizensnpcs/npc/CitizensNPC.java @@ -68,8 +68,8 @@ public class CitizensNPC extends AbstractNPC { data().remove("selectors"); for (Trait trait : traits.values()) trait.onDespawn(); - entityController.remove(); navigator.onDespawn(); + entityController.remove(); return true; } diff --git a/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java b/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java index e9dc180ab..9e09f2d3b 100644 --- a/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java +++ b/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java @@ -240,6 +240,5 @@ public class CitizensNavigator implements Navigator, Runnable { } private static final Location STATIONARY_LOCATION = new Location(null, 0, 0, 0); - private static int UNINITIALISED_SPEED = Integer.MIN_VALUE; } diff --git a/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java b/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java index 4a5de3ec4..851bfa22a 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java @@ -138,8 +138,9 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder { // gravity. also works around an entity.onGround not updating issue // (onGround is normally updated by the client) } - if (!npc.data().get("removefromplayerlist", true)) + if (!npc.data().get("removefromplayerlist", true)) { g(); + } if (Math.abs(motX) < EPSILON && Math.abs(motY) < EPSILON && Math.abs(motZ) < EPSILON) motX = motY = motZ = 0; diff --git a/src/main/java/net/citizensnpcs/npc/entity/MagmaCubeController.java b/src/main/java/net/citizensnpcs/npc/entity/MagmaCubeController.java index 3673e35a7..31321842b 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/MagmaCubeController.java +++ b/src/main/java/net/citizensnpcs/npc/entity/MagmaCubeController.java @@ -40,7 +40,6 @@ public class MagmaCubeController extends MobEntityController { if (npc != null) { setSize(3); NMS.clearGoals(goalSelector, targetSelector); - } }