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
FieldsModifier and TypeFieldDescriptionprivate final RegistryBuilder<V>The field for thebuilderrecord component.private final Consumer<IForgeRegistry<V>>The field for theonFillrecord component.private final NewRegistryEvent.RegistryHolder<V>The field for theregistryHolderrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRegistryData(RegistryBuilder<V> builder, NewRegistryEvent.RegistryHolder<V> registryHolder, Consumer<IForgeRegistry<V>> onFill) Creates an instance of aRegistryDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns the value of thebuilderrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.onFill()Returns the value of theonFillrecord component.Returns the value of theregistryHolderrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
builder
The field for thebuilderrecord component. -
registryHolder
The field for theregistryHolderrecord component. -
onFill
The field for theonFillrecord component.
-
-
Constructor Details
-
RegistryData
private RegistryData(RegistryBuilder<V> builder, NewRegistryEvent.RegistryHolder<V> registryHolder, Consumer<IForgeRegistry<V>> onFill) Creates an instance of aRegistryDatarecord class.- Parameters:
builder- the value for thebuilderrecord componentregistryHolder- the value for theregistryHolderrecord componentonFill- the value for theonFillrecord 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 thebuilderrecord component.- Returns:
- the value of the
builderrecord component
-
registryHolder
Returns the value of theregistryHolderrecord component.- Returns:
- the value of the
registryHolderrecord component
-
onFill
Returns the value of theonFillrecord component.- Returns:
- the value of the
onFillrecord component
-