Package net.minestom.server.recipe
Record Class Recipe.Smoking
java.lang.Object
java.lang.Record
net.minestom.server.recipe.Recipe.Smoking
- All Implemented Interfaces:
Recipe.Data
- Enclosing class:
Recipe
public static record Recipe.Smoking(String group, RecipeCategory.Cooking category, Recipe.Ingredient ingredient, ItemStack result, float experience, int cookingTime)
extends Record
implements Recipe.Data
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSmoking(String group, RecipeCategory.Cooking category, Recipe.Ingredient ingredient, ItemStack result, float experience, int cookingTime) Creates an instance of aSmokingrecord class. -
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.group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theingredientrecord component.result()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
Smoking
public Smoking(String group, RecipeCategory.Cooking category, Recipe.Ingredient ingredient, ItemStack result, float experience, int cookingTime) Creates an instance of aSmokingrecord class.- Parameters:
group- 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
-
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
-
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
-