diff options
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java b/src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java deleted file mode 100644 index 7e9a3e075..000000000 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultShapedDisplay.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Roughly Enough Items by Danielshe. - * Licensed under the MIT License. - */ - -package me.shedaniel.rei.plugin; - -import net.minecraft.item.ItemStack; -import net.minecraft.recipe.Recipe; -import net.minecraft.recipe.ShapedRecipe; -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 DefaultShapedDisplay implements DefaultCraftingDisplay<ShapedRecipe> { - - private ShapedRecipe display; - private List<List<ItemStack>> input; - private List<ItemStack> output; - - public DefaultShapedDisplay(ShapedRecipe recipe) { - this.display = recipe; - this.input = recipe.getPreviewInputs().stream().map(i -> Arrays.asList(i.getStackArray())).collect(Collectors.toList()); - this.output = Collections.singletonList(recipe.getOutput()); - } - - @Override - public Optional<Identifier> getRecipeLocation() { - return Optional.ofNullable(display).map(ShapedRecipe::getId); - } - - @Override - public List<List<ItemStack>> getInput() { - return input; - } - - @Override - public List<ItemStack> getOutput() { - return output; - } - - @Override - public List<List<ItemStack>> getRequiredItems() { - return input; - } - - @Override - public int getHeight() { - return display.getHeight(); - } - - @Override - public int getWidth() { - return display.getWidth(); - } - -} |
