Improve linking book text contrast
Build / build (push) Canceled after 0s

This commit is contained in:
dnorberg committed 2026-09-21 07:51:17 -04:00
1 parent cd5bf0190e
commit d7fb1855a8
3 files changed
+10 -6

No files matched your search

+3
View File
@@ -93,6 +93,9 @@ Version 0.1.7 suppresses Minecraft's default full-screen menu blur for the
Linking Book screen. The open-book texture supplies the GUI background while Linking Book screen. The open-book texture supplies the GUI background while
the world remains sharp behind it. the world remains sharp behind it.
Version 0.1.8 renders all Linking Book destination details in the same dark ink
color as the book name for consistent contrast against the parchment.
The preview code is separated behind a renderer interface and uses an isolated The preview code is separated behind a renderer interface and uses an isolated
Ponder level. The first iteration supplies the animated loading boundary; the Ponder level. The first iteration supplies the animated loading boundary; the
next iteration will add server-authoritative snapshot transport and populate next iteration will add server-authoritative snapshot transport and populate
+1 -1
View File
@@ -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. # 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 mod_license=LGPL-3.0-or-later
# The mod version. See https://semver.org/ # The mod version. See https://semver.org/
mod_version=0.1.7 mod_version=0.1.8
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # 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. # This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html # See https://maven.apache.org/guides/mini/guide-naming-conventions.html
@@ -19,6 +19,7 @@ import net.minecraft.world.item.ItemStack;
import net.neoforged.neoforge.network.PacketDistributor; import net.neoforged.neoforge.network.PacketDistributor;
public final class LinkingBookScreen extends Screen { public final class LinkingBookScreen extends Screen {
private static final int BOOK_TEXT_COLOR = 0xFF3B281B;
private static final ResourceLocation BOOK_TEXTURE = ResourceLocation.fromNamespaceAndPath( private static final ResourceLocation BOOK_TEXTURE = ResourceLocation.fromNamespaceAndPath(
"rivencraft", "textures/gui/linking_book.png" "rivencraft", "textures/gui/linking_book.png"
); );
@@ -89,21 +90,21 @@ public final class LinkingBookScreen extends Screen {
if (target == null) { if (target == null) {
graphics.drawWordWrap(font, Component.translatable("screen.rivencraft.book.name_prompt"), graphics.drawWordWrap(font, Component.translatable("screen.rivencraft.book.name_prompt"),
left + 177, top + 45, 124, 0xFF3B281B); left + 177, top + 45, 124, BOOK_TEXT_COLOR);
} else { } else {
int previewLeft = left + PREVIEW_X; int previewLeft = left + PREVIEW_X;
int previewTop = top + PREVIEW_Y; int previewTop = top + PREVIEW_Y;
preview.render(graphics, previewLeft, previewTop, PREVIEW_WIDTH, PREVIEW_HEIGHT, partialTick); preview.render(graphics, previewLeft, previewTop, PREVIEW_WIDTH, PREVIEW_HEIGHT, partialTick);
int rightCenter = left + 239; int rightCenter = left + 239;
graphics.drawWordWrap(font, title, left + 177, top + 43, 124, 0xFF3B281B); graphics.drawWordWrap(font, title, left + 177, top + 43, 124, BOOK_TEXT_COLOR);
BlockPos pos = target.location().pos(); BlockPos pos = target.location().pos();
graphics.drawCenteredString(font, Component.literal(target.location().dimension().location().toString()), graphics.drawCenteredString(font, Component.literal(target.location().dimension().location().toString()),
rightCenter, top + 76, 0xFF624934); rightCenter, top + 76, BOOK_TEXT_COLOR);
graphics.drawCenteredString(font, Component.literal(pos.getX() + ", " + pos.getY() + ", " + pos.getZ()), graphics.drawCenteredString(font, Component.literal(pos.getX() + ", " + pos.getY() + ", " + pos.getZ()),
rightCenter, top + 89, 0xFF624934); rightCenter, top + 89, BOOK_TEXT_COLOR);
graphics.drawCenteredString(font, Component.translatable("screen.rivencraft.book.click_to_link"), graphics.drawCenteredString(font, Component.translatable("screen.rivencraft.book.click_to_link"),
rightCenter, top + 119, 0xFF7A5A39); rightCenter, top + 119, BOOK_TEXT_COLOR);
} }
super.render(graphics, mouseX, mouseY, partialTick); super.render(graphics, mouseX, mouseY, partialTick);