Implemented Priority System for the item routing system. Lower numbers are looked at first.
This commit is contained in:
parent
2c49c49441
commit
7104138e2b
10 changed files with 97 additions and 10 deletions
|
@ -114,6 +114,8 @@ public class TileMasterRoutingNode extends TileInventory implements IMasterRouti
|
|||
}
|
||||
}
|
||||
|
||||
int maxTransfer = 8;
|
||||
|
||||
for (Entry<Integer, List<IItemFilter>> outputEntry : outputMap.entrySet())
|
||||
{
|
||||
List<IItemFilter> outputList = outputEntry.getValue();
|
||||
|
@ -124,7 +126,11 @@ public class TileMasterRoutingNode extends TileInventory implements IMasterRouti
|
|||
List<IItemFilter> inputList = inputEntry.getValue();
|
||||
for (IItemFilter inputFilter : inputList)
|
||||
{
|
||||
inputFilter.transferThroughInputFilter(outputFilter, 8);
|
||||
maxTransfer -= inputFilter.transferThroughInputFilter(outputFilter, maxTransfer);
|
||||
if (maxTransfer <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue