Expand destination preview snapshots
Build / build (push) Canceled after 0s

This commit is contained in:
dnorberg committed 2026-09-21 09:53:10 -04:00
1 parent 0de817b28a
commit 3760b0dea3
5 files changed
+9 -6

No files matched your search

@@ -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);
@@ -13,7 +13,7 @@ import net.minecraft.world.level.block.state.BlockState;
public record LinkPreviewPayload(int skyColor, List<SnapshotBlock> 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<LinkPreviewPayload> TYPE = new Type<>(