Skip to content

Commit 84a2a14

Browse files
committed
fix: blending issue on 1.21.1 description pane
1 parent 359b0f5 commit 84a2a14

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/main/java/dev/isxander/yacl3/gui/YACLScreen.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package dev.isxander.yacl3.gui;
22

33
import com.mojang.blaze3d.platform.InputConstants;
4+
import com.mojang.blaze3d.systems.RenderSystem;
45
import com.mojang.math.Axis;
56
import dev.isxander.yacl3.api.*;
67
import dev.isxander.yacl3.api.utils.Dimension;
@@ -350,7 +351,7 @@ public CategoryTab(YACLScreen screen, ConfigCategory category, ScreenRectangle t
350351
})
351352
);
352353

353-
descriptionWidget = new OptionDescriptionWidget(
354+
this.descriptionWidget = new OptionDescriptionWidget(
354355
() -> new ScreenRectangle(
355356
screen.width / 3 * 2 + padding,
356357
tabArea.top() + padding,
@@ -380,9 +381,14 @@ public void visitChildren(Consumer<AbstractWidget> consumer) {
380381

381382
@Override
382383
public void renderBackground(GuiGraphics graphics) {
383-
// right pane darker db
384+
// right pane darker bg
385+
// 1.21.1 did not use RenderType/RenderPipeline in blit so we need to enable blending manually
386+
//? if <1.21.2
387+
/*RenderSystem.enableBlend();*/
384388
GuiUtils.blitGuiTex(graphics, DARKER_BG, rightPaneDim.left(), rightPaneDim.top(), rightPaneDim.right() + 2, rightPaneDim.bottom() + 2, rightPaneDim.width() + 2, rightPaneDim.height() + 2, 32, 32);
385-
389+
//? if <1.21.2
390+
/*RenderSystem.disableBlend();*/
391+
386392
// top separator for right pane
387393
GuiUtils.pushPose(graphics);
388394
GuiUtils.translateZ(graphics, 10);

0 commit comments

Comments
 (0)