aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-02-12 01:55:38 +0800
committershedaniel <daniel@shedaniel.me>2020-02-12 02:03:30 +0800
commit620b7b47c9c2a3d7e1f54c5a8c82113acaff7438 (patch)
treedde7882dac52864c84167799db97cb6f72db90e0 /src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java
parent5cb938a76b4f93c9f58bc725a1543e511c760aa9 (diff)
downloadRoughlyEnoughItems-620b7b47c9c2a3d7e1f54c5a8c82113acaff7438.tar.gz
RoughlyEnoughItems-620b7b47c9c2a3d7e1f54c5a8c82113acaff7438.tar.bz2
RoughlyEnoughItems-620b7b47c9c2a3d7e1f54c5a8c82113acaff7438.zip
fix favorites saving
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java')
-rw-r--r--src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java
index 08c2845c5..890232d03 100644
--- a/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java
+++ b/src/main/java/me/shedaniel/rei/plugin/cooking/DefaultCookingDisplay.java
@@ -40,14 +40,7 @@ public abstract class DefaultCookingDisplay implements TransferRecipeDisplay {
public DefaultCookingDisplay(AbstractCookingRecipe recipe) {
this.recipe = recipe;
- this.input = recipe.getPreviewInputs().stream().map(i -> {
- List<EntryStack> entries = new ArrayList<>();
- for (ItemStack stack : i.getMatchingStacksClient()) {
- entries.add(EntryStack.create(stack));
- }
- return entries;
- }).collect(Collectors.toList());
- this.input.add(fuel);
+ this.input = CollectionUtils.map(recipe.getPreviewInputs(), i -> CollectionUtils.map(i.getMatchingStacksClient(), EntryStack::create));
this.output = Collections.singletonList(EntryStack.create(recipe.getOutput()));
this.xp = recipe.getExperience();
this.cookTime = recipe.getCookTime();
@@ -81,6 +74,10 @@ public abstract class DefaultCookingDisplay implements TransferRecipeDisplay {
return cookTime;
}
+ public static List<EntryStack> getFuel() {
+ return fuel;
+ }
+
@ApiStatus.Internal
public Optional<AbstractCookingRecipe> getOptionalRecipe() {
return Optional.ofNullable(recipe);
@@ -98,7 +95,7 @@ public abstract class DefaultCookingDisplay implements TransferRecipeDisplay {
@Override
public List<List<EntryStack>> getOrganisedInputEntries(ContainerInfo<Container> containerInfo, Container container) {
- return CollectionUtils.map(recipe.getPreviewInputs(), i -> CollectionUtils.map(i.getMatchingStacksClient(), EntryStack::create));
+ return input;
}
}