mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
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:
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;
|
||||
|
||||
Reference in new issue
Block a user