Better handling for ISidedInventory tile entities
The pipe shouldn't connect to an inventory that isn't available from a certain side. With this it would be easier to manage what sides the pipe connects to without having to implement IPipeConnection. And also get rid of unnecessary connections.
This commit is contained in:
parent
c7b00eb4e5
commit
f88155ef0e
1 changed files with 3 additions and 1 deletions
|
@ -572,7 +572,9 @@ public class PipeTransportItems extends PipeTransport {
|
||||||
if (BlockGenericPipe.isValid(pipe2) && !(pipe2.transport instanceof PipeTransportItems))
|
if (BlockGenericPipe.isValid(pipe2) && !(pipe2.transport instanceof PipeTransportItems))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(tile instanceof ISidedInventory)
|
||||||
|
return ((ISidedInventory)tile).getAccessibleSlotsFromSide(side.getOpposite().ordinal()).length > 0;
|
||||||
return tile instanceof TileGenericPipe || tile instanceof ISpecialInventory || (tile instanceof IInventory && ((IInventory) tile).getSizeInventory() > 0)
|
return tile instanceof TileGenericPipe || tile instanceof ISpecialInventory || (tile instanceof IInventory && ((IInventory) tile).getSizeInventory() > 0)
|
||||||
|| (tile instanceof IMachine && ((IMachine) tile).manageSolids());
|
|| (tile instanceof IMachine && ((IMachine) tile).manageSolids());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue