Record Class DataComponentInitializers.InitializerEntry<T>
java.lang.Object
java.lang.Record
net.minecraft.core.component.DataComponentInitializers.InitializerEntry<T>
- Enclosing class:
DataComponentInitializers
private static record DataComponentInitializers.InitializerEntry<T>(ResourceKey<T> key, DataComponentInitializers.Initializer<T> initializer)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DataComponentInitializers.Initializer<T> The field for theinitializerrecord component.private final ResourceKey<T> The field for thekeyrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInitializerEntry(ResourceKey<T> key, DataComponentInitializers.Initializer<T> initializer) Creates an instance of aInitializerEntryrecord 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 theinitializerrecord component.key()Returns the value of thekeyrecord component.voidrun(DataComponentMap.Builder components, HolderLookup.Provider context) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
key
The field for thekeyrecord component. -
initializer
The field for theinitializerrecord component.
-
-
Constructor Details
-
InitializerEntry
Creates an instance of aInitializerEntryrecord class.- Parameters:
key- the value for thekeyrecord componentinitializer- the value for theinitializerrecord component
-
-
Method Details
-
run
-
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). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
initializer
Returns the value of theinitializerrecord component.- Returns:
- the value of the
initializerrecord component
-