mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Merge pull request #192 from KAMKEEL/codex/fix-npc-gravity-issue-with-flying-gravity-0.0
Fix flying NPCs falling when gravity set to 0
This commit is contained in:
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