Package net.minecraft.data.recipes
Class ShapelessRecipeBuilder
java.lang.Object
net.minecraft.data.recipes.ShapelessRecipeBuilder
- All Implemented Interfaces:
RecipeBuilder
- Direct Known Subclasses:
IngredientTests.CompressedShapelessRecipeBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RecipeCategory
private final int
private String
private final NonNullList
<Ingredient> private final Item
private final ItemStack
Fields inherited from interface net.minecraft.data.recipes.RecipeBuilder
ROOT_RECIPE_ADVANCEMENT
-
Constructor Summary
ConstructorsConstructorDescriptionShapelessRecipeBuilder
(RecipeCategory p_250837_, ItemStack result) ShapelessRecipeBuilder
(RecipeCategory pCategory, ItemLike pResult, int pCount) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Makes sure that this recipe is valid and obtainable.Adds an ingredient that can be any item in the given tag.requires
(Ingredient pIngredient) Adds an ingredient.requires
(Ingredient pIngredient, int pQuantity) Adds an ingredient multiple times.Adds an ingredient of the given item.Adds the given ingredient multiple times.void
save
(RecipeOutput pRecipeOutput, ResourceLocation pId) static ShapelessRecipeBuilder
shapeless
(RecipeCategory p_252339_, ItemStack result) static ShapelessRecipeBuilder
shapeless
(RecipeCategory pCategory, ItemLike pResult) Creates a new builder for a shapeless recipe.static ShapelessRecipeBuilder
shapeless
(RecipeCategory pCategory, ItemLike pResult, int pCount) Creates a new builder for a shapeless recipe.unlockedBy
(String pName, Criterion<?> pCriterion) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.data.recipes.RecipeBuilder
save, save
-
Field Details
-
category
-
result
-
count
private final int count -
resultStack
-
ingredients
-
criteria
-
group
-
-
Constructor Details
-
ShapelessRecipeBuilder
-
ShapelessRecipeBuilder
-
-
Method Details
-
shapeless
Creates a new builder for a shapeless recipe. -
shapeless
public static ShapelessRecipeBuilder shapeless(RecipeCategory pCategory, ItemLike pResult, int pCount) Creates a new builder for a shapeless recipe. -
shapeless
-
requires
Adds an ingredient that can be any item in the given tag. -
requires
Adds an ingredient of the given item. -
requires
Adds the given ingredient multiple times. -
requires
Adds an ingredient. -
requires
Adds an ingredient multiple times. -
unlockedBy
- Specified by:
unlockedBy
in interfaceRecipeBuilder
-
group
- Specified by:
group
in interfaceRecipeBuilder
-
getResult
- Specified by:
getResult
in interfaceRecipeBuilder
-
save
- Specified by:
save
in interfaceRecipeBuilder
-
ensureValid
Makes sure that this recipe is valid and obtainable.
-