mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-16 17:33:13 +01:00
backport 6a170a1ace
This commit is contained in:
parent
ae182423c1
commit
db58a7b105
1 changed files with 3 additions and 1 deletions
|
@ -169,8 +169,10 @@ public class CraftingModuleItem extends ModuleItem {
|
|||
|
||||
ItemEquality[] equalityTypes = ItemFilter.getEqualityTypes(tile);
|
||||
int resultAmount = this.getResultAmountPerCraft(module, stack, equalityTypes);
|
||||
// calculate how many crafting *operations* to do (as opposed to how many *items* to craft)
|
||||
int requiredCrafts = MathHelper.ceil(stack.getCount() / (float) resultAmount);
|
||||
int toCraft = Math.min(craftableAmount, requiredCrafts);
|
||||
int craftableCrafts = MathHelper.ceil(craftableAmount / (float) resultAmount);
|
||||
int toCraft = Math.min(craftableCrafts, requiredCrafts);
|
||||
|
||||
ItemStackHandler input = this.getInput(module);
|
||||
for (int i = 0; i < input.getSlots(); i++) {
|
||||
|
|
Loading…
Reference in a new issue