Posted July 22, 201411 yr My custom entity, no matter what always sinks to the bottom of any pool of water and just sits there awaiting its death. Here is all the AI code: this.getNavigator().setAvoidsWater(true); this.getNavigator().setCanSwim(true); this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, this.aiSit); this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0D, false)); this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 6.0F, 3.0F)); this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(6, new EntityAILookIdle(this)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true)); this.targetTasks.addTask(2, new EntityAIOwnerHurtByTarget(this)); this.targetTasks.addTask(3, new EntityAIOwnerHurtTarget(this)); this.setTamed(false);
July 22, 201411 yr Hmmm, not sure. You might want to try setAvoidsWater(false) instead. Logically swimming and avoiding water are different things, but perhaps there is some conflict in pathfinding if it tries to avoid water while it is in it. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
July 23, 201411 yr Author No change, perhaps it is just something to do with forge or maybe the hitbox, I am not sure.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.