Class ConditionalRecipe
java.lang.Object
net.minecraftforge.common.crafting.ConditionalRecipe
So, A 'ConditionalRecipe' differs from all normal recipes in the fact that in addition to the conditions
disabling the entire recipe, it has sub-recipes that themselves have conditions.
And when being deserialized it returns the first entry that passes the conditional check.
This basically means that you can have muultiple variants all use the same recipe name, and
only one will ever be loaded.
This also means that you can wrap ALL recipes in a Conditional even those that don't explicitly
have support for them in their data gen.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
private static class
private static final record
private static final record
private static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.mojang.serialization.MapCodec
<Recipe<?>> static final RecipeSerializer
<Recipe<?>> -
Constructor Summary
-
Method Summary
-
Field Details
-
CODEC
-
SERIALZIER
-
-
Constructor Details
-
ConditionalRecipe
public ConditionalRecipe()
-
-
Method Details
-
builder
-