diff --git a/src/main/java/com/minecolonies/core/entity/ai/minimal/EntityAIInteractToggleAble.java b/src/main/java/com/minecolonies/core/entity/ai/minimal/EntityAIInteractToggleAble.java index f7d1883d432..1e5a2e433a3 100644 --- a/src/main/java/com/minecolonies/core/entity/ai/minimal/EntityAIInteractToggleAble.java +++ b/src/main/java/com/minecolonies/core/entity/ai/minimal/EntityAIInteractToggleAble.java @@ -166,7 +166,7 @@ private void checkPathBlocksCollided(final Path path) } final int maxLengthToCheck = Math.min(path.getNextNodeIndex() + LENGTH_TO_CHECK, path.getNodeCount()); - for (int i = Math.max(0, path.getNextNodeIndex() - 1); i < maxLengthToCheck; i++) + for (int i = Math.max(0, path.getNextNodeIndex() - 2); i < maxLengthToCheck; i++) { if (i == path.getNodeCount() - 1) { @@ -249,7 +249,7 @@ private boolean checkPathBlocksBelow() } final int maxLengthToCheck = Math.min(path.getNextNodeIndex() + LENGTH_TO_CHECK, path.getNodeCount()); - for (int i = Math.max(0, path.getNextNodeIndex() - 1); i < maxLengthToCheck; ++i) + for (int i = Math.max(0, path.getNextNodeIndex() - 2); i < maxLengthToCheck; ++i) { final Node pathpoint = path.getNode(i); @@ -275,7 +275,8 @@ else if (i < path.getNodeCount() - 1) { // Check if the next pathing node is below final Node nextPoint = path.getNode(i + 1); - if (pos.getX() == nextPoint.x && pos.getY() > nextPoint.y && pos.getZ() == nextPoint.z) + if ((pos.getX() == nextPoint.x && pos.getY() > nextPoint.y && pos.getZ() == nextPoint.z) || + entity.getY() - pos.getY() > 1) { toggleAblePositions.put(pos, entity.level.getBlockState(pos).getValue(BlockStateProperties.OPEN)); } diff --git a/src/main/java/com/minecolonies/core/entity/pathfinding/SurfaceType.java b/src/main/java/com/minecolonies/core/entity/pathfinding/SurfaceType.java index f7a80f98ce1..6ff23a51c62 100644 --- a/src/main/java/com/minecolonies/core/entity/pathfinding/SurfaceType.java +++ b/src/main/java/com/minecolonies/core/entity/pathfinding/SurfaceType.java @@ -67,16 +67,19 @@ public static SurfaceType getSurfaceType(final BlockGetter world, final BlockSta } if (block instanceof FenceBlock - || block instanceof FenceGateBlock || block instanceof WallBlock || block instanceof AbstractBlockMinecoloniesDefault || block instanceof BambooStalkBlock - || block instanceof BambooSaplingBlock - || block instanceof DoorBlock) + || block instanceof BambooSaplingBlock) { return SurfaceType.NOT_PASSABLE; } + if (block instanceof FenceGateBlock || block instanceof DoorBlock) + { + return SurfaceType.DROPABLE; + } + final VoxelShape shape = blockState.getCollisionShape(world, pos); final double maxShapeY = ShapeUtil.max(shape, Direction.Axis.Y); if (maxShapeY < 0.5 && PathfindingUtils.isDangerous(world.getBlockState(pos.below())))