Allow leaves as Age spawn footing
Build / build (push) Canceled after 0s

This commit is contained in:
dnorberg committed 2026-09-21 14:50:57 -04:00
1 parent 66f546dc7a
commit 58964052c9
4 files changed
+10 -4

No files matched your search

@@ -121,14 +121,16 @@ public final class AgeDimensionService {
for (int x = -SURFACE_SEARCH_RADIUS; x <= SURFACE_SEARCH_RADIUS; x++) {
for (int z = -SURFACE_SEARCH_RADIUS; z <= SURFACE_SEARCH_RADIUS; z++) {
int floorY = level.getHeight(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, x, z) - 1;
int floorY = level.getHeight(Heightmap.Types.WORLD_SURFACE, x, z) - 1;
if (floorY < level.getMinBuildHeight() || floorY > maximumFloorY) {
continue;
}
BlockPos candidate = new BlockPos(x, floorY, z);
var state = level.getBlockState(candidate);
if (!level.getFluidState(candidate).isEmpty()
|| !level.getBlockState(candidate).isFaceSturdy(level, candidate, net.minecraft.core.Direction.UP)) {
|| (!state.is(BlockTags.LEAVES)
&& !state.isFaceSturdy(level, candidate, net.minecraft.core.Direction.UP))) {
continue;
}