Class ProcessingRecipe<I extends net.minecraft.world.item.crafting.RecipeInput,P extends ProcessingRecipeParams>

java.lang.Object
com.simibubi.create.content.processing.recipe.ProcessingRecipe<I,P>
All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<I>
Direct Known Subclasses:
ItemApplicationRecipe, StandardProcessingRecipe

@ParametersAreNonnullByDefault public abstract class ProcessingRecipe<I extends net.minecraft.world.item.crafting.RecipeInput,P extends ProcessingRecipeParams> extends Object implements net.minecraft.world.item.crafting.Recipe<I>
  • Field Details

    • params

      protected P extends ProcessingRecipeParams params
    • ingredients

      protected net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> ingredients
    • results

      protected net.minecraft.core.NonNullList<ProcessingOutput> results
    • fluidIngredients

      protected net.minecraft.core.NonNullList<FluidIngredient> fluidIngredients
    • fluidResults

      protected net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.FluidStack> fluidResults
    • processingDuration

      protected int processingDuration
    • requiredHeat

      protected HeatCondition requiredHeat
  • Constructor Details

    • ProcessingRecipe

      public ProcessingRecipe(IRecipeTypeInfo typeInfo, P params)
  • Method Details

    • getMaxInputCount

      protected abstract int getMaxInputCount()
    • getMaxOutputCount

      protected abstract int getMaxOutputCount()
    • canRequireHeat

      protected boolean canRequireHeat()
    • canSpecifyDuration

      protected boolean canSpecifyDuration()
    • getMaxFluidInputCount

      protected int getMaxFluidInputCount()
    • getMaxFluidOutputCount

      protected int getMaxFluidOutputCount()
    • validate

      public List<String> validate()
    • getParams

      public P getParams()
    • getIngredients

      public net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> getIngredients()
      Specified by:
      getIngredients in interface net.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
    • getFluidIngredients

      public net.minecraft.core.NonNullList<FluidIngredient> getFluidIngredients()
    • getRollableResults

      public List<ProcessingOutput> getRollableResults()
    • getFluidResults

      public net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.FluidStack> getFluidResults()
    • getRollableResultsAsItemStacks

      public List<net.minecraft.world.item.ItemStack> getRollableResultsAsItemStacks()
    • enforceNextResult

      public void enforceNextResult(Supplier<net.minecraft.world.item.ItemStack> stack)
    • rollResults

      public List<net.minecraft.world.item.ItemStack> rollResults()
    • rollResults

      public List<net.minecraft.world.item.ItemStack> rollResults(List<ProcessingOutput> rollableResults)
    • getProcessingDuration

      public int getProcessingDuration()
    • getRequiredHeat

      public HeatCondition getRequiredHeat()
    • assemble

      public net.minecraft.world.item.ItemStack assemble(I t, net.minecraft.core.HolderLookup.Provider provider)
      Specified by:
      assemble in interface net.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
    • canCraftInDimensions

      public boolean canCraftInDimensions(int width, int height)
      Specified by:
      canCraftInDimensions in interface net.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
    • getResultItem

      public net.minecraft.world.item.ItemStack getResultItem(net.minecraft.core.HolderLookup.Provider provider)
      Specified by:
      getResultItem in interface net.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
    • isSpecial

      public boolean isSpecial()
      Specified by:
      isSpecial in interface net.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
    • getGroup

      public String getGroup()
      Specified by:
      getGroup in interface net.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
    • getSerializer

      public net.minecraft.world.item.crafting.RecipeSerializer<?> getSerializer()
      Specified by:
      getSerializer in interface net.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
    • getType

      public net.minecraft.world.item.crafting.RecipeType<?> getType()
      Specified by:
      getType in interface net.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
    • getTypeInfo

      public IRecipeTypeInfo getTypeInfo()
    • codec

      public static <P extends ProcessingRecipeParams, R extends ProcessingRecipe<?, P>> com.mojang.serialization.MapCodec<R> codec(ProcessingRecipe.Factory<P,R> factory, com.mojang.serialization.MapCodec<P> paramsCodec)
    • streamCodec

      public static <P extends ProcessingRecipeParams, R extends ProcessingRecipe<?, P>> net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,R> streamCodec(ProcessingRecipe.Factory<P,R> factory, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,P> streamCodec)