Record Class RegisteredDataType<T>
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.data.RegisteredDataType<T>
public record RegisteredDataType<T>(net.minecraft.resources.Identifier id, DataType<T> type, @Nullable ArgumentTypeProvider<T> argumentType, @Nullable ArgumentGetter<T> argumentGetter)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Map<net.minecraft.resources.Identifier, RegisteredDataType<?>> static final Map<DataType<?>, RegisteredDataType<?>> -
Constructor Summary
ConstructorsConstructorDescriptionRegisteredDataType(net.minecraft.resources.Identifier id, DataType<T> type, @Nullable ArgumentTypeProvider<T> argumentType, @Nullable ArgumentGetter<T> argumentGetter) Creates an instance of aRegisteredDataTyperecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable ArgumentGetter<T> Returns the value of theargumentGetterrecord component.@Nullable ArgumentTypeProvider<T> Returns the value of theargumentTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.Identifierid()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
BY_ID
-
BY_TYPE
-
-
Constructor Details
-
RegisteredDataType
public RegisteredDataType(net.minecraft.resources.Identifier id, DataType<T> type, @Nullable @Nullable ArgumentTypeProvider<T> argumentType, @Nullable @Nullable ArgumentGetter<T> argumentGetter) Creates an instance of aRegisteredDataTyperecord class.- Parameters:
id- the value for theidrecord componenttype- the value for thetyperecord componentargumentType- the value for theargumentTyperecord componentargumentGetter- the value for theargumentGetterrecord 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). -
id
public net.minecraft.resources.Identifier id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
type
-
argumentType
Returns the value of theargumentTyperecord component.- Returns:
- the value of the
argumentTyperecord component
-
argumentGetter
Returns the value of theargumentGetterrecord component.- Returns:
- the value of the
argumentGetterrecord component
-