mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-11 21:57:40 +00:00
Fixed strange flight behavior in flying NPCs with sizes below 5.
This commit is contained in:
1 parent
a1eb8ff91b
commit
219d0f1802
2 files changed
+3
-3
No files matched your search
@@ -305,8 +305,8 @@ public class PathNavigateFlying extends PathNavigate {
|
||||
}
|
||||
}
|
||||
|
||||
k = MathHelper.ceiling_float_int(this.theEntity.width);
|
||||
int l = (int)this.theEntity.height + 1;
|
||||
k = MathHelper.floor_double(this.theEntity.width + 1.0F);
|
||||
int l = MathHelper.floor_double(this.theEntity.height + 1.0F);
|
||||
int i1 = k;
|
||||
|
||||
for (int j1 = i - 1; j1 >= this.currentPath.getCurrentPathIndex(); --j1)
|
||||
|
||||
@@ -41,7 +41,7 @@ public abstract class EntityNPCFlying extends EntityNPCInterface {
|
||||
}
|
||||
|
||||
double heightOffGround = this.posY - this.worldObj.getTopSolidOrLiquidBlock((int) this.posX, (int) this.posZ);
|
||||
if (heightOffGround > this.ai.flyHeightLimit && this.ai.hasFlyLimit || (heightOffGround < this.height && this.motionY == 0)) {
|
||||
if (heightOffGround > this.ai.flyHeightLimit && this.ai.hasFlyLimit || (heightOffGround < Math.ceil(this.height) && this.motionY == 0)) {
|
||||
this.flyLimitAllow = false;
|
||||
if (!this.getNavigator().noPath() && this.motionY > 0) {
|
||||
this.motionY = 0;
|
||||
|
||||
Reference in new issue
Block a user