From 41a78d0399f391a2bcf84f6d09c4cbc9fa5563c7 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 8 Jul 2016 18:45:37 +0200 Subject: [PATCH] Why can this even happen..? --- .../ellpeck/actuallyadditions/mod/event/ClientEvents.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java index 1550e2a11..23c03fb91 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java @@ -136,7 +136,9 @@ public class ClientEvents{ if(stack != null){ if(stack.getItem() instanceof IHudDisplay){ profiler.startSection("ItemHudDisplay"); - ((IHudDisplay)stack.getItem()).displayHud(minecraft, player, stack, posHit, profiler, event.getResolution()); + if(minecraft.theWorld != null){ + ((IHudDisplay)stack.getItem()).displayHud(minecraft, player, stack, posHit, profiler, event.getResolution()); + } profiler.endSection(); } } @@ -147,7 +149,9 @@ public class ClientEvents{ if(blockHit instanceof IHudDisplay){ profiler.startSection("BlockHudDisplay"); - ((IHudDisplay)blockHit).displayHud(minecraft, player, stack, posHit, profiler, event.getResolution()); + if(minecraft.theWorld != null){ + ((IHudDisplay)blockHit).displayHud(minecraft, player, stack, posHit, profiler, event.getResolution()); + } profiler.endSection(); }