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){ public IMessage onMessage(PacketUpdateTileEntity message, MessageContext ctx){
if(message.pos != null && message.compound != null){ if(message.pos != null && message.compound != null){
World world = Minecraft.getMinecraft().theWorld; World world = Minecraft.getMinecraft().theWorld;
if(world != null){
TileEntity tile = world.getTileEntity(message.pos); TileEntity tile = world.getTileEntity(message.pos);
if(tile != null && tile instanceof TileEntityBase){ if(tile != null && tile instanceof TileEntityBase){
((TileEntityBase)tile).receiveSyncCompound(message.compound); ((TileEntityBase)tile).receiveSyncCompound(message.compound);
}
} }
} }
return null; return null;