Fixed NPC flight zig-zagging at high speeds when near the end of the path.

This commit is contained in:
c0508383 committed 2022-08-28 00:12:15 -05:00
1 parent 502cde0068
commit 1facfd133d
1 file changed
+1
@@ -35,6 +35,7 @@ public class FlyingMoveHelper extends EntityMoveHelper{
double d2 = this.posZ - this.entity.posZ;
double d4 = d0 * d0 + d1 * d1 + d2 * d2;
double d5 = MathHelper.sqrt_double(d4);
speed = Math.min(d5/5.0D,speed);
double heightOffGround = 0;
if(this.entity.ai.hasFlyLimit) {