diff --git a/README.md b/README.md index cb3ee5f..5815b96 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,8 @@ independently validates every link. Open a page-free Descriptive Book, name its Age, and press Create. Rivencraft assigns the book a permanent Age UUID, creates a dedicated vanilla-like runtime dimension, and prepares a five-by-five cobblestone arrival platform at the -highest suitable nearby terrain. If no sturdy surface is available, the +highest suitable nearby terrain. Solid blocks and tree leaves are valid +footing. If no suitable surface is available, the platform is generated at Y=63. Reopen the book and click its preview to travel. Copies of the written book continue to resolve to the same persistent Age across server restarts. diff --git a/docs/PORTING.md b/docs/PORTING.md index f656d92..25372b5 100644 --- a/docs/PORTING.md +++ b/docs/PORTING.md @@ -199,6 +199,9 @@ Version 0.2.10.1 improves Age arrival placement. Non-Nether Ages select the highest sturdy surface near the origin and fall back to a platform at Y=63 when no suitable natural footing exists. +Version 0.2.10.2 allows leaf blocks to count as proper natural footing when +selecting the highest arrival surface. + The preview code is separated behind a renderer interface and uses an isolated Ponder level populated from server-authoritative destination snapshots. diff --git a/gradle.properties b/gradle.properties index caa50b5..d34e415 100644 --- a/gradle.properties +++ b/gradle.properties @@ -35,7 +35,7 @@ mod_name=Rivencraft # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=LGPL-3.0-or-later # The mod version. Rivencraft uses the x.y.z.b policy documented in README.md. -mod_version=0.2.10.1 +mod_version=0.2.10.2 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/net/dnorberg/rivencraft/book/AgeDimensionService.java b/src/main/java/net/dnorberg/rivencraft/book/AgeDimensionService.java index 8edd8cc..8a67f76 100644 --- a/src/main/java/net/dnorberg/rivencraft/book/AgeDimensionService.java +++ b/src/main/java/net/dnorberg/rivencraft/book/AgeDimensionService.java @@ -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; }