diff --git a/docs/PORTING.md b/docs/PORTING.md index 6ab3967..ad7f416 100644 --- a/docs/PORTING.md +++ b/docs/PORTING.md @@ -253,6 +253,10 @@ weather, lighting, and day/night behavior while retaining distinct terrain. Caves remain enclosed. Skylands use Minecraft's uniform floating-island noise and Overworld-like surfaces without the End's central dragon island. +Version 0.2.16.14 replaces the Explore text control with a compact eye symbol. +Books opened from a Book Stand display the control disabled and do not request +an explorable remote preview, preventing exploration while the book is mounted. + Version 0.2.14.0 restores the legacy Linking and Descriptive Book artwork for inventory items and gives each book its matching open-book texture when placed on a Book Stand. Return Linking Books created inside another Age also retain and diff --git a/gradle.properties b/gradle.properties index b12b12f..acfdbd9 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.16.13 +mod_version=0.2.16.14 immersive_portals_version=6.0.7 # 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. diff --git a/src/main/java/net/dnorberg/rivencraft/client/screen/DescriptiveBookScreen.java b/src/main/java/net/dnorberg/rivencraft/client/screen/DescriptiveBookScreen.java index e5b992b..eb8348d 100644 --- a/src/main/java/net/dnorberg/rivencraft/client/screen/DescriptiveBookScreen.java +++ b/src/main/java/net/dnorberg/rivencraft/client/screen/DescriptiveBookScreen.java @@ -36,6 +36,7 @@ public final class DescriptiveBookScreen extends Screen implements ExplorableBoo private static final int LINK_PANEL_Y = 35; private static final int LINK_PANEL_WIDTH = 126; private static final int LINK_PANEL_HEIGHT = 86; + private static final Component EXPLORE_ICON = Component.literal("👁"); private final AgeReference age; private final ResourceLocation generationProfile; @@ -87,16 +88,18 @@ public final class DescriptiveBookScreen extends Screen implements ExplorableBoo } if (preview.supportsExploration()) { exploreButton = addRenderableWidget(Button.builder( - Component.translatable("screen.rivencraft.book.explore"), button -> enterExploreOverlay()) - .bounds(left + 61, top + 145, 60, 20).build()); + EXPLORE_ICON, button -> enterExploreOverlay()) + .bounds(left + 81, top + 145, 20, 20).build()); + exploreButton.active = bookStandPos == null; } if (requestPreview) { + boolean allowExploration = preview.supportsExploration() && bookStandPos == null; PacketDistributor.sendToServer(new RequestLinkPreviewPayload( true, bookStandPos != null, bookStandPos == null && hand == InteractionHand.OFF_HAND, bookStandPos == null ? BlockPos.ZERO : bookStandPos, - preview.supportsExploration() + allowExploration )); } } @@ -206,6 +209,9 @@ public final class DescriptiveBookScreen extends Screen implements ExplorableBoo } private void enterExploreOverlay() { + if (bookStandPos != null) { + return; + } preview.setExploring(true); movingToExploreOverlay = true; ClientBookExploreOverlay.open(this); @@ -214,7 +220,7 @@ public final class DescriptiveBookScreen extends Screen implements ExplorableBoo private void resetExploration() { preview.resetView(); - exploreButton.setMessage(Component.translatable("screen.rivencraft.book.explore")); + exploreButton.setMessage(EXPLORE_ICON); } @Override diff --git a/src/main/java/net/dnorberg/rivencraft/client/screen/LinkingBookScreen.java b/src/main/java/net/dnorberg/rivencraft/client/screen/LinkingBookScreen.java index d5a4153..8b66dce 100644 --- a/src/main/java/net/dnorberg/rivencraft/client/screen/LinkingBookScreen.java +++ b/src/main/java/net/dnorberg/rivencraft/client/screen/LinkingBookScreen.java @@ -38,6 +38,7 @@ public final class LinkingBookScreen extends Screen implements ExplorableBookScr private static final int PREVIEW_Y = 35; private static final int PREVIEW_WIDTH = 126; private static final int PREVIEW_HEIGHT = 86; + private static final Component EXPLORE_ICON = Component.literal("👁"); private final InteractionHand hand; private final ItemStack book; @@ -89,16 +90,18 @@ public final class LinkingBookScreen extends Screen implements ExplorableBookScr } if (preview.supportsExploration()) { exploreButton = addRenderableWidget(Button.builder( - Component.translatable("screen.rivencraft.book.explore"), button -> enterExploreOverlay()) - .bounds(left + 61, top + 145, 60, 20).build()); + EXPLORE_ICON, button -> enterExploreOverlay()) + .bounds(left + 81, top + 145, 20, 20).build()); + exploreButton.active = bookStandPos == null; } if (requestPreview) { + boolean allowExploration = preview.supportsExploration() && bookStandPos == null; PacketDistributor.sendToServer(new RequestLinkPreviewPayload( false, bookStandPos != null, bookStandPos == null && hand == InteractionHand.OFF_HAND, bookStandPos == null ? BlockPos.ZERO : bookStandPos, - preview.supportsExploration() + allowExploration )); } } @@ -206,6 +209,9 @@ public final class LinkingBookScreen extends Screen implements ExplorableBookScr } private void enterExploreOverlay() { + if (bookStandPos != null) { + return; + } preview.setExploring(true); movingToExploreOverlay = true; ClientBookExploreOverlay.open(this); @@ -214,7 +220,7 @@ public final class LinkingBookScreen extends Screen implements ExplorableBookScr private void resetExploration() { preview.resetView(); - exploreButton.setMessage(Component.translatable("screen.rivencraft.book.explore")); + exploreButton.setMessage(EXPLORE_ICON); } public void acceptPreview(LinkPreviewPayload payload) {