Class ConditionalRecipe

java.lang.Object
net.minecraftforge.common.crafting.ConditionalRecipe

public class ConditionalRecipe extends Object
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.
  • Field Details

    • CODEC

      private static com.mojang.serialization.Codec<Recipe<?>> CODEC
    • SERIALZIER

      public static final RecipeSerializer<Recipe<?>> SERIALZIER
  • Constructor Details

    • ConditionalRecipe

      public ConditionalRecipe()
  • Method Details