Skip to content

Commit

Permalink
Update Tree.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Thodor12 authored Jan 1, 2025
1 parent 95421a8 commit a9c4502
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ public static List<ItemStack> 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))
Expand Down

0 comments on commit a9c4502

Please sign in to comment.