Package net.minecraft.recipe
Class SingleStackRecipe
java.lang.Object
net.minecraft.recipe.SingleStackRecipe
- All Implemented Interfaces:
Recipe<SingleStackRecipeInput>
- Direct Known Subclasses:
AbstractCookingRecipe,StonecuttingRecipe
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/SingleStackRecipeintermediary net/minecraft/class_3972official dft
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final Ingredientprivate @Nullable IngredientPlacementprivate final ItemStackFields inherited from interface net.minecraft.recipe.Recipe
CODEC, KEY_CODEC, PACKET_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncraft(SingleStackRecipeInput singleStackRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) Crafts this recipe.getGroup()Returns a group this recipe belongs in, or an empty string.abstract RecipeSerializer<? extends SingleStackRecipe> Returns the serializer associated with this recipe.abstract RecipeType<? extends SingleStackRecipe> getType()Returns the type of this recipe.booleanmatches(SingleStackRecipeInput singleStackRecipeInput, World world) Returns whether this recipe matches the contents inside theinventoryin the givenworld.protected ItemStackresult()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.recipe.Recipe
getDisplays, getRecipeBookCategory, isIgnoredInRecipeBook, showNotification
-
Field Details
-
ingredient
- Mappings:
Namespace Name Mixin selector named ingredientLnet/minecraft/recipe/SingleStackRecipe;ingredient:Lnet/minecraft/recipe/Ingredient;intermediary field_17642Lnet/minecraft/class_3972;field_17642:Lnet/minecraft/class_1856;official dLdft;d:Ldex;
-
result
- Mappings:
Namespace Name Mixin selector named resultLnet/minecraft/recipe/SingleStackRecipe;result:Lnet/minecraft/item/ItemStack;intermediary field_17643Lnet/minecraft/class_3972;field_17643:Lnet/minecraft/class_1799;official eLdft;e:Ldak;
-
group
- Mappings:
Namespace Name Mixin selector named groupLnet/minecraft/recipe/SingleStackRecipe;group:Ljava/lang/String;intermediary field_17645Lnet/minecraft/class_3972;field_17645:Ljava/lang/String;official fLdft;f:Ljava/lang/String;
-
ingredientPlacement
- Mappings:
Namespace Name Mixin selector named ingredientPlacementLnet/minecraft/recipe/SingleStackRecipe;ingredientPlacement:Lnet/minecraft/recipe/IngredientPlacement;intermediary field_52604Lnet/minecraft/class_3972;field_52604:Lnet/minecraft/class_9887;official gLdft;g:Ldfa;
-
-
Constructor Details
-
SingleStackRecipe
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/recipe/SingleStackRecipe;<init>(Ljava/lang/String;Lnet/minecraft/recipe/Ingredient;Lnet/minecraft/item/ItemStack;)Vintermediary <init>Lnet/minecraft/class_3972;<init>(Ljava/lang/String;Lnet/minecraft/class_1856;Lnet/minecraft/class_1799;)Vofficial <init>Ldft;<init>(Ljava/lang/String;Ldex;Ldak;)V
-
-
Method Details
-
getSerializer
Returns the serializer associated with this recipe.- Specified by:
getSerializerin interfaceRecipe<SingleStackRecipeInput>- Returns:
- the serializer associated with this recipe
- Mappings:
Namespace Name Mixin selector named getSerializerLnet/minecraft/recipe/Recipe;getSerializer()Lnet/minecraft/recipe/RecipeSerializer;intermediary method_8119Lnet/minecraft/class_1860;method_8119()Lnet/minecraft/class_1865;official aLdfb;a()Ldfl;
-
getType
Returns the type of this recipe.The
typein the recipe JSON format is the serializer instead.- Specified by:
getTypein interfaceRecipe<SingleStackRecipeInput>- Returns:
- the type of this recipe
- Mappings:
Namespace Name Mixin selector named getTypeLnet/minecraft/recipe/Recipe;getType()Lnet/minecraft/recipe/RecipeType;intermediary method_17716Lnet/minecraft/class_1860;method_17716()Lnet/minecraft/class_3956;official bLdfb;b()Ldfm;
-
matches
Description copied from interface:RecipeReturns whether this recipe matches the contents inside theinventoryin the givenworld.The
worldcurrently is only used by the map cloning recipe to prevent duplication of explorer maps.- Specified by:
matchesin interfaceRecipe<SingleStackRecipeInput>- Parameters:
world- the input world- Returns:
- whether this recipe matches the contents inside the
inventoryin the givenworld - Mappings:
Namespace Name Mixin selector named matchesLnet/minecraft/recipe/SingleStackRecipe;matches(Lnet/minecraft/recipe/input/SingleStackRecipeInput;Lnet/minecraft/world/World;)Zintermediary method_64719Lnet/minecraft/class_3972;method_64719(Lnet/minecraft/class_9696;Lnet/minecraft/class_1937;)Zofficial aLdft;a(Ldfu;Ldkj;)Z
-
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:
getGroupin interfaceRecipe<SingleStackRecipeInput>- Returns:
- a group this recipe belongs in, or an empty string
- Mappings:
Namespace Name Mixin selector named getGroupLnet/minecraft/recipe/Recipe;getGroup()Ljava/lang/String;intermediary method_8112Lnet/minecraft/class_1860;method_8112()Ljava/lang/String;official jLdfb;j()Ljava/lang/String;
-
ingredient
- Mappings:
Namespace Name Mixin selector named ingredientLnet/minecraft/recipe/SingleStackRecipe;ingredient()Lnet/minecraft/recipe/Ingredient;intermediary method_64720Lnet/minecraft/class_3972;method_64720()Lnet/minecraft/class_1856;official kLdft;k()Ldex;
-
result
- Mappings:
Namespace Name Mixin selector named resultLnet/minecraft/recipe/SingleStackRecipe;result()Lnet/minecraft/item/ItemStack;intermediary method_64721Lnet/minecraft/class_3972;method_64721()Lnet/minecraft/class_1799;official lLdft;l()Ldak;
-
getIngredientPlacement
- Specified by:
getIngredientPlacementin interfaceRecipe<SingleStackRecipeInput>- Mappings:
Namespace Name Mixin selector named getIngredientPlacementLnet/minecraft/recipe/Recipe;getIngredientPlacement()Lnet/minecraft/recipe/IngredientPlacement;intermediary method_61671Lnet/minecraft/class_1860;method_61671()Lnet/minecraft/class_9887;official al_Ldfb;al_()Ldfa;
-
craft
public ItemStack craft(SingleStackRecipeInput singleStackRecipeInput, RegistryWrapper.WrapperLookup wrapperLookup) Description copied from interface:RecipeCrafts 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:
craftin interfaceRecipe<SingleStackRecipeInput>- Returns:
- the resulting item stack
- Mappings:
Namespace Name Mixin selector named craftLnet/minecraft/recipe/SingleStackRecipe;craft(Lnet/minecraft/recipe/input/SingleStackRecipeInput;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/item/ItemStack;intermediary method_59998Lnet/minecraft/class_3972;method_59998(Lnet/minecraft/class_9696;Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_1799;official aLdft;a(Ldfu;Lji$a;)Ldak;
-