Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,8 @@ 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
public void renderBackground(GuiGraphics guiGraphics, int x, int y, float partialTicks) {
}

@Override
Expand All @@ -289,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);
Expand Down