Skip to content

Instantly share code, notes, and snippets.

@riking
Created June 27, 2013 23:06
Show Gist options
  • Save riking/5881184 to your computer and use it in GitHub Desktop.
Save riking/5881184 to your computer and use it in GitHub Desktop.
@@ -15,8 +15,10 @@ 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.setGoalTarget(((CraftLivingEntity) target).getHandle());
entity.pathEntity = entity.world.findPath(entity, entity.target, 16.0F, true, false, false, true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment