diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-06-14 22:10:42 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-06-14 22:10:42 +0800 |
| commit | 69a531030df74768d86025cd5668e0418a3c1f07 (patch) | |
| tree | f128d5b07b0a8cfa8f02def50477ce8bfef4a50e /src/main/java/me/shedaniel/rei/plugin/DefaultCampfireDisplay.java | |
| parent | 5c29f7917d71dc0042ee2b71a1f7ba4f4c347fde (diff) | |
| download | RoughlyEnoughItems-69a531030df74768d86025cd5668e0418a3c1f07.tar.gz RoughlyEnoughItems-69a531030df74768d86025cd5668e0418a3c1f07.tar.bz2 RoughlyEnoughItems-69a531030df74768d86025cd5668e0418a3c1f07.zip | |
stuff
Diffstat (limited to 'src/main/java/me/shedaniel/rei/plugin/DefaultCampfireDisplay.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/plugin/DefaultCampfireDisplay.java | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultCampfireDisplay.java b/src/main/java/me/shedaniel/rei/plugin/DefaultCampfireDisplay.java deleted file mode 100644 index 86ab7a26a..000000000 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultCampfireDisplay.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Roughly Enough Items by Danielshe. - * Licensed under the MIT License. - */ - -package me.shedaniel.rei.plugin; - -import me.shedaniel.rei.api.RecipeDisplay; -import net.minecraft.item.ItemStack; -import net.minecraft.recipe.AbstractCookingRecipe; -import net.minecraft.recipe.CampfireCookingRecipe; -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<List<ItemStack>> inputs; - private List<ItemStack> output; - private int cookTime; - private CampfireCookingRecipe display; - - public DefaultCampfireDisplay(CampfireCookingRecipe recipe) { - this(recipe.getPreviewInputs(), recipe.getOutput(), recipe.getCookTime()); - this.display = recipe; - } - - public DefaultCampfireDisplay(DefaultedList<Ingredient> ingredients, ItemStack output, int cookTime) { - this.inputs = ingredients.stream().map(i -> Arrays.asList(i.getStackArray())).collect(Collectors.toList()); - this.output = Collections.singletonList(output); - this.cookTime = cookTime; - } - - public int getCookTime() { - return cookTime; - } - - @Override - public Optional<Identifier> getRecipeLocation() { - return Optional.ofNullable(display).map(AbstractCookingRecipe::getId); - } - - @Override - public List<List<ItemStack>> getInput() { - return inputs; - } - - @Override - public List<ItemStack> getOutput() { - return this.output; - } - - @Override - public Identifier getRecipeCategory() { - return DefaultPlugin.CAMPFIRE; - } - - @Override - public List<List<ItemStack>> getRequiredItems() { - return getInput(); - } - -} |
