Package net.minecraft.stats
Record Class ServerRecipeBook.Packed
java.lang.Object
java.lang.Record
net.minecraft.stats.ServerRecipeBook.Packed
- Enclosing class:
ServerRecipeBook
public static record ServerRecipeBook.Packed(RecipeBookSettings settings, List<ResourceKey<Recipe<?>>> known, List<ResourceKey<Recipe<?>>> highlight)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<ServerRecipeBook.Packed> private final List
<ResourceKey<Recipe<?>>> The field for thehighlight
record component.private final List
<ResourceKey<Recipe<?>>> The field for theknown
record component.private final RecipeBookSettings
The field for thesettings
record component. -
Constructor Summary
ConstructorsConstructorDescriptionPacked
(RecipeBookSettings settings, List<ResourceKey<Recipe<?>>> known, List<ResourceKey<Recipe<?>>> highlight) Creates an instance of aPacked
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.List
<ResourceKey<Recipe<?>>> Returns the value of thehighlight
record component.List
<ResourceKey<Recipe<?>>> known()
Returns the value of theknown
record component.settings()
Returns the value of thesettings
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
settings
The field for thesettings
record component. -
known
The field for theknown
record component. -
highlight
The field for thehighlight
record component. -
CODEC
-
-
Constructor Details
-
Packed
public Packed(RecipeBookSettings settings, List<ResourceKey<Recipe<?>>> known, List<ResourceKey<Recipe<?>>> highlight) Creates an instance of aPacked
record class.- Parameters:
settings
- the value for thesettings
record componentknown
- the value for theknown
record componenthighlight
- the value for thehighlight
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)
. -
settings
Returns the value of thesettings
record component.- Returns:
- the value of the
settings
record component
-
known
Returns the value of theknown
record component.- Returns:
- the value of the
known
record component
-
highlight
Returns the value of thehighlight
record component.- Returns:
- the value of the
highlight
record component
-