diff --git a/src/main/java/noppes/npcs/ai/pathfinder/FlyPathFinder.java b/src/main/java/noppes/npcs/ai/pathfinder/FlyPathFinder.java index 1623bd321..ef1263aec 100644 --- a/src/main/java/noppes/npcs/ai/pathfinder/FlyPathFinder.java +++ b/src/main/java/noppes/npcs/ai/pathfinder/FlyPathFinder.java @@ -324,7 +324,7 @@ public class FlyPathFinder extends PathFinder if(block == Blocks.air) { boolean heightClear = true; - for (int currentY = blockY; currentY < Math.ceil(blockY + entity.height); ++currentY) { + for (int currentY = blockY; currentY <= Math.ceil(blockY + entity.height); ++currentY) { Block b = entity.worldObj.getBlock(l, currentY, j1); if (b != Blocks.air) { heightClear = false; diff --git a/src/main/java/noppes/npcs/ai/pathfinder/FlyingMoveHelper.java b/src/main/java/noppes/npcs/ai/pathfinder/FlyingMoveHelper.java index a722b04af..0c31d46ec 100644 --- a/src/main/java/noppes/npcs/ai/pathfinder/FlyingMoveHelper.java +++ b/src/main/java/noppes/npcs/ai/pathfinder/FlyingMoveHelper.java @@ -54,6 +54,9 @@ public class FlyingMoveHelper extends EntityMoveHelper{ if (heightOffGround < this.entity.ai.flyHeightLimit || !this.entity.ai.hasFlyLimit) { this.entity.motionY = verticalSpeed * (d1 / d5); + if (this.entity.motionY > 0) { + this.entity.motionY += 0.1D; + } } this.entity.velocityChanged = true; diff --git a/src/main/java/noppes/npcs/ai/pathfinder/PathNavigateFlying.java b/src/main/java/noppes/npcs/ai/pathfinder/PathNavigateFlying.java index a00b95c13..257b2b129 100644 --- a/src/main/java/noppes/npcs/ai/pathfinder/PathNavigateFlying.java +++ b/src/main/java/noppes/npcs/ai/pathfinder/PathNavigateFlying.java @@ -226,7 +226,7 @@ public class PathNavigateFlying extends PathNavigate { if (vec3 != null) { - this.theEntity.getMoveHelper().setMoveTo(vec3.xCoord, vec3.yCoord + 0.5D, vec3.zCoord, this.speed); + this.theEntity.getMoveHelper().setMoveTo(vec3.xCoord, vec3.yCoord, vec3.zCoord, this.speed); } } } diff --git a/src/main/java/noppes/npcs/entity/EntityNPCFlying.java b/src/main/java/noppes/npcs/entity/EntityNPCFlying.java index e588e2f93..ddfa7af4a 100644 --- a/src/main/java/noppes/npcs/entity/EntityNPCFlying.java +++ b/src/main/java/noppes/npcs/entity/EntityNPCFlying.java @@ -48,7 +48,7 @@ public abstract class EntityNPCFlying extends EntityNPCInterface { } } - if(heightOffGround > this.ai.flyHeightLimit && this.ai.hasFlyLimit){ + if (heightOffGround > this.ai.flyHeightLimit && this.ai.hasFlyLimit) { super.moveEntityWithHeading(p_70612_1_,p_70612_2_); return; } @@ -57,9 +57,6 @@ public abstract class EntityNPCFlying extends EntityNPCInterface { super.moveEntityWithHeading(p_70612_1_, p_70612_2_); this.motionY = d3; - this.fallDistance = 0.0F; - this.velocityChanged = true; - if(this.getNavigator().noPath()) this.motionY = 0.0D; }