From a9c450242b57a8b26e714c57a184af4a48a7ff2a Mon Sep 17 00:00:00 2001 From: Thom van den Akker Date: Wed, 1 Jan 2025 11:25:08 +0100 Subject: [PATCH] Update Tree.java --- .../java/com/minecolonies/core/entity/ai/workers/util/Tree.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/minecolonies/core/entity/ai/workers/util/Tree.java b/src/main/java/com/minecolonies/core/entity/ai/workers/util/Tree.java index 5dda5867f7b..fff5165f9bb 100755 --- a/src/main/java/com/minecolonies/core/entity/ai/workers/util/Tree.java +++ b/src/main/java/com/minecolonies/core/entity/ai/workers/util/Tree.java @@ -327,7 +327,7 @@ public static List getSaplingsForLeaf(ServerLevel world, BlockPos pos private BlockPos getFirstLeaf(final LevelAccessor world) { // Find the closest leaf above, stay below max height - for (int i = 1; (i + topLog.getY()) < 255 && i < 10; i++) + for (int i = 1; (i + topLog.getY()) < world.getMaxBuildHeight() && i < 10; i++) { final BlockState blockState = world.getBlockState(topLog.offset(0, i, 0)); if (blockState.is(BlockTags.LEAVES) || blockState.is(ModTags.hugeMushroomBlocks))