Record Class DeclareRecipesPacket.DeclaredShapedCraftingRecipe
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.DeclareRecipesPacket.DeclaredShapedCraftingRecipe
- All Implemented Interfaces:
NetworkBuffer.Writer,DeclareRecipesPacket.DeclaredRecipe
- Enclosing class:
DeclareRecipesPacket
public static record DeclareRecipesPacket.DeclaredShapedCraftingRecipe(@NotNull String recipeId, @NotNull String group, RecipeCategory.Crafting category, int width, int height, @NotNull List<DeclareRecipesPacket.Ingredient> ingredients, @NotNull ItemStack result, boolean showNotification)
extends Record
implements DeclareRecipesPacket.DeclaredRecipe
-
Constructor Summary
ConstructorsConstructorDescriptionDeclaredShapedCraftingRecipe(@NotNull String recipeId, @NotNull String group, RecipeCategory.Crafting category, int width, int height, @NotNull List<DeclareRecipesPacket.Ingredient> ingredients, @NotNull ItemStack result, boolean showNotification) Creates an instance of aDeclaredShapedCraftingReciperecord class.DeclaredShapedCraftingRecipe(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull Stringgroup()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.@NotNull List<DeclareRecipesPacket.Ingredient> Returns the value of theingredientsrecord component.@NotNull StringrecipeId()Returns the value of therecipeIdrecord component.@NotNull ItemStackresult()Returns the value of theresultrecord component.booleanReturns the value of theshowNotificationrecord component.final StringtoString()Returns a string representation of this record class.@NotNull Stringtype()intwidth()Returns the value of thewidthrecord component.voidwrite(@NotNull NetworkBuffer writer)
-
Constructor Details
-
DeclaredShapedCraftingRecipe
public DeclaredShapedCraftingRecipe(@NotNull @NotNull String recipeId, @NotNull @NotNull String group, @NotNull RecipeCategory.Crafting category, int width, int height, @NotNull @NotNull List<DeclareRecipesPacket.Ingredient> ingredients, @NotNull @NotNull ItemStack result, boolean showNotification) Creates an instance of aDeclaredShapedCraftingReciperecord class.- Parameters:
recipeId- the value for therecipeIdrecord 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
-
DeclaredShapedCraftingRecipe
-
-
Method Details
-
write
- Specified by:
writein interfaceNetworkBuffer.Writer
-
type
- Specified by:
typein interfaceDeclareRecipesPacket.DeclaredRecipe
-
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 '=='. -
recipeId
Returns the value of therecipeIdrecord component.- Specified by:
recipeIdin interfaceDeclareRecipesPacket.DeclaredRecipe- Returns:
- the value of the
recipeIdrecord 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
-