DataComponentMapBuilder

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.component.DataComponentMapBuilder;

Implements

Undocumented Interfaces

IDataComponentMapBuilderExtensions

Members

addAll(other as DataComponentMap) as Builder
script.zs
// Builder.addAll(other as DataComponentMap) as DataComponentMapBuilder;
myBuilder.addAll(myDataComponentMap);

Parameters:

Return Type: DataComponentMapBuilder

build() as DataComponentMap
script.zs
// Builder.build() as DataComponentMap;
myBuilder.build();

Return Type: DataComponentMap

setComponent(type as DataComponentType<T>, value as T?) as Builder
script.zs
// Builder.setComponent<T>(type as DataComponentType<T>, value as T?) as DataComponentMapBuilder;
myBuilder.setComponent<T>(myDataComponentType, myT);

Parameters:

value Type: T?

Return Type: DataComponentMapBuilder