From 924e7da95fa9bc98b5508755d117fd1058b4cd41 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 17 Jan 2016 20:50:25 +0100 Subject: [PATCH] to be safe3 --- .../mod/network/PacketUpdateTileEntity.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketUpdateTileEntity.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketUpdateTileEntity.java index 2f46f58bc..d515af4ba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketUpdateTileEntity.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketUpdateTileEntity.java @@ -67,10 +67,11 @@ public class PacketUpdateTileEntity implements IMessage{ public IMessage onMessage(PacketUpdateTileEntity message, MessageContext ctx){ if(message.pos != null && message.compound != null){ World world = Minecraft.getMinecraft().theWorld; - - TileEntity tile = world.getTileEntity(message.pos); - if(tile != null && tile instanceof TileEntityBase){ - ((TileEntityBase)tile).receiveSyncCompound(message.compound); + if(world != null){ + TileEntity tile = world.getTileEntity(message.pos); + if(tile != null && tile instanceof TileEntityBase){ + ((TileEntityBase)tile).receiveSyncCompound(message.compound); + } } } return null;