Skip to content

Commit

Permalink
Fix blueprint rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightenom committed Aug 30, 2024
1 parent 026ed2e commit cadab91
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 cadab91

Please sign in to comment.