Package net.minecraftforge.registries
Record Class ObjectHolderRegistry.VanillaObjectHolderData
java.lang.Object
java.lang.Record
net.minecraftforge.registries.ObjectHolderRegistry.VanillaObjectHolderData
- Enclosing class:
ObjectHolderRegistry
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
VanillaObjectHolderData
(String holderClass, String registryName, String registryType) Creates an instance of aVanillaObjectHolderData
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.Returns the value of theholderClass
record component.Returns the value of theregistryName
record component.Returns the value of theregistryType
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
holderClass
The field for theholderClass
record component. -
registryName
The field for theregistryName
record component. -
registryType
The field for theregistryType
record component.
-
-
Constructor Details
-
VanillaObjectHolderData
Creates an instance of aVanillaObjectHolderData
record class.- Parameters:
holderClass
- the value for theholderClass
record componentregistryName
- the value for theregistryName
record componentregistryType
- the value for theregistryType
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)
. -
holderClass
Returns the value of theholderClass
record component.- Returns:
- the value of the
holderClass
record component
-
registryName
Returns the value of theregistryName
record component.- Returns:
- the value of the
registryName
record component
-
registryType
Returns the value of theregistryType
record component.- Returns:
- the value of the
registryType
record component
-