From 73db2da1248df50bcd2fbada09c07a711cdccd48 Mon Sep 17 00:00:00 2001 From: luisc Date: Mon, 3 Jan 2022 15:50:31 -0600 Subject: [PATCH] Fixed flying not working in small enclosed spaces. --- .../npcs/ai/pathfinder/PathNavigateFlying.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/main/java/noppes/npcs/ai/pathfinder/PathNavigateFlying.java b/src/main/java/noppes/npcs/ai/pathfinder/PathNavigateFlying.java index f1027e02a..b98743930 100644 --- a/src/main/java/noppes/npcs/ai/pathfinder/PathNavigateFlying.java +++ b/src/main/java/noppes/npcs/ai/pathfinder/PathNavigateFlying.java @@ -297,23 +297,6 @@ public class PathNavigateFlying extends PathNavigate { */ private int getPathableYPos() { - int i = (int)this.theEntity.boundingBox.minY; - Block block = this.worldObj.getBlock(MathHelper.floor_double(this.theEntity.posX), i, MathHelper.floor_double(this.theEntity.posZ)); - int j = 0; - - do - { - if (block != Blocks.air) - { - return i; - } - - ++i; - block = this.worldObj.getBlock(MathHelper.floor_double(this.theEntity.posX), i, MathHelper.floor_double(this.theEntity.posZ)); - ++j; - } - while (j <= 16); - return (int)(this.theEntity.boundingBox.minY + 0.5D); }