TypedDataComponent
Link to typeddatacomponent
Importing the class
Link to importing-the-class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport crafttweaker.api.component.TypedDataComponent;
Extending Record
Link to extending-record
TypedDataComponent extends Record. That means all methods available in Record are also available in TypedDataComponent
Static Methods
Link to static-methods
Name: of
Return Type: TypedDataComponent<T>
ZenScript CopyTypedDataComponent.of<T : Object>(type as DataComponentType<T>, value as T) as TypedDataComponent<T>
Parameter | Type |
---|---|
Parameter type | Type DataComponentType<T> |
Parameter value | Type T |
Parameter T | Type Object |
Methods
Link to methods
Name: applyTo
ZenScript CopyTypedDataComponent.applyTo<T : Object>(patchedMap as invalid)
Parameter | Type |
---|---|
Parameter patchedMap | Type invalid |
Parameter T | Type Object |
Name: type
Return Type: DataComponentType<T>
ZenScript CopyTypedDataComponent.type<T : Object>() as DataComponentType<T>
Parameter | Type |
---|---|
Parameter T | Type Object |
Name: value
Return Type: T
ZenScript CopyTypedDataComponent.value<T : Object>() as T
Parameter | Type |
---|---|
Parameter T | Type Object |