mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
Closes #1143
This commit is contained in:
parent
8649106d22
commit
2584bb9cf4
1 changed files with 14 additions and 4 deletions
|
@ -51,11 +51,21 @@ public class EmpowererRecipe {
|
||||||
if (!input.apply(base)) return false;
|
if (!input.apply(base)) return false;
|
||||||
List<Ingredient> matches = new ArrayList<>();
|
List<Ingredient> matches = new ArrayList<>();
|
||||||
ItemStack[] stacks = { stand1, stand2, stand3, stand4 };
|
ItemStack[] stacks = { stand1, stand2, stand3, stand4 };
|
||||||
|
boolean[] unused = { true, true, true, true };
|
||||||
for (ItemStack s : stacks) {
|
for (ItemStack s : stacks) {
|
||||||
if (!matches.contains(modifier1) && modifier1.apply(s)) matches.add(modifier1);
|
if (unused[0] && modifier1.apply(s)) {
|
||||||
else if (!matches.contains(modifier2) && modifier2.apply(s)) matches.add(modifier2);
|
matches.add(modifier1);
|
||||||
else if (!matches.contains(modifier3) && modifier3.apply(s)) matches.add(modifier3);
|
unused[0] = false;
|
||||||
else if (!matches.contains(modifier4) && modifier4.apply(s)) matches.add(modifier4);
|
} else if (unused[1] && modifier2.apply(s)) {
|
||||||
|
matches.add(modifier2);
|
||||||
|
unused[1] = false;
|
||||||
|
} else if (unused[2] && modifier3.apply(s)) {
|
||||||
|
matches.add(modifier3);
|
||||||
|
unused[2] = false;
|
||||||
|
} else if (unused[3] && modifier4.apply(s)) {
|
||||||
|
matches.add(modifier4);
|
||||||
|
unused[3] = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return matches.size() == 4;
|
return matches.size() == 4;
|
||||||
|
|
Loading…
Reference in a new issue