Record Class NeoForgeUnifiedRegistries.DataComponentTypes
java.lang.Object
java.lang.Record
net.rebel459.unified.neoforge.core.NeoForgeUnifiedRegistries.DataComponentTypes
- All Implemented Interfaces:
UnifiedRegistries.DataComponentTypes
- Enclosing class:
NeoForgeUnifiedRegistries
public static record NeoForgeUnifiedRegistries.DataComponentTypes(String modId)
extends Record
implements UnifiedRegistries.DataComponentTypes
-
Constructor Summary
ConstructorsConstructorDescriptionDataComponentTypes(String modId) Creates an instance of aDataComponentTypesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlias(net.minecraft.resources.Identifier convertedFrom, net.minecraft.resources.Identifier convertedTo) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.modId()Returns the value of themodIdrecord component.<T> Supplied<net.minecraft.core.component.DataComponentType<T>> register(String path, UnaryOperator<net.minecraft.core.component.DataComponentType.Builder<T>> unaryOperator) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DataComponentTypes
Creates an instance of aDataComponentTypesrecord class.- Parameters:
modId- the value for themodIdrecord component
-
-
Method Details
-
register
public <T> Supplied<net.minecraft.core.component.DataComponentType<T>> register(String path, UnaryOperator<net.minecraft.core.component.DataComponentType.Builder<T>> unaryOperator) - Specified by:
registerin interfaceUnifiedRegistries.DataComponentTypes
-
addAlias
public void addAlias(net.minecraft.resources.Identifier convertedFrom, net.minecraft.resources.Identifier convertedTo) - Specified by:
addAliasin interfaceUnifiedRegistries.DataComponentTypes
-
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). -
modId
Returns the value of themodIdrecord component.- Specified by:
modIdin interfaceUnifiedRegistries.DataComponentTypes- Returns:
- the value of the
modIdrecord component
-