package me.shedaniel.rei.plugin; import com.google.common.collect.Lists; import net.minecraft.item.ItemStack; import net.minecraft.recipe.crafting.ShapedRecipe; import java.util.Arrays; import java.util.List; public class DefaultShapedDisplay implements DefaultCraftingDisplay { private ShapedRecipe display; private List> input; private List output; 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()); } @Override public ShapedRecipe getRecipe() { return display; } @Override public List> getInput() { return input; } @Override public List getOutput() { return output; } @Override public List> getRequiredItems() { return input; } }