Allow pipes to connect to IItemHandlers

Allow pipes to connect to IItemHandler capability items and allow extraction from it. Insertion not yet working
This commit is contained in:
Tom Elfring committed 2017-04-20 20:36:03 +02:00
1 parent 07544f4eeb
commit 0392f550dc
2 files changed
+4 -4

No files matched your search

@@ -50,7 +50,7 @@ public class InventoryNetwork extends DynamicNetwork<TileEntity, InventoryNetwor
}
EnumSet<EnumFacing> sides = acceptorDirections.get(coord);
IInventory acceptor = (IInventory)coord.getTileEntity(getWorld());
TileEntity acceptor = coord.getTileEntity(getWorld());
if(sides == null || sides.isEmpty())
{
@@ -61,7 +61,7 @@ public class InventoryNetwork extends DynamicNetwork<TileEntity, InventoryNetwor
for(EnumFacing side : sides)
{
ItemStack returned = TransporterManager.getPredictedInsert((TileEntity)acceptor, color, stack, side.getOpposite());
ItemStack returned = TransporterManager.getPredictedInsert(acceptor, color, stack, side.getOpposite());
if(TransporterManager.didEmit(stack, returned))
{
@@ -23,7 +23,7 @@ public final class TransporterUtils
public static boolean isValidAcceptorOnSide(TileEntity tile, EnumFacing side)
{
if(CapabilityUtils.hasCapability(tile, Capabilities.GRID_TRANSMITTER_CAPABILITY, side.getOpposite()) || !(tile instanceof IInventory))
if(CapabilityUtils.hasCapability(tile, Capabilities.GRID_TRANSMITTER_CAPABILITY, side.getOpposite()))
{
return false;
}
@@ -137,4 +137,4 @@ public final class TransporterUtils
int index = colors.indexOf(tileEntity.getColor());
tileEntity.setColor(colors.get(index+1));
}
}
}