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 SummaryConstructorsConstructorDescriptionDeclaredShapedCraftingRecipe(@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 SummaryModifier 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- 
DeclaredShapedCraftingRecipepublic 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 the- recipeIdrecord component
- group- the value for the- grouprecord component
- category- the value for the- categoryrecord component
- width- the value for the- widthrecord component
- height- the value for the- heightrecord component
- ingredients- the value for the- ingredientsrecord component
- result- the value for the- resultrecord component
- showNotification- the value for the- showNotificationrecord component
 
- 
DeclaredShapedCraftingRecipe
 
- 
- 
Method Details- 
write- Specified by:
- writein interface- NetworkBuffer.Writer
 
- 
type- Specified by:
- typein interface- DeclareRecipesPacket.DeclaredRecipe
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
recipeIdReturns the value of therecipeIdrecord component.- Specified by:
- recipeIdin interface- DeclareRecipesPacket.DeclaredRecipe
- Returns:
- the value of the recipeIdrecord component
 
- 
groupReturns the value of thegrouprecord component.- Returns:
- the value of the grouprecord component
 
- 
categoryReturns the value of thecategoryrecord component.- Returns:
- the value of the categoryrecord component
 
- 
widthpublic int width()Returns the value of thewidthrecord component.- Returns:
- the value of the widthrecord component
 
- 
heightpublic int height()Returns the value of theheightrecord component.- Returns:
- the value of the heightrecord component
 
- 
ingredientsReturns the value of theingredientsrecord component.- Returns:
- the value of the ingredientsrecord component
 
- 
resultReturns the value of theresultrecord component.- Returns:
- the value of the resultrecord component
 
- 
showNotificationpublic boolean showNotification()Returns the value of theshowNotificationrecord component.- Returns:
- the value of the showNotificationrecord component
 
 
-