diff --git a/README.md b/README.md index 10075ef..ff4c7ac 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ right-clicking with an empty hand. Sneak-right-click with an empty hand to take the book back and restore the vanilla lectern. Breaking a Book Stand drops both the stored book and a vanilla lectern. -Bound Linking Books request a server-validated 18-by-18-by-18 snapshot around +Bound Linking Books request a server-validated 32-by-32-by-32 snapshot around their destination. The book keeps its target-centered close-up framing as a rotating Ponder scene on the left page, backed by the destination biome's sky color. The snapshot is visual only; the server diff --git a/docs/PORTING.md b/docs/PORTING.md index 99dc19b..f5538b5 100644 --- a/docs/PORTING.md +++ b/docs/PORTING.md @@ -165,6 +165,9 @@ terrain-aware search for an alternate grounded location near an unsafe target. Version 0.2.5 uses dimension-appropriate preview skies for vanilla Nether and End destinations instead of their inherited Overworld biome sky tint. +Version 0.2.6 expands destination snapshots to a 32-by-32-by-32 cube while +keeping the existing target-centered Ponder camera position. + 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 1fa8031..c5a7c68 100644 --- a/gradle.properties +++ b/gradle.properties @@ -33,7 +33,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. See https://semver.org/ -mod_version=0.2.5 +mod_version=0.2.6 # 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/client/preview/PonderDestinationPreviewRenderer.java b/src/main/java/net/dnorberg/rivencraft/client/preview/PonderDestinationPreviewRenderer.java index f0e8767..9702ca0 100644 --- a/src/main/java/net/dnorberg/rivencraft/client/preview/PonderDestinationPreviewRenderer.java +++ b/src/main/java/net/dnorberg/rivencraft/client/preview/PonderDestinationPreviewRenderer.java @@ -118,9 +118,9 @@ public final class PonderDestinationPreviewRenderer implements DestinationPrevie poseStack.mulPose(Axis.YP.rotationDegrees((ticks + partialTick) * 0.6F)); UIRenderHelper.flipForGuiRender(poseStack); poseStack.scale(7.0F, 7.0F, 7.0F); - // The target moves from (4, 32, 4) to (9, 9, 9) in the cubic - // snapshot, so retain its existing camera position relative to it. - poseStack.translate(-9.5F, -8.5F, -9.5F); + // The target sits at (16, 16, 16) in the 32-cube. Offset it exactly + // as before so expanding the snapshot does not move the camera. + poseStack.translate(-16.5F, -15.5F, -16.5F); SuperRenderTypeBuffer buffer = DefaultSuperRenderTypeBuffer.getInstance(); section.renderFirst(previewLevel, buffer, graphics, partialTick); diff --git a/src/main/java/net/dnorberg/rivencraft/network/LinkPreviewPayload.java b/src/main/java/net/dnorberg/rivencraft/network/LinkPreviewPayload.java index 7c21b6a..a850c9d 100644 --- a/src/main/java/net/dnorberg/rivencraft/network/LinkPreviewPayload.java +++ b/src/main/java/net/dnorberg/rivencraft/network/LinkPreviewPayload.java @@ -13,7 +13,7 @@ import net.minecraft.world.level.block.state.BlockState; public record LinkPreviewPayload(int skyColor, List blocks) implements CustomPacketPayload { /** Each axis of the destination volume captured for the book preview. */ - public static final int SNAPSHOT_SIZE = 18; + public static final int SNAPSHOT_SIZE = 32; /** A square footprint keeps every side visible during an orbit. */ private static final int MAX_BLOCKS = SNAPSHOT_SIZE * SNAPSHOT_SIZE * SNAPSHOT_SIZE; public static final Type TYPE = new Type<>(