diff --git a/src/main/java/ganymedes01/etfuturum/entities/ai/ExtendedPathNavigator.java b/src/main/java/ganymedes01/etfuturum/entities/ai/ExtendedPathNavigator.java index 74a196628..a62d876fc 100644 --- a/src/main/java/ganymedes01/etfuturum/entities/ai/ExtendedPathNavigator.java +++ b/src/main/java/ganymedes01/etfuturum/entities/ai/ExtendedPathNavigator.java @@ -57,16 +57,16 @@ public PathEntity getPathToEntityLiving(Entity p_75494_1_) { public PathEntity getEntityPathToXYZ(double toPosX, double toPosY, double toPosZ, float searchRange, boolean canBreakDoors, boolean canEnterDoors, boolean avoidsWater, boolean canSwim, double xOffset, double yOffset, double zOffset) { worldObj.theProfiler.startSection("pathfind"); - int l = MathHelper.floor_double(theEntity.posX + xOffset); - int i1 = MathHelper.floor_double(theEntity.posY + yOffset); - int j1 = MathHelper.floor_double(theEntity.posZ + zOffset); - int k1 = (int) (searchRange); - int l1 = l - k1; - int i2 = i1 - k1; - int j2 = j1 - k1; - int k2 = l + k1; - int l2 = i1 + k1; - int i3 = j1 + k1; +// int l = MathHelper.floor_double(theEntity.posX + xOffset); +// int i1 = MathHelper.floor_double(theEntity.posY + yOffset); +// int j1 = MathHelper.floor_double(theEntity.posZ + zOffset); +// int k1 = (int) (searchRange); +// int l1 = l - k1; +// int i2 = i1 - k1; +// int j2 = j1 - k1; +// int k2 = l + k1; +// int l2 = i1 + k1; +// int i3 = j1 + k1; // ChunkCache chunkcache = new ChunkCache(worldObj, l1, i2, j2, k2, l2, i3, 0); PathEntity pathentity = pathFinder.createEntityPathTo(theEntity, toPosX, toPosY, toPosZ, searchRange); worldObj.theProfiler.endSection(); diff --git a/src/main/java/ganymedes01/etfuturum/entities/ai/FlyingPathFinder.java b/src/main/java/ganymedes01/etfuturum/entities/ai/FlyingPathFinder.java index 912c93653..8d64b57e5 100644 --- a/src/main/java/ganymedes01/etfuturum/entities/ai/FlyingPathFinder.java +++ b/src/main/java/ganymedes01/etfuturum/entities/ai/FlyingPathFinder.java @@ -154,7 +154,7 @@ public int findPathOptions(Entity entity, PathPoint currentPoint, PathPoint offs } private boolean isSafe(PathPoint p_227476_1_) { - return p_227476_1_ != null && costMalusMap.get(p_227476_1_) >= 0.0F; + return p_227476_1_ != null && costMalusMap.getOrDefault(p_227476_1_, 0.0F) >= 0.0F; } private boolean hasNotVisited(PathPoint p_227477_1_) {