From e5d099158dc33d121e7e662ac3ac48a7d8820dc4 Mon Sep 17 00:00:00 2001 From: digi2303 <132196028+digi2303@users.noreply.github.com> Date: Wed, 5 Aug 2026 23:54:40 +0300 Subject: [PATCH 1/2] Fix books not dimming the world behind them --- .../alexthe666/citadel/client/gui/GuiBasicBook.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/main/java/com/github/alexthe666/citadel/client/gui/GuiBasicBook.java b/src/main/java/com/github/alexthe666/citadel/client/gui/GuiBasicBook.java index 9f0bde3..413dc43 100644 --- a/src/main/java/com/github/alexthe666/citadel/client/gui/GuiBasicBook.java +++ b/src/main/java/com/github/alexthe666/citadel/client/gui/GuiBasicBook.java @@ -272,15 +272,6 @@ protected void renderBlurredBackground(float partialTick) { // Do nothing - this prevents the blur effect from being applied } - /** - * Override to disable the menu background that was added in Minecraft 1.21 - * Without this override, the book appears darker due to the overlay - */ - @Override - protected void renderMenuBackground(GuiGraphics guiGraphics) { - // Do nothing - this prevents the dark menu background from being rendered - } - @Override public void render(GuiGraphics guiGraphics, int x, int y, float partialTicks) { this.mouseX = x; From cd8f4943bc978faab23aa4a1a5646663d3a7e5ce Mon Sep 17 00:00:00 2001 From: digi2303 <132196028+digi2303@users.noreply.github.com> Date: Thu, 6 Aug 2026 00:05:53 +0300 Subject: [PATCH 2/2] Draw the book background once, behind the book --- .../github/alexthe666/citadel/client/gui/GuiBasicBook.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/alexthe666/citadel/client/gui/GuiBasicBook.java b/src/main/java/com/github/alexthe666/citadel/client/gui/GuiBasicBook.java index 413dc43..46dffbc 100644 --- a/src/main/java/com/github/alexthe666/citadel/client/gui/GuiBasicBook.java +++ b/src/main/java/com/github/alexthe666/citadel/client/gui/GuiBasicBook.java @@ -272,6 +272,10 @@ protected void renderBlurredBackground(float partialTick) { // Do nothing - this prevents the blur effect from being applied } + @Override + public void renderBackground(GuiGraphics guiGraphics, int x, int y, float partialTicks) { + } + @Override public void render(GuiGraphics guiGraphics, int x, int y, float partialTicks) { this.mouseX = x; @@ -280,7 +284,8 @@ public void render(GuiGraphics guiGraphics, int x, int y, float partialTicks) { int bindingR = bindingColor >> 16 & 255; int bindingG = bindingColor >> 8 & 255; int bindingB = bindingColor & 255; - this.renderBackground(guiGraphics, x, y, partialTicks); + this.renderTransparentBackground(guiGraphics); + guiGraphics.flush(); int k = (this.width - this.xSize) / 2; int l = (this.height - this.ySize + 128) / 2; BookBlit.blitWithColor(guiGraphics, getBookBindingTexture(), k, l, 0, 0, xSize, ySize, xSize, ySize, bindingR, bindingG, bindingB, 255);