From cadab910f36d1c2184715397142dd515c75cbda5 Mon Sep 17 00:00:00 2001 From: Nightenom <17338378+Nightenom@users.noreply.github.com> Date: Fri, 30 Aug 2024 09:51:52 +0200 Subject: [PATCH] Fix blueprint rendering --- .../java/com/ldtteam/structurize/client/BlueprintHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/ldtteam/structurize/client/BlueprintHandler.java b/src/main/java/com/ldtteam/structurize/client/BlueprintHandler.java index a71466cd1..0b7787072 100644 --- a/src/main/java/com/ldtteam/structurize/client/BlueprintHandler.java +++ b/src/main/java/com/ldtteam/structurize/client/BlueprintHandler.java @@ -134,10 +134,14 @@ public void drawAtListOfPositions(final BlueprintPreviewData previewData, final BlueprintRenderer renderer = rendererCache.getUnchecked(previewData.getRenderKey()); + final Vec3 viewPosition = Minecraft.getInstance().gameRenderer.getMainCamera().getPosition(); + ctx.getPoseStack().pushPose(); + ctx.getPoseStack().translate(viewPosition.x(), viewPosition.y(), viewPosition.z()); for (final BlockPos coord : points) { renderer.draw(previewData, coord, ctx); } + ctx.getPoseStack().popPose(); Minecraft.getInstance().getProfiler().pop(); }