Flying is now smoother, NPCs can pathfind downwards easier while flying.

This commit is contained in:
luisc committed 2022-02-18 03:34:20 -06:00
1 parent 3d1caf494b
commit 33e884c217
4 files changed
+44 -103

No files matched your search

@@ -289,15 +289,15 @@ public class PathNavigateFlying extends PathNavigate {
private Vec3 getEntityPosition()
{
return Vec3.createVectorHelper(this.theEntity.posX, (double)this.getPathableYPos(), this.theEntity.posZ);
return Vec3.createVectorHelper(this.theEntity.posX, this.getPathableYPos(), this.theEntity.posZ);
}
/**
* Gets the safe pathing Y position for the entity depending on if it can path swim or not
*/
private int getPathableYPos()
private double getPathableYPos()
{
return (int)(this.theEntity.boundingBox.minY + 0.5D);
return this.theEntity.boundingBox.minY + 0.05D;
}
/**