Fixes incorrect handling of prioritized inventories
Prioritized inventories are not longer used twice for storing leftover items and thus finally reporting twice the amount of storable items when they are the only possible option to store something. Also fixes import buses now respecting the amount of storable items inside the network instead of trying to place the exported items back and failing on any restricted inventory, potentially voiding the overflow. Fixes #1892
This commit is contained in:
@@ -111,11 +111,16 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
|
||||
}
|
||||
}
|
||||
|
||||
// We need to ignore prioritized inventories in the second pass. If they were not able to store everything
|
||||
// during the first pass, they will do so in the second, but as this is stateless we will just report twice
|
||||
// the amount of storable items.
|
||||
// ignores craftingcache on the second pass.
|
||||
ii = invList.iterator();
|
||||
while( ii.hasNext() && input != null )
|
||||
{
|
||||
IMEInventoryHandler<T> inv = ii.next();
|
||||
if( inv.validForPass( 2 ) && inv.canAccept( input ) )// ignore crafting on the second pass.
|
||||
|
||||
if( inv.validForPass( 2 ) && inv.canAccept( input ) && !inv.isPrioritized( input ) )
|
||||
{
|
||||
input = inv.injectItems( input, type, src );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user