Make fluid autocrafting work correctly with buckets
This commit is contained in:
@@ -88,12 +88,22 @@ public class CraftingTask implements ICraftingTask {
|
||||
|
||||
if (fluidInStorage == null || fluidInStorage.amount < fluidInItem.amount) {
|
||||
missing.add(input);
|
||||
} else if (network.getItemStorage().getList().get(RSUtils.EMPTY_BUCKET) == null) {
|
||||
} else {
|
||||
boolean hasBucket = network.getItemStorage().getList().get(RSUtils.EMPTY_BUCKET) != null;
|
||||
ICraftingPattern bucketPattern = network.getPattern(RSUtils.EMPTY_BUCKET);
|
||||
|
||||
if (!hasBucket) {
|
||||
if (bucketPattern == null) {
|
||||
missing.add(RSUtils.EMPTY_BUCKET.copy());
|
||||
} else {
|
||||
toTake.add(RSUtils.EMPTY_BUCKET.copy());
|
||||
calculate(list, bucketPattern, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (hasBucket || bucketPattern != null) {
|
||||
toTakeFluids.add(fluidInItem.copy());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
missing.add(input);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user