Class MekanismRecipeHandler<R extends mekanism.api.recipes.MekanismRecipe>

java.lang.Object
org.cyclops.integratedmekanismics.capability.recipehandler.MekanismRecipeHandler<R>
All Implemented Interfaces:
org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeHandler
Direct Known Subclasses:
ChemicalChemicalToChemicalRecipeHandler, ChemicalCrystallizerRecipeHandler, ChemicalDissolutionRecipeHandler, ChemicalToChemicalRecipeHandler, CombinerRecipeHandler, FluidChemicalToChemicalRecipeHandler, FluidToFluidRecipeHandler, ItemChemicalToItemRecipeHandler, ItemToChemicalRecipeHandler, ItemToItemRecipeHandler, PressurizedReactionRecipeHandler, RotaryRecipeHandler, SawmillRecipeHandler, SeparatingRecipeHandler

public abstract class MekanismRecipeHandler<R extends mekanism.api.recipes.MekanismRecipe> extends Object implements org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeHandler
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static Map<Class<?>,Collection<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition>>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    MekanismRecipeHandler(mekanism.common.recipe.IMekanismRecipeTypeProvider<? extends R,?> recipeType, Supplier<net.minecraft.world.level.Level> levelSupplier, Set<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>> inputComponents, Set<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>> outputComponents)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract boolean
    doesRecipeMatchInput(R recipe, org.cyclops.commoncapabilities.api.ingredient.IMixedIngredients input)
     
    net.minecraft.world.level.Level
     
    static List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<mekanism.api.chemical.ChemicalStack<?>,Integer>>
    getPrototypesFromChemicalIngredient(mekanism.api.recipes.ingredients.ChemicalStackIngredient<?,?> ingredient)
     
    static List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<net.minecraftforge.fluids.FluidStack,Integer>>
    getPrototypesFromFluidIngredient(mekanism.api.recipes.ingredients.InputIngredient<net.minecraftforge.fluids.FluidStack> ingredient)
     
    static List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<net.minecraft.world.item.ItemStack,Integer>>
    getPrototypesFromItemIngredient(mekanism.api.recipes.ingredients.InputIngredient<net.minecraft.world.item.ItemStack> ingredient)
     
    Set<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>>
     
    Set<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>>
     
    final Collection<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition>
     
    Collection<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition>
     
    mekanism.common.recipe.IMekanismRecipeTypeProvider<? extends R,?>
     
    protected boolean
    isValid(R recipe)
     
    protected abstract void
    recipeToInputs(R recipe, Map<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>,List<org.cyclops.commoncapabilities.api.capability.recipehandler.IPrototypedIngredientAlternatives<?,?>>> inputs)
     
    protected abstract void
    recipeToOutputs(R recipe, Map<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>,List<?>> outputs)
     
    protected abstract void
    recipeToOutputsSimulated(R recipe, org.cyclops.commoncapabilities.api.ingredient.IMixedIngredients input, Map<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>,List<?>> outputs)
     
    @Nullable org.cyclops.commoncapabilities.api.ingredient.IMixedIngredients
    simulate(org.cyclops.commoncapabilities.api.ingredient.IMixedIngredients input)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeHandler

    isValidSizeInput, simulate
  • Field Details

    • CACHED_RECIPES

      public static Map<Class<?>,Collection<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition>> CACHED_RECIPES
  • Constructor Details

    • MekanismRecipeHandler

      protected MekanismRecipeHandler(mekanism.common.recipe.IMekanismRecipeTypeProvider<? extends R,?> recipeType, Supplier<net.minecraft.world.level.Level> levelSupplier, Set<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>> inputComponents, Set<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>> outputComponents)
  • Method Details

    • getRecipeType

      public mekanism.common.recipe.IMekanismRecipeTypeProvider<? extends R,?> getRecipeType()
    • getLevel

      public net.minecraft.world.level.Level getLevel()
    • getRecipeInputComponents

      public Set<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>> getRecipeInputComponents()
      Specified by:
      getRecipeInputComponents in interface org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeHandler
    • getRecipeOutputComponents

      public Set<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>> getRecipeOutputComponents()
      Specified by:
      getRecipeOutputComponents in interface org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeHandler
    • getRecipes

      public final Collection<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition> getRecipes()
      Specified by:
      getRecipes in interface org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeHandler
    • getRecipesUncached

      public Collection<org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeDefinition> getRecipesUncached()
    • isValid

      protected boolean isValid(R recipe)
    • simulate

      @Nullable public @Nullable org.cyclops.commoncapabilities.api.ingredient.IMixedIngredients simulate(org.cyclops.commoncapabilities.api.ingredient.IMixedIngredients input)
      Specified by:
      simulate in interface org.cyclops.commoncapabilities.api.capability.recipehandler.IRecipeHandler
    • recipeToInputs

      protected abstract void recipeToInputs(R recipe, Map<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>,List<org.cyclops.commoncapabilities.api.capability.recipehandler.IPrototypedIngredientAlternatives<?,?>>> inputs)
    • recipeToOutputs

      protected abstract void recipeToOutputs(R recipe, Map<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>,List<?>> outputs)
    • recipeToOutputsSimulated

      protected abstract void recipeToOutputsSimulated(R recipe, org.cyclops.commoncapabilities.api.ingredient.IMixedIngredients input, Map<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>,List<?>> outputs)
    • doesRecipeMatchInput

      protected abstract boolean doesRecipeMatchInput(R recipe, org.cyclops.commoncapabilities.api.ingredient.IMixedIngredients input)
    • getPrototypesFromChemicalIngredient

      public static List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<mekanism.api.chemical.ChemicalStack<?>,Integer>> getPrototypesFromChemicalIngredient(mekanism.api.recipes.ingredients.ChemicalStackIngredient<?,?> ingredient)
    • getPrototypesFromItemIngredient

      public static List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<net.minecraft.world.item.ItemStack,Integer>> getPrototypesFromItemIngredient(mekanism.api.recipes.ingredients.InputIngredient<net.minecraft.world.item.ItemStack> ingredient)
    • getPrototypesFromFluidIngredient

      public static List<org.cyclops.commoncapabilities.api.ingredient.IPrototypedIngredient<net.minecraftforge.fluids.FluidStack,Integer>> getPrototypesFromFluidIngredient(mekanism.api.recipes.ingredients.InputIngredient<net.minecraftforge.fluids.FluidStack> ingredient)