mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-23 21:49:58 +00:00
Fixed NPE in item conduit.
This commit is contained in:
1 parent
55e411b1c2
commit
2c3279ee31
1 file changed
+2
-1
@@ -381,7 +381,8 @@ public class ItemConduit extends AbstractConduit implements IItemConduit {
|
||||
public boolean canConnectToExternal(ForgeDirection direction, boolean ignoreDisabled) {
|
||||
IInventory inv = getExternalInventory(direction);
|
||||
if(inv instanceof ISidedInventory) {
|
||||
return ((ISidedInventory) inv).getAccessibleSlotsFromSide(direction.getOpposite().ordinal()).length != 0;
|
||||
int[] slots = ((ISidedInventory) inv).getAccessibleSlotsFromSide(direction.getOpposite().ordinal());
|
||||
return slots != null && slots.length != 0;
|
||||
} else {
|
||||
return inv != null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user