diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-04-13 15:40:23 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-04-13 15:40:23 +0800 |
| commit | 2570a35b35ec29b6677e318f2bf3d5b6640bf106 (patch) | |
| tree | 28a69c3180b5f875cb931b154ee3718d96067e17 /src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java | |
| parent | 41998600e53f941554c8d73790180c13a2e5663c (diff) | |
| download | RoughlyEnoughItems-2570a35b35ec29b6677e318f2bf3d5b6640bf106.tar.gz RoughlyEnoughItems-2570a35b35ec29b6677e318f2bf3d5b6640bf106.tar.bz2 RoughlyEnoughItems-2570a35b35ec29b6677e318f2bf3d5b6640bf106.zip | |
v2.7.3 Bug fixes
Fix #56
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java b/src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java index b7758d7c6..b6cdc3384 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java @@ -5,9 +5,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.recipe.Recipe; import net.minecraft.recipe.crafting.ShapedRecipe; -import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Optional; +import java.util.stream.Collectors; public class DefaultShapedDisplay implements DefaultCraftingDisplay<ShapedRecipe> { @@ -17,11 +18,8 @@ public class DefaultShapedDisplay implements DefaultCraftingDisplay<ShapedRecipe public DefaultShapedDisplay(ShapedRecipe recipe) { this.display = recipe; - this.input = Lists.newArrayList(); - recipe.getPreviewInputs().forEach(ingredient -> { - input.add(Arrays.asList(ingredient.getStackArray())); - }); - this.output = Arrays.asList(recipe.getOutput()); + this.input = Lists.newArrayList(recipe.getPreviewInputs().stream().map(i -> Lists.newArrayList(i.getStackArray())).collect(Collectors.toList())); + this.output = Collections.singletonList(recipe.getOutput()); } @Override |
