diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-03-14 22:21:10 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-03-14 22:21:10 +0800 |
| commit | b004addc44b1fff0fd83cf998aa618443e4e37ca (patch) | |
| tree | 0b98fee9066349a97c825dfd8fe96a5cb025ba8d /src/main/java/net/minecraft/recipe/REIBrewingRecipeRegistry.java | |
| parent | d0f4d495957d2454bdf43a64d31a21f06849e677 (diff) | |
| download | RoughlyEnoughItems-b004addc44b1fff0fd83cf998aa618443e4e37ca.tar.gz RoughlyEnoughItems-b004addc44b1fff0fd83cf998aa618443e4e37ca.tar.bz2 RoughlyEnoughItems-b004addc44b1fff0fd83cf998aa618443e4e37ca.zip | |
Update to 19w11a
Diffstat (limited to 'src/main/java/net/minecraft/recipe/REIBrewingRecipeRegistry.java')
| -rw-r--r-- | src/main/java/net/minecraft/recipe/REIBrewingRecipeRegistry.java | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/main/java/net/minecraft/recipe/REIBrewingRecipeRegistry.java b/src/main/java/net/minecraft/recipe/REIBrewingRecipeRegistry.java deleted file mode 100644 index 0622afa6e..000000000 --- a/src/main/java/net/minecraft/recipe/REIBrewingRecipeRegistry.java +++ /dev/null @@ -1,56 +0,0 @@ -package net.minecraft.recipe; - -import com.google.common.collect.Lists; -import me.shedaniel.rei.api.RecipeHelper; -import me.shedaniel.rei.plugin.BrewingRecipe; -import me.shedaniel.rei.plugin.DefaultBrewingDisplay; -import me.shedaniel.rei.plugin.DefaultPlugin; -import net.minecraft.item.Item; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionUtil; - -import java.util.Arrays; -import java.util.List; - -public class REIBrewingRecipeRegistry { - - public static void registerDisplays(RecipeHelper recipeHelper) { - List<Potion> registeredPotionTypes = Lists.newArrayList(); - List<BrewingRecipe> potionItemConversions = Lists.newArrayList(); - List<Ingredient> potionItems = REIPotionRecipeUtils.getPotionTypes(); - REIPotionRecipeUtils.getItemRecipes().forEach(o -> { - try { - Item input = (Item) REIPotionRecipeUtils.getInputFromRecipe(o); - Item output = (Item) REIPotionRecipeUtils.getOutputFromRecipe(o); - Ingredient reagent = REIPotionRecipeUtils.getIngredientFromRecipe(o); - potionItemConversions.add(new BrewingRecipe(input, reagent, output)); - } catch (Throwable throwable) { - throwable.printStackTrace(); - } - }); - REIPotionRecipeUtils.getPotionRecipes().forEach(o -> { - try { - Potion input = (Potion) REIPotionRecipeUtils.getInputFromRecipe(o); - Potion output = (Potion) REIPotionRecipeUtils.getOutputFromRecipe(o); - Ingredient ingredient = REIPotionRecipeUtils.getIngredientFromRecipe(o); - if (!registeredPotionTypes.contains(input)) - registerPotionType(recipeHelper, registeredPotionTypes, potionItemConversions, input); - if (!registeredPotionTypes.contains(output)) - registerPotionType(recipeHelper, registeredPotionTypes, potionItemConversions, output); - potionItems.stream().map(Ingredient::getStackArray).forEach(itemStacks -> Arrays.stream(itemStacks).forEach(stack -> { - recipeHelper.registerDisplay(DefaultPlugin.BREWING, new DefaultBrewingDisplay(PotionUtil.setPotion(stack.copy(), input), ingredient, PotionUtil.setPotion(stack.copy(), output))); - })); - } catch (Throwable throwable) { - throwable.printStackTrace(); - } - }); - } - - private static void registerPotionType(RecipeHelper recipeHelper, List<Potion> list, List<BrewingRecipe> potionItemConversions, Potion potion) { - list.add(potion); - potionItemConversions.forEach(recipe -> { - recipeHelper.registerDisplay(DefaultPlugin.BREWING, new DefaultBrewingDisplay(PotionUtil.setPotion(recipe.input.getDefaultStack(), potion), recipe.ingredient, PotionUtil.setPotion(recipe.output.getDefaultStack(), potion))); - }); - } - -} |
