to be safe3

This commit is contained in:
Ellpeck 2016-01-17 20:50:25 +01:00
parent 4b835f8df8
commit 924e7da95f

View file

@ -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;