Interface RecipeType<T extends Recipe<?>>

Type Parameters:
T - the common supertype of recipes within a recipe type

public interface RecipeType<T extends Recipe<?>>
The recipe type allows matching recipes more efficiently by only checking recipes under a given type.
Mappings:
Namespace Name
official bxr
intermediary net/minecraft/class_3956
named net/minecraft/recipe/RecipeType
  • Field Details

    • CRAFTING

      static final RecipeType<CraftingRecipe> CRAFTING
      Mappings:
      Namespace Name Mixin selector
      official a Lbxr;a:Lbxr;
      intermediary field_17545 Lnet/minecraft/class_3956;field_17545:Lnet/minecraft/class_3956;
      named CRAFTING Lnet/minecraft/recipe/RecipeType;CRAFTING:Lnet/minecraft/recipe/RecipeType;
    • SMELTING

      static final RecipeType<SmeltingRecipe> SMELTING
      Mappings:
      Namespace Name Mixin selector
      official b Lbxr;b:Lbxr;
      intermediary field_17546 Lnet/minecraft/class_3956;field_17546:Lnet/minecraft/class_3956;
      named SMELTING Lnet/minecraft/recipe/RecipeType;SMELTING:Lnet/minecraft/recipe/RecipeType;
    • BLASTING

      static final RecipeType<BlastingRecipe> BLASTING
      Mappings:
      Namespace Name Mixin selector
      official c Lbxr;c:Lbxr;
      intermediary field_17547 Lnet/minecraft/class_3956;field_17547:Lnet/minecraft/class_3956;
      named BLASTING Lnet/minecraft/recipe/RecipeType;BLASTING:Lnet/minecraft/recipe/RecipeType;
    • SMOKING

      static final RecipeType<SmokingRecipe> SMOKING
      Mappings:
      Namespace Name Mixin selector
      official d Lbxr;d:Lbxr;
      intermediary field_17548 Lnet/minecraft/class_3956;field_17548:Lnet/minecraft/class_3956;
      named SMOKING Lnet/minecraft/recipe/RecipeType;SMOKING:Lnet/minecraft/recipe/RecipeType;
    • CAMPFIRE_COOKING

      static final RecipeType<CampfireCookingRecipe> CAMPFIRE_COOKING
      Mappings:
      Namespace Name Mixin selector
      official e Lbxr;e:Lbxr;
      intermediary field_17549 Lnet/minecraft/class_3956;field_17549:Lnet/minecraft/class_3956;
      named CAMPFIRE_COOKING Lnet/minecraft/recipe/RecipeType;CAMPFIRE_COOKING:Lnet/minecraft/recipe/RecipeType;
    • STONECUTTING

      static final RecipeType<StonecuttingRecipe> STONECUTTING
      Mappings:
      Namespace Name Mixin selector
      official f Lbxr;f:Lbxr;
      intermediary field_17641 Lnet/minecraft/class_3956;field_17641:Lnet/minecraft/class_3956;
      named STONECUTTING Lnet/minecraft/recipe/RecipeType;STONECUTTING:Lnet/minecraft/recipe/RecipeType;
    • SMITHING

      static final RecipeType<SmithingRecipe> SMITHING
      Mappings:
      Namespace Name Mixin selector
      official g Lbxr;g:Lbxr;
      intermediary field_25388 Lnet/minecraft/class_3956;field_25388:Lnet/minecraft/class_3956;
      named SMITHING Lnet/minecraft/recipe/RecipeType;SMITHING:Lnet/minecraft/recipe/RecipeType;
  • Method Details

    • register

      static <T extends Recipe<?>> RecipeType<T> register(String id)
      Mappings:
      Namespace Name Mixin selector
      official a Lbxr;a(Ljava/lang/String;)Lbxr;
      intermediary method_17726 Lnet/minecraft/class_3956;method_17726(Ljava/lang/String;)Lnet/minecraft/class_3956;
      named register Lnet/minecraft/recipe/RecipeType;register(Ljava/lang/String;)Lnet/minecraft/recipe/RecipeType;
    • match

      default <C extends Inventory> Optional<T> match(Recipe<C> recipe, World world, C inventory)
      Returns the given recipe if it matches, otherwise empty.

      This utility method casts the recipe from Recipe<C> to T conveniently.

      Parameters:
      recipe - the recipe to match and cast
      world - the input world
      inventory - the input inventory
      Returns:
      the given recipe if it matches, otherwise empty
      Mappings:
      Namespace Name Mixin selector
      official a Lbxr;a(Lbxo;Lcav;Lawa;)Ljava/util/Optional;
      intermediary method_17725 Lnet/minecraft/class_3956;method_17725(Lnet/minecraft/class_1860;Lnet/minecraft/class_1937;Lnet/minecraft/class_1263;)Ljava/util/Optional;
      named match Lnet/minecraft/recipe/RecipeType;match(Lnet/minecraft/recipe/Recipe;Lnet/minecraft/world/World;Lnet/minecraft/inventory/Inventory;)Ljava/util/Optional;