mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 15:29:10 +00:00
Fix flyGravity zero not preventing falling
This commit is contained in:
1 parent
9b3c8031e7
commit
4300db8f78
1 file changed
+8
@@ -35,6 +35,14 @@ public abstract class EntityNPCFlying extends EntityNPCInterface {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLivingUpdate() {
|
||||
super.onLivingUpdate();
|
||||
if (this.canFly() && this.getNavigator().noPath()) {
|
||||
this.motionY = -Math.abs(this.ais.flyGravity);
|
||||
}
|
||||
}
|
||||
|
||||
public void moveEntityWithHeading(float p_70612_1_, float p_70612_2_) {
|
||||
if (!this.canFly() || this.hurtTime != 0 || !this.canBreathe()) {
|
||||
super.moveEntityWithHeading(p_70612_1_, p_70612_2_);
|
||||
|
||||
Reference in new issue
Block a user