mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 01:19:41 +00:00
Slightly improved flight pathing downwards.
This commit is contained in:
1 parent
c2a669fbeb
commit
450e065e27
2 files changed
+28
-27
No files matched your search
@@ -52,13 +52,13 @@ public class FlyingMoveHelper extends EntityMoveHelper{
|
||||
this.entity.motionZ += (d2 / d5 * speed - this.entity.motionZ) * speed;
|
||||
|
||||
if (heightOffGround < this.entity.ai.flyHeightLimit || !this.entity.ai.hasFlyLimit) {
|
||||
this.entity.motionY = ((d1 / d5) * speed);
|
||||
if(this.entity.motionY < 0 && this.entity.motionY > -6 * this.entity.ai.getWalkingSpeed()/5.0D)
|
||||
this.entity.motionY *= 5;
|
||||
this.entity.motionY += (d1 / d5 * speed - this.entity.motionY) * speed;
|
||||
}
|
||||
|
||||
this.entity.velocityChanged = true;
|
||||
}
|
||||
|
||||
this.entity.rotationYaw = this.limitAngle(this.entity.rotationYaw,(float) ((Math.atan2(-d0, -d2) + Math.PI) * -(180F / Math.PI)),30.0F);
|
||||
this.entity.rotationYaw = this.limitAngle(this.entity.rotationYaw,(float) ((Math.atan2(-d0, -d2) + Math.PI) * -(180F / Math.PI)),18.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user