diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-05-22 21:30:38 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-05-22 21:30:38 +0800 |
| commit | 4ea8402014b3878bc94ae977cdace1ab7c497e5f (patch) | |
| tree | 94aaff3b96956b17768c82690d956523fac7125d /src/main/java/me/shedaniel/rei/plugin | |
| parent | f7128cb247d827057b8fa63b954976fabb169091 (diff) | |
| download | RoughlyEnoughItems-4ea8402014b3878bc94ae977cdace1ab7c497e5f.tar.gz RoughlyEnoughItems-4ea8402014b3878bc94ae977cdace1ab7c497e5f.tar.bz2 RoughlyEnoughItems-4ea8402014b3878bc94ae977cdace1ab7c497e5f.zip | |
2.9.1
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin')
14 files changed, 50 insertions, 43 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java index 3ae946fee..e1ab4c9ed 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingCategory.java @@ -13,6 +13,7 @@ import me.shedaniel.rei.gui.renderables.RecipeRenderer; import me.shedaniel.rei.gui.widget.RecipeBaseWidget; import me.shedaniel.rei.gui.widget.SlotWidget; import me.shedaniel.rei.gui.widget.Widget; +import net.minecraft.ChatFormat; import net.minecraft.block.Blocks; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.GuiLighting; @@ -23,6 +24,7 @@ import net.minecraft.util.math.MathHelper; import java.awt.*; import java.util.Arrays; +import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.function.Supplier; @@ -74,7 +76,7 @@ public class DefaultBlastingCategory implements RecipeCategory<DefaultBlastingDi widgets.add(new SlotWidget(startPoint.x + 1, startPoint.y + 37, recipeDisplay.getFuel(), true, true, true) { @Override protected List<String> getExtraToolTips(ItemStack stack) { - return Arrays.asList(I18n.translate("category.rei.smelting.fuel")); + return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.smelting.fuel")); } }); widgets.add(new SlotWidget(startPoint.x + 61, startPoint.y + 19, recipeDisplay.getOutput(), false, true, true)); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingDisplay.java index 4b88d9e7e..3adab1d6f 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultBlastingDisplay.java @@ -5,7 +5,6 @@ package me.shedaniel.rei.plugin; -import com.google.common.collect.Lists; import me.shedaniel.rei.api.RecipeDisplay; import net.minecraft.block.entity.FurnaceBlockEntity; import net.minecraft.item.Item; @@ -13,6 +12,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.recipe.BlastingRecipe; import net.minecraft.util.Identifier; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Optional; @@ -26,8 +26,8 @@ public class DefaultBlastingDisplay implements RecipeDisplay<BlastingRecipe> { public DefaultBlastingDisplay(BlastingRecipe recipe) { this.display = recipe; - this.input = Lists.newArrayList(recipe.getPreviewInputs().stream().map(i -> Lists.newArrayList(i.getStackArray())).collect(Collectors.toList())); - input.add(FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getDefaultStack).collect(Collectors.toList())); + this.input = recipe.getPreviewInputs().stream().map(i -> Arrays.asList(i.getStackArray())).collect(Collectors.toList()); + this.input.add(FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getDefaultStack).collect(Collectors.toList())); this.output = Collections.singletonList(recipe.getOutput()); } diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java index 0f8b75aad..907c7aaaa 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingCategory.java @@ -12,6 +12,7 @@ import me.shedaniel.rei.api.Renderer; import me.shedaniel.rei.gui.widget.RecipeBaseWidget; import me.shedaniel.rei.gui.widget.SlotWidget; import me.shedaniel.rei.gui.widget.Widget; +import net.minecraft.ChatFormat; import net.minecraft.block.Blocks; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.GuiLighting; @@ -23,6 +24,7 @@ import net.minecraft.util.math.MathHelper; import java.awt.*; import java.util.Arrays; +import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.function.Supplier; @@ -66,31 +68,31 @@ public class DefaultBrewingCategory implements RecipeCategory<DefaultBrewingDisp widgets.add(new SlotWidget(startPoint.x + 63, startPoint.y + 1, recipeDisplay.getInput().get(0), false, true, true) { @Override protected List<String> getExtraToolTips(ItemStack stack) { - return Arrays.asList(I18n.translate("category.rei.brewing.input")); + return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.brewing.input")); } }); widgets.add(new SlotWidget(startPoint.x + 40, startPoint.y + 1, recipeDisplay.getInput().get(1), false, true, true) { @Override protected List<String> getExtraToolTips(ItemStack stack) { - return Arrays.asList(I18n.translate("category.rei.brewing.reactant")); + return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.brewing.reactant")); } }); widgets.add(new SlotWidget(startPoint.x + 40, startPoint.y + 35, recipeDisplay.getOutput(0), false, true, true) { @Override protected List<String> getExtraToolTips(ItemStack stack) { - return Arrays.asList(I18n.translate("category.rei.brewing.result")); + return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.brewing.result")); } }); widgets.add(new SlotWidget(startPoint.x + 63, startPoint.y + 42, recipeDisplay.getOutput(1), false, true, true) { @Override protected List<String> getExtraToolTips(ItemStack stack) { - return Arrays.asList(I18n.translate("category.rei.brewing.result")); + return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.brewing.result")); } }); widgets.add(new SlotWidget(startPoint.x + 86, startPoint.y + 35, recipeDisplay.getOutput(2), false, true, true) { @Override protected List<String> getExtraToolTips(ItemStack stack) { - return Arrays.asList(I18n.translate("category.rei.brewing.result")); + return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.brewing.result")); } }); return widgets; diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingDisplay.java index 5d1f08146..792b3a78d 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultBrewingDisplay.java @@ -13,10 +13,7 @@ import net.minecraft.recipe.Ingredient; import net.minecraft.recipe.Recipe; import net.minecraft.util.Identifier; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Optional; +import java.util.*; public class DefaultBrewingDisplay implements RecipeDisplay { @@ -36,7 +33,7 @@ public class DefaultBrewingDisplay implements RecipeDisplay { @Override public List<List<ItemStack>> getInput() { - return Lists.newArrayList(Collections.singletonList(input), Lists.newArrayList(reactant.getStackArray())); + return Lists.newArrayList(Collections.singletonList(input), Arrays.asList(reactant.getStackArray())); } @Override diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultCampfireDisplay.java b/src/main/java/me/shedaniel/rei/plugin/DefaultCampfireDisplay.java index 0ab1d9fdb..4e910be9e 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultCampfireDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultCampfireDisplay.java @@ -5,7 +5,6 @@ package me.shedaniel.rei.plugin; -import com.google.common.collect.Lists; import me.shedaniel.rei.api.RecipeDisplay; import net.minecraft.item.ItemStack; import net.minecraft.recipe.CampfireCookingRecipe; @@ -13,13 +12,16 @@ import net.minecraft.recipe.Ingredient; import net.minecraft.util.DefaultedList; import net.minecraft.util.Identifier; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Optional; +import java.util.stream.Collectors; public class DefaultCampfireDisplay implements RecipeDisplay<CampfireCookingRecipe> { - private List<ItemStack> inputs, output; + private List<List<ItemStack>> inputs; + private List<ItemStack> output; private int cookTime; private CampfireCookingRecipe display; @@ -29,8 +31,7 @@ public class DefaultCampfireDisplay implements RecipeDisplay<CampfireCookingReci } public DefaultCampfireDisplay(DefaultedList<Ingredient> ingredients, ItemStack output, int cookTime) { - this.inputs = Lists.newArrayList(); - ingredients.stream().map(ingredient -> Lists.newArrayList(ingredient.getStackArray())).forEach(inputs::addAll); + this.inputs = ingredients.stream().map(i -> Arrays.asList(i.getStackArray())).collect(Collectors.toList()); this.output = Collections.singletonList(output); this.cookTime = cookTime; } @@ -46,7 +47,7 @@ public class DefaultCampfireDisplay implements RecipeDisplay<CampfireCookingReci @Override public List<List<ItemStack>> getInput() { - return Collections.singletonList(inputs); + return inputs; } @Override diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultCraftingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultCraftingCategory.java index 3cc4e6242..9a2472a8e 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultCraftingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultCraftingCategory.java @@ -13,6 +13,7 @@ import me.shedaniel.rei.api.Renderer; import me.shedaniel.rei.gui.widget.RecipeBaseWidget; import me.shedaniel.rei.gui.widget.SlotWidget; import me.shedaniel.rei.gui.widget.Widget; +import net.minecraft.ChatFormat; import net.minecraft.block.Blocks; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.GuiLighting; @@ -77,7 +78,7 @@ public class DefaultCraftingCategory implements RecipeCategory<DefaultCraftingDi if (currentStack.getAmount() == 1) return ""; if (currentStack.getAmount() < 1) - return "§c" + currentStack.getAmount(); + return ChatFormat.RED.toString() + currentStack.getAmount(); return currentStack.getAmount() + ""; } }); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultCustomDisplay.java b/src/main/java/me/shedaniel/rei/plugin/DefaultCustomDisplay.java index e818b153c..21c141906 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultCustomDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultCustomDisplay.java @@ -9,7 +9,6 @@ import com.google.common.collect.Lists; import net.minecraft.item.ItemStack; import net.minecraft.recipe.Recipe; -import java.util.Collections; import java.util.List; import java.util.Optional; @@ -34,8 +33,8 @@ public class DefaultCustomDisplay implements DefaultCraftingDisplay { column.set(i % 3, true); } } - width = (int) column.stream().filter(b -> b).count(); - height = (int) row.stream().filter(b -> b).count(); + this.width = (int) column.stream().filter(Boolean::booleanValue).count(); + this.height = (int) row.stream().filter(Boolean::booleanValue).count(); } public DefaultCustomDisplay(List<List<ItemStack>> input, List<ItemStack> output) { @@ -49,17 +48,17 @@ public class DefaultCustomDisplay implements DefaultCraftingDisplay { @Override public List<List<ItemStack>> getInput() { - return Collections.unmodifiableList(input); + return input; } @Override public List<ItemStack> getOutput() { - return Collections.unmodifiableList(output); + return output; } @Override public List<List<ItemStack>> getRequiredItems() { - return Collections.unmodifiableList(input); + return input; } @Override diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java b/src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java index b7a4d343a..29aae3126 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java @@ -5,11 +5,11 @@ package me.shedaniel.rei.plugin; -import com.google.common.collect.Lists; import net.minecraft.item.ItemStack; import net.minecraft.recipe.Recipe; import net.minecraft.recipe.ShapedRecipe; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Optional; @@ -23,7 +23,7 @@ public class DefaultShapedDisplay implements DefaultCraftingDisplay<ShapedRecipe public DefaultShapedDisplay(ShapedRecipe recipe) { this.display = recipe; - this.input = Lists.newArrayList(recipe.getPreviewInputs().stream().map(i -> Lists.newArrayList(i.getStackArray())).collect(Collectors.toList())); + this.input = recipe.getPreviewInputs().stream().map(i -> Arrays.asList(i.getStackArray())).collect(Collectors.toList()); this.output = Collections.singletonList(recipe.getOutput()); } diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultShapelessDisplay.java b/src/main/java/me/shedaniel/rei/plugin/DefaultShapelessDisplay.java index d58afd938..f927c1a3c 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultShapelessDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultShapelessDisplay.java @@ -9,6 +9,7 @@ import com.google.common.collect.Lists; import net.minecraft.item.ItemStack; import net.minecraft.recipe.ShapelessRecipe; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Optional; @@ -22,7 +23,7 @@ public class DefaultShapelessDisplay implements DefaultCraftingDisplay { public DefaultShapelessDisplay(ShapelessRecipe recipe) { this.display = recipe; - this.input = Lists.newArrayList(recipe.getPreviewInputs().stream().map(i -> Lists.newArrayList(i.getStackArray())).collect(Collectors.toList())); + this.input = recipe.getPreviewInputs().stream().map(i -> Arrays.asList(i.getStackArray())).collect(Collectors.toList()); this.output = Collections.singletonList(recipe.getOutput()); } diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java index 08dabb2cd..56cd26fa9 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingCategory.java @@ -10,9 +10,10 @@ import me.shedaniel.rei.api.RecipeCategory; import me.shedaniel.rei.api.Renderable; import me.shedaniel.rei.api.Renderer; import me.shedaniel.rei.gui.renderables.RecipeRenderer; -import me.shedaniel.rei.gui.widget.SlotWidget; import me.shedaniel.rei.gui.widget.RecipeBaseWidget; +import me.shedaniel.rei.gui.widget.SlotWidget; import me.shedaniel.rei.gui.widget.Widget; +import net.minecraft.ChatFormat; import net.minecraft.block.Blocks; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.GuiLighting; @@ -23,6 +24,7 @@ import net.minecraft.util.math.MathHelper; import java.awt.*; import java.util.Arrays; +import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.function.Supplier; @@ -73,7 +75,7 @@ public class DefaultSmeltingCategory implements RecipeCategory<DefaultSmeltingDi widgets.add(new SlotWidget(startPoint.x + 1, startPoint.y + 37, recipeDisplaySupplier.get().getFuel(), true, true, true) { @Override protected List<String> getExtraToolTips(ItemStack stack) { - return Arrays.asList(I18n.translate("category.rei.smelting.fuel")); + return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.smelting.fuel")); } }); widgets.add(new SlotWidget(startPoint.x + 61, startPoint.y + 19, recipeDisplaySupplier.get().getOutput(), false, true, true)); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingDisplay.java index c87295094..e3d50c397 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultSmeltingDisplay.java @@ -5,7 +5,6 @@ package me.shedaniel.rei.plugin; -import com.google.common.collect.Lists; import me.shedaniel.rei.api.RecipeDisplay; import net.minecraft.block.entity.FurnaceBlockEntity; import net.minecraft.item.Item; @@ -13,6 +12,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.recipe.SmeltingRecipe; import net.minecraft.util.Identifier; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Optional; @@ -26,8 +26,8 @@ public class DefaultSmeltingDisplay implements RecipeDisplay<SmeltingRecipe> { public DefaultSmeltingDisplay(SmeltingRecipe recipe) { this.display = recipe; - this.input = Lists.newArrayList(recipe.getPreviewInputs().stream().map(i -> Lists.newArrayList(i.getStackArray())).collect(Collectors.toList())); - input.add(FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getDefaultStack).collect(Collectors.toList())); + this.input = recipe.getPreviewInputs().stream().map(i -> Arrays.asList(i.getStackArray())).collect(Collectors.toList()); + this.input.add(FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getDefaultStack).collect(Collectors.toList())); this.output = Collections.singletonList(recipe.getOutput()); } diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java b/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java index 564c91e47..76d9c8833 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingCategory.java @@ -13,6 +13,7 @@ import me.shedaniel.rei.gui.renderables.RecipeRenderer; import me.shedaniel.rei.gui.widget.RecipeBaseWidget; import me.shedaniel.rei.gui.widget.SlotWidget; import me.shedaniel.rei.gui.widget.Widget; +import net.minecraft.ChatFormat; import net.minecraft.block.Blocks; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.GuiLighting; @@ -23,6 +24,7 @@ import net.minecraft.util.math.MathHelper; import java.awt.*; import java.util.Arrays; +import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.function.Supplier; @@ -73,7 +75,7 @@ public class DefaultSmokingCategory implements RecipeCategory<DefaultSmokingDisp widgets.add(new SlotWidget(startPoint.x + 1, startPoint.y + 37, recipeDisplaySupplier.get().getFuel(), true, true, true) { @Override protected List<String> getExtraToolTips(ItemStack stack) { - return Arrays.asList(I18n.translate("category.rei.smelting.fuel")); + return Collections.singletonList(ChatFormat.YELLOW.toString() + I18n.translate("category.rei.smelting.fuel")); } }); widgets.add(new SlotWidget(startPoint.x + 61, startPoint.y + 19, recipeDisplaySupplier.get().getOutput(), false, true, true)); diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingDisplay.java index 9a307d574..a4ea4739c 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultSmokingDisplay.java @@ -5,7 +5,6 @@ package me.shedaniel.rei.plugin; -import com.google.common.collect.Lists; import me.shedaniel.rei.api.RecipeDisplay; import net.minecraft.block.entity.FurnaceBlockEntity; import net.minecraft.item.Item; @@ -13,6 +12,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.recipe.SmokingRecipe; import net.minecraft.util.Identifier; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Optional; @@ -26,8 +26,8 @@ public class DefaultSmokingDisplay implements RecipeDisplay<SmokingRecipe> { public DefaultSmokingDisplay(SmokingRecipe recipe) { this.display = recipe; - this.input = Lists.newArrayList(recipe.getPreviewInputs().stream().map(i -> Lists.newArrayList(i.getStackArray())).collect(Collectors.toList())); - input.add(FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getDefaultStack).collect(Collectors.toList())); + this.input = recipe.getPreviewInputs().stream().map(i -> Arrays.asList(i.getStackArray())).collect(Collectors.toList()); + this.input.add(FurnaceBlockEntity.createFuelTimeMap().keySet().stream().map(Item::getDefaultStack).collect(Collectors.toList())); this.output = Collections.singletonList(recipe.getOutput()); } diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultStoneCuttingDisplay.java b/src/main/java/me/shedaniel/rei/plugin/DefaultStoneCuttingDisplay.java index 53f78ac92..80776a44c 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultStoneCuttingDisplay.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultStoneCuttingDisplay.java @@ -5,7 +5,6 @@ package me.shedaniel.rei.plugin; -import com.google.common.collect.Lists; import me.shedaniel.rei.api.RecipeDisplay; import net.minecraft.item.ItemStack; import net.minecraft.recipe.Ingredient; @@ -13,6 +12,7 @@ import net.minecraft.recipe.StonecuttingRecipe; import net.minecraft.util.DefaultedList; import net.minecraft.util.Identifier; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Optional; @@ -20,7 +20,8 @@ import java.util.stream.Collectors; public class DefaultStoneCuttingDisplay implements RecipeDisplay<StonecuttingRecipe> { - private List<ItemStack> inputs, output; + private List<List<ItemStack>> inputs; + private List<ItemStack> output; private StonecuttingRecipe display; public DefaultStoneCuttingDisplay(StonecuttingRecipe recipe) { @@ -29,8 +30,7 @@ public class DefaultStoneCuttingDisplay implements RecipeDisplay<StonecuttingRec } public DefaultStoneCuttingDisplay(DefaultedList<Ingredient> ingredients, ItemStack output) { - this.inputs = Lists.newArrayList(); - ingredients.stream().map(i -> Lists.newArrayList(i.getStackArray())).collect(Collectors.toList()).forEach(inputs::addAll); + this.inputs = ingredients.stream().map(i -> Arrays.asList(i.getStackArray())).collect(Collectors.toList()); this.output = Collections.singletonList(output); } @@ -41,7 +41,7 @@ public class DefaultStoneCuttingDisplay implements RecipeDisplay<StonecuttingRec @Override public List<List<ItemStack>> getInput() { - return Collections.singletonList(inputs); + return inputs; } @Override |
