Record Class DataPackRegistryEvent.DataPackRegistryData<T>
java.lang.Object
java.lang.Record
net.neoforged.neoforge.registries.DataPackRegistryEvent.DataPackRegistryData<T>
- Enclosing class:
DataPackRegistryEvent
static record DataPackRegistryEvent.DataPackRegistryData<T>(RegistryDataLoader.RegistryData<T> loaderData, @Nullable com.mojang.serialization.Codec<T> networkCodec)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegistryDataLoader.RegistryData<T> The field for theloaderDatarecord component.private final @Nullable com.mojang.serialization.Codec<T> The field for thenetworkCodecrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDataPackRegistryData(RegistryDataLoader.RegistryData<T> loaderData, @Nullable com.mojang.serialization.Codec<T> networkCodec) Creates an instance of aDataPackRegistryDatarecord 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 theloaderDatarecord component.@Nullable com.mojang.serialization.Codec<T> Returns the value of thenetworkCodecrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
loaderData
The field for theloaderDatarecord component. -
networkCodec
The field for thenetworkCodecrecord component.
-
-
Constructor Details
-
DataPackRegistryData
DataPackRegistryData(RegistryDataLoader.RegistryData<T> loaderData, @Nullable com.mojang.serialization.Codec<T> networkCodec) Creates an instance of aDataPackRegistryDatarecord class.- Parameters:
loaderData- the value for theloaderDatarecord componentnetworkCodec- the value for thenetworkCodecrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
loaderData
Returns the value of theloaderDatarecord component.- Returns:
- the value of the
loaderDatarecord component
-
networkCodec
Returns the value of thenetworkCodecrecord component.- Returns:
- the value of the
networkCodecrecord component
-