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
FieldsModifier and TypeFieldDescriptionprivate final OptionalIntThe field for thefixedIdrecord component.private final EThe field for thevaluerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionParsedEntry(E value, OptionalInt fixedId) Creates an instance of aParsedEntryrecord 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 booleanIndicates whether some other object is "equal to" this one.fixedId()Returns the value of thefixedIdrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
value
The field for thevaluerecord component. -
fixedId
The field for thefixedIdrecord component.
-
-
Constructor Details
-
ParsedEntry
Creates an instance of aParsedEntryrecord class.- Parameters:
value- the value for thevaluerecord componentfixedId- the value for thefixedIdrecord 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 thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
fixedId
Returns the value of thefixedIdrecord component.- Returns:
- the value of the
fixedIdrecord component
-