Work on TileEntity stuff. Details below.

I've added the method "Coord4D.safeTileGet()" which is likely going to be necessary in a lot of cases where duplicate TEs could be created- for some reason World.getTileEntity() fails to return the saved TileEntity fairly often.
This commit is contained in:
aidancbrady committed 2016-05-09 18:36:40 -04:00
1 parent fc7b185805
commit eba5f7e356
20 files changed
+108 -75

No files matched your search

@@ -29,11 +29,10 @@ public class PacketDataRequest implements IMessageHandler<DataRequestMessage, IM
{
EntityPlayer player = PacketHandler.getPlayer(context);
World worldServer = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(message.coord4D.dimensionId);
TileEntity tileEntity = message.coord4D.safeTileGet(worldServer);
if(worldServer != null && message.coord4D.getTileEntity(worldServer) instanceof ITileNetwork)
if(worldServer != null && tileEntity instanceof ITileNetwork)
{
TileEntity tileEntity = message.coord4D.getTileEntity(worldServer);
if(tileEntity instanceof TileEntityMultiblock)
{
((TileEntityMultiblock)tileEntity).sendStructure = true;