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;