Package net.minestom.server.recipe
Record Class Recipe.Shaped
java.lang.Object
java.lang.Record
net.minestom.server.recipe.Recipe.Shaped
- All Implemented Interfaces:
Recipe.Data
- Enclosing class:
Recipe
public static record Recipe.Shaped(String group, RecipeCategory.Crafting category, int width, int height, List<Recipe.Ingredient> ingredients, ItemStack result, boolean showNotification)
extends Record
implements Recipe.Data
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionShaped(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.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.intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
Shaped
public Shaped(String group, RecipeCategory.Crafting category, int width, int height, List<Recipe.Ingredient> ingredients, ItemStack result, boolean showNotification) Creates an instance of aShapedrecord class.- Parameters:
group- 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
-
-
Method Details
-
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 '=='. -
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
-