From 9fabc06eb261ed21f820344b9ec50ae824160001 Mon Sep 17 00:00:00 2001 From: Sakura Ryoko <116967773+sakura-ryoko@users.noreply.github.com> Date: Fri, 22 Nov 2024 09:23:10 -0500 Subject: [PATCH] Update OverlayRenderer.java --- .../java/fi/dy/masa/litematica/render/OverlayRenderer.java | 4 ++++ 1 file changed, 4 insertions(+) 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 e5734b59a6..71ca806ce4 100644 --- a/src/main/java/fi/dy/masa/litematica/render/OverlayRenderer.java +++ b/src/main/java/fi/dy/masa/litematica/render/OverlayRenderer.java @@ -583,6 +583,10 @@ private void renderBlockInfoOverlay(RayTraceWrapper traceWrapper, MinecraftClien World worldClient = WorldUtils.getBestWorld(mc); BlockPos pos = traceWrapper.getBlockHitResult().getBlockPos(); + if (mc.world == null || worldClient == null || worldSchematic == null) + { + return; + } BlockState stateClient = mc.world.getBlockState(pos); BlockState stateSchematic = worldSchematic.getBlockState(pos); boolean hasInvClient = InventoryUtils.getTargetInventory(worldClient, pos) != null;