Red Stringed Comparators will no longer bind to blocks that can't have automation handling. Closes #1695

This commit is contained in:
Vasco Lavos committed 2015-12-29 21:59:44 +00:00
1 parent af61c7cc46
commit 81a71e642d
1 file changed
+15 -2
@@ -22,8 +22,21 @@ public class TileRedStringContainer extends TileRedString implements ISidedInven
@Override
public boolean acceptBlock(int x, int y, int z) {
TileEntity inv = worldObj.getTileEntity(x, y, z);
return inv != null && inv instanceof IInventory;
TileEntity tile = worldObj.getTileEntity(x, y, z);
if(tile != null && tile instanceof IInventory) {
IInventory inv = (IInventory) tile;
if(inv instanceof ISidedInventory) {
ISidedInventory sidedInv = (ISidedInventory) inv;
for(int i = 0; i < 6; i++)
if(sidedInv.getAccessibleSlotsFromSide(i).length != 0)
return true;
return false;
}
return true;
}
return false;
}
@Override