Package net.minecraft.resources
Record Class RegistryResourceAccess.ParsedEntry<E>
java.lang.Object
java.lang.Record
net.minecraft.resources.RegistryResourceAccess.ParsedEntry<E>
- Enclosing interface:
- RegistryResourceAccess
public static record RegistryResourceAccess.ParsedEntry<E>(E value, OptionalInt fixedId)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final OptionalInt
The field for thefixedId
record component.private final E
The field for thevalue
record component. -
Constructor Summary
ConstructorDescriptionParsedEntry
(E value, OptionalInt fixedId) Creates an instance of aParsedEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> RegistryResourceAccess.ParsedEntry<E>
createWithId
(E p_195959_, int p_195960_) static <E> RegistryResourceAccess.ParsedEntry<E>
createWithoutId
(E p_195957_) final boolean
Indicates whether some other object is "equal to" this one.fixedId()
Returns the value of thefixedId
record component.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Field Details
-
value
The field for thevalue
record component. -
fixedId
The field for thefixedId
record component.
-
-
Constructor Details
-
ParsedEntry
Creates an instance of aParsedEntry
record class.- Parameters:
value
- the value for thevalue
record componentfixedId
- the value for thefixedId
record component
-
-
Method Details
-
createWithoutId
-
createWithId
-
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)
. -
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
fixedId
Returns the value of thefixedId
record component.- Returns:
- the value of the
fixedId
record component
-