diff --git a/projects/common/src/client/java/dan200/computercraft/client/gui/ComputerScreen.java b/projects/common/src/client/java/dan200/computercraft/client/gui/ComputerScreen.java index 25d2e7908..b398da342 100644 --- a/projects/common/src/client/java/dan200/computercraft/client/gui/ComputerScreen.java +++ b/projects/common/src/client/java/dan200/computercraft/client/gui/ComputerScreen.java @@ -48,5 +48,6 @@ public final class ComputerScreen extends Abstra terminal.getX(), terminal.getY(), terminal.getWidth(), terminal.getHeight(), false ); ComputerSidebar.renderBackground(spriteRenderer, computerTextures, leftPos, topPos + sidebarYOffset); + graphics.flush(); // Flush to ensure background textures are drawn before foreground. } } diff --git a/projects/common/src/client/java/dan200/computercraft/client/gui/TurtleScreen.java b/projects/common/src/client/java/dan200/computercraft/client/gui/TurtleScreen.java index 4c0817f54..c401be67a 100644 --- a/projects/common/src/client/java/dan200/computercraft/client/gui/TurtleScreen.java +++ b/projects/common/src/client/java/dan200/computercraft/client/gui/TurtleScreen.java @@ -63,5 +63,6 @@ public class TurtleScreen extends AbstractComputerScreen { // Render sidebar var spriteRenderer = SpriteRenderer.createForGui(graphics, RenderTypes.GUI_SPRITES); ComputerSidebar.renderBackground(spriteRenderer, GuiSprites.getComputerTextures(family), leftPos, topPos + sidebarYOffset); + graphics.flush(); // Flush to ensure background textures are drawn before foreground. } } diff --git a/projects/common/src/client/java/dan200/computercraft/client/gui/widgets/DynamicImageButton.java b/projects/common/src/client/java/dan200/computercraft/client/gui/widgets/DynamicImageButton.java index d2d62f0e9..2434e277d 100644 --- a/projects/common/src/client/java/dan200/computercraft/client/gui/widgets/DynamicImageButton.java +++ b/projects/common/src/client/java/dan200/computercraft/client/gui/widgets/DynamicImageButton.java @@ -44,9 +44,8 @@ public class DynamicImageButton extends Button { @Override public void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) { var texture = this.texture.get(isHoveredOrFocused()); - RenderSystem.setShaderTexture(0, texture.atlasLocation()); - RenderSystem.disableDepthTest(); + RenderSystem.disableDepthTest(); graphics.blit(getX(), getY(), 0, width, height, texture); RenderSystem.enableDepthTest(); }