Skip to content

Commit

Permalink
Fix blueprint rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightenom committed Sep 2, 2024
1 parent 958c3f6 commit 814067a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 814067a

Please sign in to comment.