Package net.minestom.server.recipe
Record Class Recipe.Shaped
java.lang.Object
java.lang.Record
net.minestom.server.recipe.Recipe.Shaped
- All Implemented Interfaces:
NetworkBuffer.Writer,Recipe
- Enclosing interface:
Recipe
public static record Recipe.Shaped(String id, String group, RecipeCategory.Crafting category, int width, int height, List<Recipe.Ingredient> ingredients, ItemStack result, boolean showNotification)
extends Record
implements Recipe
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.recipe.Recipe
Recipe.Blasting, Recipe.CampfireCooking, Recipe.Ingredient, Recipe.Shaped, Recipe.Shapeless, Recipe.Smelting, Recipe.SmithingTransform, Recipe.SmithingTrim, Recipe.Smoking, Recipe.Stonecutting -
Field Summary
Fields inherited from interface net.minestom.server.recipe.Recipe
MAX_INGREDIENTS -
Constructor Summary
ConstructorsConstructorDescriptionShaped(@NotNull String id, @NotNull NetworkBuffer reader) Shaped(String id, String group, RecipeCategory.Crafting category, int width, int height, List<Recipe.Ingredient> ingredients, ItemStack result, boolean showNotification) Creates an instance of aShapedrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.final booleanIndicates whether some other object is "equal to" this one.group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.id()Returns the value of theidrecord component.Returns the value of theingredientsrecord component.result()Returns the value of theresultrecord component.booleanReturns the value of theshowNotificationrecord component.final StringtoString()Returns a string representation of this record class.@NotNull RecipeTypetype()intwidth()Returns the value of thewidthrecord component.voidwrite(@NotNull NetworkBuffer writer)
-
Constructor Details
-
Shaped
public Shaped(String id, String group, RecipeCategory.Crafting category, int width, int height, List<Recipe.Ingredient> ingredients, ItemStack result, boolean showNotification) Creates an instance of aShapedrecord class.- Parameters:
id- the value for theidrecord componentgroup- the value for thegrouprecord componentcategory- the value for thecategoryrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentingredients- the value for theingredientsrecord componentresult- the value for theresultrecord componentshowNotification- the value for theshowNotificationrecord component
-
Shaped
-
-
Method Details
-
write
- Specified by:
writein interfaceNetworkBuffer.Writer
-
type
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component. -
group
Returns the value of thegrouprecord component.- Returns:
- the value of the
grouprecord component
-
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
ingredients
Returns the value of theingredientsrecord component.- Returns:
- the value of the
ingredientsrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
showNotification
public boolean showNotification()Returns the value of theshowNotificationrecord component.- Returns:
- the value of the
showNotificationrecord component
-