Record Class DeclareRecipesPacket.DeclaredShapelessCraftingRecipe
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.DeclareRecipesPacket.DeclaredShapelessCraftingRecipe
- All Implemented Interfaces:
NetworkBuffer.Writer,DeclareRecipesPacket.DeclaredRecipe
- Enclosing class:
DeclareRecipesPacket
public static record DeclareRecipesPacket.DeclaredShapelessCraftingRecipe(@NotNull String recipeId, @NotNull String group, RecipeCategory.Crafting crafting, @NotNull List<DeclareRecipesPacket.Ingredient> ingredients, @NotNull ItemStack result)
extends Record
implements DeclareRecipesPacket.DeclaredRecipe
-
Constructor Summary
ConstructorsConstructorDescriptionDeclaredShapelessCraftingRecipe(@NotNull String recipeId, @NotNull String group, RecipeCategory.Crafting crafting, @NotNull List<DeclareRecipesPacket.Ingredient> ingredients, @NotNull ItemStack result) Creates an instance of aDeclaredShapelessCraftingReciperecord class. -
Method Summary
Modifier and TypeMethodDescriptioncrafting()Returns the value of thecraftingrecord 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.@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.final StringtoString()Returns a string representation of this record class.@NotNull Stringtype()voidwrite(@NotNull NetworkBuffer writer)
-
Constructor Details
-
DeclaredShapelessCraftingRecipe
public DeclaredShapelessCraftingRecipe(@NotNull @NotNull String recipeId, @NotNull @NotNull String group, @NotNull RecipeCategory.Crafting crafting, @NotNull @NotNull List<DeclareRecipesPacket.Ingredient> ingredients, @NotNull @NotNull ItemStack result) Creates an instance of aDeclaredShapelessCraftingReciperecord class.- Parameters:
recipeId- the value for therecipeIdrecord componentgroup- the value for thegrouprecord componentcrafting- the value for thecraftingrecord componentingredients- the value for theingredientsrecord componentresult- the value for theresultrecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
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
-
crafting
Returns the value of thecraftingrecord component.- Returns:
- the value of the
craftingrecord 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
-