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>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceProcessingRecipe.Factory<P extends ProcessingRecipeParams,R extends ProcessingRecipe<?, P>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.crafting.SizedFluidIngredient> protected net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.FluidStack> protected net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> protected Pprotected intprotected HeatConditionprotected net.minecraft.core.NonNullList<ProcessingOutput> Fields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, CONDITIONAL_CODEC, STREAM_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStackbooleancanCraftInDimensions(int width, int height) protected booleanprotected booleanstatic <P extends ProcessingRecipeParams,R extends ProcessingRecipe<?, P>>
com.mojang.serialization.MapCodec<R> codec(ProcessingRecipe.Factory<P, R> factory, com.mojang.serialization.MapCodec<P> paramsCodec) voidenforceNextResult(Supplier<net.minecraft.world.item.ItemStack> stack) net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.crafting.SizedFluidIngredient> net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.FluidStack> getGroup()net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> protected intprotected intprotected abstract intprotected abstract intintnet.minecraft.world.item.ItemStackgetResultItem(net.minecraft.core.HolderLookup.Provider provider) List<net.minecraft.world.item.ItemStack> net.minecraft.world.item.crafting.RecipeSerializer<?> net.minecraft.world.item.crafting.RecipeType<?> getType()booleanList<net.minecraft.world.item.ItemStack> rollResults(List<ProcessingOutput> rollableResults, net.minecraft.util.RandomSource randomSource) List<net.minecraft.world.item.ItemStack> rollResults(net.minecraft.util.RandomSource randomSource) 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) validate()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.item.crafting.Recipe
getRemainingItems, getToastSymbol, isIncomplete, matches, showNotification
-
Field Details
-
params
-
ingredients
protected net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> ingredients -
results
-
fluidIngredients
protected net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.crafting.SizedFluidIngredient> fluidIngredients -
fluidResults
protected net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.FluidStack> fluidResults -
processingDuration
protected int processingDuration -
requiredHeat
-
-
Constructor Details
-
ProcessingRecipe
-
-
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
-
getParams
-
getIngredients
public net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> getIngredients()- Specified by:
getIngredientsin interfacenet.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
-
getFluidIngredients
public net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.crafting.SizedFluidIngredient> getFluidIngredients() -
getRollableResults
-
getFluidResults
public net.minecraft.core.NonNullList<net.neoforged.neoforge.fluids.FluidStack> getFluidResults() -
getRollableResultsAsItemStacks
-
enforceNextResult
-
rollResults
public List<net.minecraft.world.item.ItemStack> rollResults(net.minecraft.util.RandomSource randomSource) -
rollResults
public List<net.minecraft.world.item.ItemStack> rollResults(List<ProcessingOutput> rollableResults, net.minecraft.util.RandomSource randomSource) -
getProcessingDuration
public int getProcessingDuration() -
getRequiredHeat
-
assemble
public net.minecraft.world.item.ItemStack assemble(I t, net.minecraft.core.HolderLookup.Provider provider) - Specified by:
assemblein interfacenet.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
-
canCraftInDimensions
public boolean canCraftInDimensions(int width, int height) - Specified by:
canCraftInDimensionsin interfacenet.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:
getResultItemin interfacenet.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
-
isSpecial
public boolean isSpecial()- Specified by:
isSpecialin interfacenet.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
-
getGroup
- Specified by:
getGroupin interfacenet.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
-
getSerializer
public net.minecraft.world.item.crafting.RecipeSerializer<?> getSerializer()- Specified by:
getSerializerin interfacenet.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
-
getType
public net.minecraft.world.item.crafting.RecipeType<?> getType()- Specified by:
getTypein interfacenet.minecraft.world.item.crafting.Recipe<I extends net.minecraft.world.item.crafting.RecipeInput>
-
getTypeInfo
-
codec
public static <P extends ProcessingRecipeParams,R extends ProcessingRecipe<?, com.mojang.serialization.MapCodec<R> codecP>> (ProcessingRecipe.Factory<P, R> factory, com.mojang.serialization.MapCodec<P> paramsCodec) -
streamCodec
public static <P extends ProcessingRecipeParams,R extends ProcessingRecipe<?, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,P>> R> streamCodec(ProcessingRecipe.Factory<P, R> factory, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, P> streamCodec)
-