Record Class DeclareRecipesPacket.DeclaredSmeltingRecipe
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.DeclareRecipesPacket.DeclaredSmeltingRecipe
- All Implemented Interfaces:
NetworkBuffer.Writer,DeclareRecipesPacket.DeclaredRecipe
- Enclosing class:
DeclareRecipesPacket
public static record DeclareRecipesPacket.DeclaredSmeltingRecipe(@NotNull String recipeId, @NotNull String group, RecipeCategory.Cooking category, @NotNull DeclareRecipesPacket.Ingredient ingredient, @NotNull ItemStack result, float experience, int cookingTime)
extends Record
implements DeclareRecipesPacket.DeclaredRecipe
-
Constructor Summary
ConstructorsConstructorDescriptionDeclaredSmeltingRecipe(@NotNull String recipeId, @NotNull String group, RecipeCategory.Cooking category, @NotNull DeclareRecipesPacket.Ingredient ingredient, @NotNull ItemStack result, float experience, int cookingTime) Creates an instance of aDeclaredSmeltingReciperecord class.DeclaredSmeltingRecipe(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.intReturns the value of thecookingTimerecord component.final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of theexperiencerecord component.@NotNull Stringgroup()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.@NotNull DeclareRecipesPacket.IngredientReturns the value of theingredientrecord 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
-
DeclaredSmeltingRecipe
-
DeclaredSmeltingRecipe
public DeclaredSmeltingRecipe(@NotNull @NotNull String recipeId, @NotNull @NotNull String group, @NotNull RecipeCategory.Cooking category, @NotNull @NotNull DeclareRecipesPacket.Ingredient ingredient, @NotNull @NotNull ItemStack result, float experience, int cookingTime) Creates an instance of aDeclaredSmeltingReciperecord class.- Parameters:
recipeId- the value for therecipeIdrecord componentgroup- the value for thegrouprecord componentcategory- the value for thecategoryrecord componentingredient- the value for theingredientrecord componentresult- the value for theresultrecord componentexperience- the value for theexperiencerecord componentcookingTime- the value for thecookingTimerecord 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. 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
-
ingredient
Returns the value of theingredientrecord component.- Returns:
- the value of the
ingredientrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
experience
public float experience()Returns the value of theexperiencerecord component.- Returns:
- the value of the
experiencerecord component
-
cookingTime
public int cookingTime()Returns the value of thecookingTimerecord component.- Returns:
- the value of the
cookingTimerecord component
-