summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java
index b9905dbb..a6c0b94e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java
@@ -15,9 +15,11 @@ public class CraftCreature extends CraftLivingEntity implements Creature {
EntityCreature entity = getHandle();
if (target == null) {
entity.target = null;
+ entity.setGoalTarget(null);
} else if (target instanceof CraftLivingEntity) {
entity.target = ((CraftLivingEntity) target).getHandle();
entity.pathEntity = entity.world.findPath(entity, entity.target, 16.0F, true, false, false, true);
+ entity.setGoalTarget(((CraftLivingEntity) target).getHandle());
}
}