Package net.minecraftforge.registries
Record Class DataPackRegistryEvent.DataPackRegistryData<T>
java.lang.Object
java.lang.Record
net.minecraftforge.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 SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionDataPackRegistryData(RegistryDataLoader.RegistryData<T> loaderData, @Nullable com.mojang.serialization.Codec<T> networkCodec) Creates an instance of aDataPackRegistryDatarecord class.
- 
Method SummaryModifier 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- 
loaderDataThe field for theloaderDatarecord component.
- 
networkCodecThe field for thenetworkCodecrecord component.
 
- 
- 
Constructor Details- 
DataPackRegistryDataDataPackRegistryData(RegistryDataLoader.RegistryData<T> loaderData, @Nullable @Nullable com.mojang.serialization.Codec<T> networkCodec) Creates an instance of aDataPackRegistryDatarecord class.- Parameters:
- loaderData- the value for the- loaderDatarecord component
- networkCodec- the value for the- networkCodecrecord component
 
 
- 
- 
Method Details- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
loaderDataReturns the value of theloaderDatarecord component.- Returns:
- the value of the loaderDatarecord component
 
- 
networkCodecReturns the value of thenetworkCodecrecord component.- Returns:
- the value of the networkCodecrecord component
 
 
-