Package net.minecraftforge.registries
Record Class ObjectHolderRegistry.VanillaObjectHolderData
java.lang.Object
java.lang.Record
net.minecraftforge.registries.ObjectHolderRegistry.VanillaObjectHolderData
- Enclosing class:
- ObjectHolderRegistry
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateVanillaObjectHolderData(String holderClass, String registryName, String registryType) Creates an instance of aVanillaObjectHolderDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theholderClassrecord component.Returns the value of theregistryNamerecord component.Returns the value of theregistryTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
holderClass
The field for theholderClassrecord component. -
registryName
The field for theregistryNamerecord component. -
registryType
The field for theregistryTyperecord component.
-
-
Constructor Details
-
VanillaObjectHolderData
Creates an instance of aVanillaObjectHolderDatarecord class.- Parameters:
holderClass- the value for theholderClassrecord componentregistryName- the value for theregistryNamerecord componentregistryType- the value for theregistryTyperecord 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). -
holderClass
Returns the value of theholderClassrecord component.- Returns:
- the value of the
holderClassrecord component
-
registryName
Returns the value of theregistryNamerecord component.- Returns:
- the value of the
registryNamerecord component
-
registryType
Returns the value of theregistryTyperecord component.- Returns:
- the value of the
registryTyperecord component
-