Storage Buses no longer assume an inventory can be accessed just because it implements IInventory.

This commit is contained in:
AlgorithmX2
2014-07-23 17:39:42 -05:00
parent 980dff203f
commit 8bcd346226
3 changed files with 7 additions and 4 deletions
@@ -22,9 +22,11 @@ public class ExternalIInv implements IExternalStorageHandler
@Override
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource src)
{
if ( channel == StorageChannel.ITEMS && te instanceof IInventory )
return new MEMonitorIInventory( InventoryAdaptor.getAdaptor( (IInventory) te, d ) );
InventoryAdaptor ad = InventoryAdaptor.getAdaptor( (IInventory) te, d );
if ( channel == StorageChannel.ITEMS && ad != null )
return new MEMonitorIInventory( ad );
return null;
}