Package net.minecraftforge.registries
Record Class NewRegistryEvent.RegistryData<V>
java.lang.Object
java.lang.Record
net.minecraftforge.registries.NewRegistryEvent.RegistryData<V>
- Enclosing class:
- NewRegistryEvent
private static record NewRegistryEvent.RegistryData<V>(RegistryBuilder<V> builder, NewRegistryEvent.RegistryHolder<V> registryHolder, Consumer<IForgeRegistry<V>> onFill)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final RegistryBuilder<V>
The field for thebuilder
record component.private final Consumer<IForgeRegistry<V>>
The field for theonFill
record component.private final NewRegistryEvent.RegistryHolder<V>
The field for theregistryHolder
record component. -
Constructor Summary
ModifierConstructorDescriptionprivate
RegistryData
(RegistryBuilder<V> builder, NewRegistryEvent.RegistryHolder<V> registryHolder, Consumer<IForgeRegistry<V>> onFill) Creates an instance of aRegistryData
record class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Returns the value of thebuilder
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.onFill()
Returns the value of theonFill
record component.Returns the value of theregistryHolder
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
builder
The field for thebuilder
record component. -
registryHolder
The field for theregistryHolder
record component. -
onFill
The field for theonFill
record component.
-
-
Constructor Details
-
RegistryData
private RegistryData(RegistryBuilder<V> builder, NewRegistryEvent.RegistryHolder<V> registryHolder, Consumer<IForgeRegistry<V>> onFill) Creates an instance of aRegistryData
record class.- Parameters:
builder
- the value for thebuilder
record componentregistryHolder
- the value for theregistryHolder
record componentonFill
- the value for theonFill
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)
. -
builder
Returns the value of thebuilder
record component.- Returns:
- the value of the
builder
record component
-
registryHolder
Returns the value of theregistryHolder
record component.- Returns:
- the value of the
registryHolder
record component
-
onFill
Returns the value of theonFill
record component.- Returns:
- the value of the
onFill
record component
-