Record Class NewDatapackRegistryEvent.RegistryData<T>
java.lang.Object
java.lang.Record
net.neoforged.neoforge.registries.NewDatapackRegistryEvent.RegistryData<T>
- Enclosing class:
NewDatapackRegistryEvent
static record NewDatapackRegistryEvent.RegistryData<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.The field for thenetworkCodecrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRegistryData(RegistryDataLoader.RegistryData<T> loaderData, @Nullable com.mojang.serialization.Codec<T> networkCodec) Creates an instance of aRegistryDatarecord class.RegistryData(ResourceKey<Registry<T>> registryKey, com.mojang.serialization.Codec<T> codec, @Nullable com.mojang.serialization.Codec<T> networkCodec) -
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.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
-
-
Constructor Details
-
RegistryData
-
RegistryData
RegistryData(RegistryDataLoader.RegistryData<T> loaderData, @Nullable com.mojang.serialization.Codec<T> networkCodec) Creates an instance of aRegistryDatarecord 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
-