mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Red Stringed Comparators will no longer bind to blocks that can't have automation handling. Closes #1695
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user