mirror of
https://github.com/GTNewHorizons/JustEnoughCalculation.git
synced 2026-11-26 06:42:55 +00:00
chore: refactor
This commit is contained in:
1 parent
85ba97338c
commit
b05011cace
25 files changed
+659
-338
No files matched your search
@@ -109,6 +109,11 @@ public class Recipe {
|
||||
return Arrays.stream(getLabel(type)).anyMatch(i -> ILabel.MERGER.merge(label, i, true).isPresent());
|
||||
}
|
||||
|
||||
public int multiplier(ILabel label, enumIoType type) {
|
||||
return Arrays.stream(getLabel(type)).filter(i -> ILabel.MERGER.merge(label, i, true).isPresent()).findAny()
|
||||
.map(i -> (i.getAmount() + Math.abs(label.getAmount()) - 1) / i.getAmount()).orElse(0);
|
||||
}
|
||||
|
||||
public enum enumIoType {
|
||||
INPUT, OUTPUT, CATALYST;
|
||||
|
||||
|
||||
Reference in new issue
Block a user