Adjusted floating: NPCs don't float when they're knocked back or hurt.

This commit is contained in:
luisc committed 2021-12-08 17:43:27 -06:00
1 parent d66f532643
commit 8c602c4d16
1 file changed
+1 -1
@@ -36,7 +36,7 @@ public abstract class EntityNPCFlying extends EntityNPCInterface {
return;
}
if (!this.onGround)
if (!this.onGround && !this.velocityChanged && this.motionY < 0 && this.hurtTime == 0)
{
this.motionY *= this.ai.flyGravity;
this.velocityChanged = true;