Class SingleStackRecipe

java.lang.Object
net.minecraft.recipe.SingleStackRecipe
All Implemented Interfaces:
Recipe<SingleStackRecipeInput>
Direct Known Subclasses:
AbstractCookingRecipe, StonecuttingRecipe

public abstract class SingleStackRecipe extends Object implements Recipe<SingleStackRecipeInput>
A recipe that has only one input ingredient. It can be used by any type of recipe as long as its subclass implements the proper interface.
Mappings:
Namespace Name
named net/minecraft/recipe/SingleStackRecipe
intermediary net/minecraft/class_3972
official dcv
  • Field Details

    • ingredient

      private final Ingredient ingredient
      Mappings:
      Namespace Name Mixin selector
      named ingredient Lnet/minecraft/recipe/SingleStackRecipe;ingredient:Lnet/minecraft/recipe/Ingredient;
      intermediary field_17642 Lnet/minecraft/class_3972;field_17642:Lnet/minecraft/class_1856;
      official c Ldcv;c:Ldbz;
    • result

      private final ItemStack result
      Mappings:
      Namespace Name Mixin selector
      named result Lnet/minecraft/recipe/SingleStackRecipe;result:Lnet/minecraft/item/ItemStack;
      intermediary field_17643 Lnet/minecraft/class_3972;field_17643:Lnet/minecraft/class_1799;
      official d Ldcv;d:Lcxo;
    • group

      private final String group
      Mappings:
      Namespace Name Mixin selector
      named group Lnet/minecraft/recipe/SingleStackRecipe;group:Ljava/lang/String;
      intermediary field_17645 Lnet/minecraft/class_3972;field_17645:Ljava/lang/String;
      official e Ldcv;e:Ljava/lang/String;
    • ingredientPlacement

      @Nullable private @Nullable IngredientPlacement ingredientPlacement
      Mappings:
      Namespace Name Mixin selector
      named ingredientPlacement Lnet/minecraft/recipe/SingleStackRecipe;ingredientPlacement:Lnet/minecraft/recipe/IngredientPlacement;
      intermediary field_52604 Lnet/minecraft/class_3972;field_52604:Lnet/minecraft/class_9887;
      official f Ldcv;f:Ldcc;
  • Constructor Details

    • SingleStackRecipe

      public SingleStackRecipe(String group, Ingredient ingredient, ItemStack result)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/recipe/SingleStackRecipe;<init>(Ljava/lang/String;Lnet/minecraft/recipe/Ingredient;Lnet/minecraft/item/ItemStack;)V
      intermediary <init> Lnet/minecraft/class_3972;<init>(Ljava/lang/String;Lnet/minecraft/class_1856;Lnet/minecraft/class_1799;)V
      official <init> Ldcv;<init>(Ljava/lang/String;Ldbz;Lcxo;)V
  • Method Details

    • getSerializer

      public abstract RecipeSerializer<? extends SingleStackRecipe> getSerializer()
      Returns the serializer associated with this recipe.
      Specified by:
      getSerializer in interface Recipe<SingleStackRecipeInput>
      Returns:
      the serializer associated with this recipe
      Mappings:
      Namespace Name Mixin selector
      named getSerializer Lnet/minecraft/recipe/Recipe;getSerializer()Lnet/minecraft/recipe/RecipeSerializer;
      intermediary method_8119 Lnet/minecraft/class_1860;method_8119()Lnet/minecraft/class_1865;
      official a Ldcd;a()Ldcn;
    • getType

      public abstract RecipeType<? extends SingleStackRecipe> getType()
      Returns the type of this recipe.

      The type in the recipe JSON format is the serializer instead.

      Specified by:
      getType in interface Recipe<SingleStackRecipeInput>
      Returns:
      the type of this recipe
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/recipe/Recipe;getType()Lnet/minecraft/recipe/RecipeType;
      intermediary method_17716 Lnet/minecraft/class_1860;method_17716()Lnet/minecraft/class_3956;
      official b Ldcd;b()Ldco;
    • matches

      public boolean matches(SingleStackRecipeInput singleStackRecipeInput, World world)
      Description copied from interface: Recipe
      Returns whether this recipe matches the contents inside the inventory in the given world.

      The world currently is only used by the map cloning recipe to prevent duplication of explorer maps.

      Specified by:
      matches in interface Recipe<SingleStackRecipeInput>
      Parameters:
      world - the input world
      Returns:
      whether this recipe matches the contents inside the inventory in the given world
      Mappings:
      Namespace Name Mixin selector
      named matches Lnet/minecraft/recipe/SingleStackRecipe;matches(Lnet/minecraft/recipe/input/SingleStackRecipeInput;Lnet/minecraft/world/World;)Z
      intermediary method_64719 Lnet/minecraft/class_3972;method_64719(Lnet/minecraft/class_9696;Lnet/minecraft/class_1937;)Z
      official a Ldcv;a(Ldcw;Ldhh;)Z
    • getGroup

      public String getGroup()
      Returns a group this recipe belongs in, or an empty string. This is only used by the recipe book.

      The group string is arbitrary, and is not rendered anywhere; in the recipe book, recipes with the same group will belong to the same cell in the grid of recipes. If the string is empty, this recipe will belong to its own cell.

      Specified by:
      getGroup in interface Recipe<SingleStackRecipeInput>
      Returns:
      a group this recipe belongs in, or an empty string
      Mappings:
      Namespace Name Mixin selector
      named getGroup Lnet/minecraft/recipe/Recipe;getGroup()Ljava/lang/String;
      intermediary method_8112 Lnet/minecraft/class_1860;method_8112()Ljava/lang/String;
      official j Ldcd;j()Ljava/lang/String;
    • ingredient

      public Ingredient ingredient()
      Mappings:
      Namespace Name Mixin selector
      named ingredient Lnet/minecraft/recipe/SingleStackRecipe;ingredient()Lnet/minecraft/recipe/Ingredient;
      intermediary method_64720 Lnet/minecraft/class_3972;method_64720()Lnet/minecraft/class_1856;
      official k Ldcv;k()Ldbz;
    • result

      protected ItemStack result()
      Mappings:
      Namespace Name Mixin selector
      named result Lnet/minecraft/recipe/SingleStackRecipe;result()Lnet/minecraft/item/ItemStack;
      intermediary method_64721 Lnet/minecraft/class_3972;method_64721()Lnet/minecraft/class_1799;
      official l Ldcv;l()Lcxo;
    • getIngredientPlacement

      public IngredientPlacement getIngredientPlacement()
      Specified by:
      getIngredientPlacement in interface Recipe<SingleStackRecipeInput>
      Mappings:
      Namespace Name Mixin selector
      named getIngredientPlacement Lnet/minecraft/recipe/Recipe;getIngredientPlacement()Lnet/minecraft/recipe/IngredientPlacement;
      intermediary method_61671 Lnet/minecraft/class_1860;method_61671()Lnet/minecraft/class_9887;
      official ap_ Ldcd;ap_()Ldcc;
    • craft

      public ItemStack craft(SingleStackRecipeInput singleStackRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup)
      Description copied from interface: Recipe
      Crafts this recipe.

      This method does not perform side effects on the inventory.

      This method should return a new item stack on each call.

      Specified by:
      craft in interface Recipe<SingleStackRecipeInput>
      Returns:
      the resulting item stack
      Mappings:
      Namespace Name Mixin selector
      named craft Lnet/minecraft/recipe/SingleStackRecipe;craft(Lnet/minecraft/recipe/input/SingleStackRecipeInput;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/item/ItemStack;
      intermediary method_59998 Lnet/minecraft/class_3972;method_59998(Lnet/minecraft/class_9696;Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_1799;
      official a Ldcv;a(Ldcw;Ljs$a;)Lcxo;