Record Class RecipeBookTestRecipe.Ingredients
java.lang.Object
java.lang.Record
net.neoforged.neoforge.oldtest.recipebook.RecipeBookTestRecipe.Ingredients
- Enclosing class:
RecipeBookTestRecipe
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<RecipeBookTestRecipe.Ingredients> private final String
The field for thegroup
record component.The field for thepattern
record component.private final Map
<String, Ingredient> The field for therecipe
record component.private final ItemStack
The field for theresult
record component. -
Constructor Summary
ConstructorDescriptionIngredients
(String group, List<String> pattern, Map<String, Ingredient> recipe, ItemStack result) Creates an instance of aIngredients
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.group()
Returns the value of thegroup
record component.final int
hashCode()
Returns a hash code value for this object.pattern()
Returns the value of thepattern
record component.recipe()
Returns the value of therecipe
record component.result()
Returns the value of theresult
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
group
The field for thegroup
record component. -
pattern
The field for thepattern
record component. -
recipe
The field for therecipe
record component. -
result
The field for theresult
record component. -
VERIFY_LENGTH_2
-
VERIFY_SIZE
-
VERIFY_LENGTH_1
-
CODEC
-
-
Constructor Details
-
Ingredients
public Ingredients(String group, List<String> pattern, Map<String, Ingredient> recipe, ItemStack result) Creates an instance of aIngredients
record class.- Parameters:
group
- the value for thegroup
record componentpattern
- the value for thepattern
record componentrecipe
- the value for therecipe
record componentresult
- the value for theresult
record 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. All components in this record class are compared withObjects::equals(Object,Object)
. -
group
Returns the value of thegroup
record component.- Returns:
- the value of the
group
record component
-
pattern
Returns the value of thepattern
record component.- Returns:
- the value of the
pattern
record component
-
recipe
Returns the value of therecipe
record component.- Returns:
- the value of the
recipe
record component
-
result
Returns the value of theresult
record component.- Returns:
- the value of the
result
record component
-