Why can this even happen..?

This commit is contained in:
Ellpeck 2016-07-08 18:45:37 +02:00
parent 01909c9787
commit 41a78d0399

View file

@ -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();
}