diff --git a/src/main/java/fi/dy/masa/litematica/event/RenderHandler.java b/src/main/java/fi/dy/masa/litematica/event/RenderHandler.java index caa97c7cb6..0bacf3a7f1 100644 --- a/src/main/java/fi/dy/masa/litematica/event/RenderHandler.java +++ b/src/main/java/fi/dy/masa/litematica/event/RenderHandler.java @@ -58,7 +58,7 @@ public void onRenderGameOverlayPost(DrawContext drawContext) if (GuiSchematicManager.hasPendingPreviewTask()) { - OverlayRenderer.getInstance().renderPreviewFrame(mc); + OverlayRenderer.getInstance().renderPreviewFrame(mc, drawContext); } } } diff --git a/src/main/java/fi/dy/masa/litematica/gui/widgets/WidgetMaterialListEntry.java b/src/main/java/fi/dy/masa/litematica/gui/widgets/WidgetMaterialListEntry.java index ae83fe4b07..180f5b6ccd 100644 --- a/src/main/java/fi/dy/masa/litematica/gui/widgets/WidgetMaterialListEntry.java +++ b/src/main/java/fi/dy/masa/litematica/gui/widgets/WidgetMaterialListEntry.java @@ -291,8 +291,9 @@ public void postRenderHovered(int mouseX, int mouseY, boolean selected, DrawCont int x1 = x + 10; int x2 = x1 + w1 + 20; + // TODO 1.21.2+ // Draw a Background Mask to hide Button Widgets behind it (Hack-around) - fi.dy.masa.litematica.render.RenderUtils.renderBackgroundMask(x + 1, y + 1, totalWidth - 2, 58, drawContext); + //fi.dy.masa.litematica.render.RenderUtils.renderBackgroundMask(x + 1, y + 1, totalWidth - 2, 58, drawContext); RenderUtils.drawOutlinedBox(x, y, totalWidth, 60, 0xFF000000, GuiBase.COLOR_HORIZONTAL_BAR); y += 6; int y1 = y; diff --git a/src/main/java/fi/dy/masa/litematica/gui/widgets/WidgetSchematicVerificationResult.java b/src/main/java/fi/dy/masa/litematica/gui/widgets/WidgetSchematicVerificationResult.java index 57d826fb58..4e1b3c8fcf 100644 --- a/src/main/java/fi/dy/masa/litematica/gui/widgets/WidgetSchematicVerificationResult.java +++ b/src/main/java/fi/dy/masa/litematica/gui/widgets/WidgetSchematicVerificationResult.java @@ -449,10 +449,13 @@ public void render(int x, int y, MinecraftClient mc, DrawContext drawContext) { if (this.stateExpected != null && this.stateFound != null) { + // TODO 1.21.2+ + /* if (this.useBackgroundMask) { fi.dy.masa.litematica.render.RenderUtils.renderBackgroundMask(x + 1, y + 1, this.totalWidth - 1, this.totalHeight - 1, drawContext); } + */ MatrixStack matrixStack = drawContext.getMatrices(); matrixStack.push(); diff --git a/src/main/java/fi/dy/masa/litematica/render/BlockInfo.java b/src/main/java/fi/dy/masa/litematica/render/BlockInfo.java index ed6940bf6c..6217b652e2 100644 --- a/src/main/java/fi/dy/masa/litematica/render/BlockInfo.java +++ b/src/main/java/fi/dy/masa/litematica/render/BlockInfo.java @@ -65,10 +65,13 @@ public void render(int x, int y, MinecraftClient mc, DrawContext drawContext) { if (this.state != null) { + // TODO 1.21.2+ + /* if (this.useBackgroundMask) { fi.dy.masa.litematica.render.RenderUtils.renderBackgroundMask(x + 1, y + 1, this.totalWidth - 1, this.totalHeight - 1, drawContext); } + */ RenderUtils.drawOutlinedBox(x, y, this.totalWidth, this.totalHeight, 0xFF000000, GuiBase.COLOR_HORIZONTAL_BAR); diff --git a/src/main/java/fi/dy/masa/litematica/render/OverlayRenderer.java b/src/main/java/fi/dy/masa/litematica/render/OverlayRenderer.java index 7998dc74db..841b600da4 100644 --- a/src/main/java/fi/dy/masa/litematica/render/OverlayRenderer.java +++ b/src/main/java/fi/dy/masa/litematica/render/OverlayRenderer.java @@ -615,21 +615,24 @@ else if (hasInvSchematic) { BlockMismatchInfo info = new BlockMismatchInfo(stateSchematic, stateClient); this.getOverlayPosition(align, info.getTotalWidth(), info.getTotalHeight(), offY, invHeight, mc); - info.toggleUseBackgroundMask(true); + // TODO 1.21.2+ + //info.toggleUseBackgroundMask(true); info.render(this.blockInfoX, this.blockInfoY, mc, drawContext); } else if (traceWrapper.getHitType() == RayTraceWrapper.HitType.VANILLA_BLOCK) { BlockInfo info = new BlockInfo(stateClient, "litematica.gui.label.block_info.state_client"); this.getOverlayPosition(align, info.getTotalWidth(), info.getTotalHeight(), offY, invHeight, mc); - info.toggleUseBackgroundMask(true); + // TODO 1.21.2+ + //info.toggleUseBackgroundMask(true); info.render(this.blockInfoX, this.blockInfoY, mc, drawContext); } else if (traceWrapper.getHitType() == RayTraceWrapper.HitType.SCHEMATIC_BLOCK) { BlockInfo info = new BlockInfo(stateSchematic, "litematica.gui.label.block_info.state_schematic"); this.getOverlayPosition(align, info.getTotalWidth(), info.getTotalHeight(), offY, invHeight, mc); - info.toggleUseBackgroundMask(true); + // TODO 1.21.2+ + //info.toggleUseBackgroundMask(true); info.render(this.blockInfoX, this.blockInfoY, mc, drawContext); } } diff --git a/src/main/java/fi/dy/masa/litematica/render/RenderUtils.java b/src/main/java/fi/dy/masa/litematica/render/RenderUtils.java index dac5504862..295ed68d69 100644 --- a/src/main/java/fi/dy/masa/litematica/render/RenderUtils.java +++ b/src/main/java/fi/dy/masa/litematica/render/RenderUtils.java @@ -758,10 +758,13 @@ public static int renderInventoryOverlay(BlockInfoAlignment align, LeftRight sid return props.height; } + // TODO 1.21.2+ + /* public static void renderBackgroundMask(int startX, int startY, int width, int height, DrawContext drawContext) { fi.dy.masa.malilib.render.RenderUtils.drawTexturedRect(GuiBase.BG_TEXTURE, startX, startY, 0, 0, width, height, drawContext); } + */ /* private static void renderModelBrightnessColor(IBlockState state, IBakedModel model, float brightness, float r, float g, float b)