From 1f186a28b33def49428c34edb885b7a368c82111 Mon Sep 17 00:00:00 2001 From: Raycoms Date: Fri, 13 Sep 2024 09:08:17 +0200 Subject: [PATCH] move condition down --- .../client/render/worldevent/ItemOverlayBoxesRenderer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/minecolonies/core/client/render/worldevent/ItemOverlayBoxesRenderer.java b/src/main/java/com/minecolonies/core/client/render/worldevent/ItemOverlayBoxesRenderer.java index 458df732b69..2e30d131cf2 100644 --- a/src/main/java/com/minecolonies/core/client/render/worldevent/ItemOverlayBoxesRenderer.java +++ b/src/main/java/com/minecolonies/core/client/render/worldevent/ItemOverlayBoxesRenderer.java @@ -32,10 +32,10 @@ static void render(final WorldEventContext ctx) ctx.poseStack.translate(bounds.minX - ctx.cameraPosition.x(), bounds.minY - ctx.cameraPosition.y(), bounds.minZ - ctx.cameraPosition.z()); bounds = bounds.move(-bounds.minX, -bounds.minY, -bounds.minZ); } - else if (bounds != null) + else { ctx.pushPoseCameraToPos(pos); - bounds = bounds.move(pos.multiply(-1)); + if (bounds != null) bounds = bounds.move(pos.multiply(-1)); } if (box.showThroughBlocks())