Fix Interface Cross Talk.
This commit is contained in:
@@ -29,6 +29,7 @@ import appeng.api.implementations.IUpgradeableHost;
|
|||||||
import appeng.api.implementations.tiles.ICraftingMachine;
|
import appeng.api.implementations.tiles.ICraftingMachine;
|
||||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
import appeng.api.implementations.tiles.ISegmentedInventory;
|
||||||
import appeng.api.networking.GridFlags;
|
import appeng.api.networking.GridFlags;
|
||||||
|
import appeng.api.networking.IGrid;
|
||||||
import appeng.api.networking.IGridNode;
|
import appeng.api.networking.IGridNode;
|
||||||
import appeng.api.networking.crafting.ICraftingLink;
|
import appeng.api.networking.crafting.ICraftingLink;
|
||||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||||
@@ -770,6 +771,19 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
|
|||||||
for (ForgeDirection s : possibleDirections)
|
for (ForgeDirection s : possibleDirections)
|
||||||
{
|
{
|
||||||
TileEntity te = w.getTileEntity( tile.xCoord + s.offsetX, tile.yCoord + s.offsetY, tile.zCoord + s.offsetZ );
|
TileEntity te = w.getTileEntity( tile.xCoord + s.offsetX, tile.yCoord + s.offsetY, tile.zCoord + s.offsetZ );
|
||||||
|
if ( te instanceof IInterfaceHost )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if ( ((IInterfaceHost) te).getInterfaceDuality().sameGrid( gridProxy.getGrid() ) )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
catch (GridAccessException e)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( te instanceof ICraftingMachine )
|
if ( te instanceof ICraftingMachine )
|
||||||
{
|
{
|
||||||
ICraftingMachine cm = (ICraftingMachine) te;
|
ICraftingMachine cm = (ICraftingMachine) te;
|
||||||
@@ -803,6 +817,11 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean sameGrid(IGrid grid) throws GridAccessException
|
||||||
|
{
|
||||||
|
return grid == gridProxy.getGrid();
|
||||||
|
}
|
||||||
|
|
||||||
private boolean acceptsItems(InventoryAdaptor ad, InventoryCrafting table)
|
private boolean acceptsItems(InventoryAdaptor ad, InventoryCrafting table)
|
||||||
{
|
{
|
||||||
for (int x = 0; x < table.getSizeInventory(); x++)
|
for (int x = 0; x < table.getSizeInventory(); x++)
|
||||||
|
|||||||
Reference in New Issue
Block a user