mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 03:34:24 +00:00
Fixed NPCs bobbing in the air when flying.
This commit is contained in:
1 parent
29db4bfe33
commit
d37e986006
2 files changed
+4
-1
No files matched your search
@@ -51,6 +51,9 @@ public class FlyingMoveHelper extends EntityMoveHelper{
|
||||
verticalSpeed = speed * speedMult;
|
||||
verticalSpeed += this.entity.ai.flySpeed/2.0D;
|
||||
|
||||
if(verticalSpeed > Math.abs(this.entity.posY - this.posY))
|
||||
verticalSpeed = Math.abs(this.entity.posY - this.posY);
|
||||
|
||||
this.entity.motionY -= Math.signum(this.entity.posY - this.posY) * verticalSpeed;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public abstract class EntityNPCFlying extends EntityNPCInterface {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.onGround && !this.getMoveHelper().isUpdating())
|
||||
if (!this.onGround)
|
||||
{
|
||||
this.motionY *= this.ai.flyGravity;
|
||||
this.velocityChanged = true;
|
||||
|
||||
Reference in new issue
Block a user