DataComponentPatchBuilder

Link to datacomponentpatchbuilder

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
Copy
import crafttweaker.api.component.DataComponentPatchBuilder;

Name: build

Return Type: DataComponentPatch

ZenScript
Copy
// DataComponentPatchBuilder.build() as DataComponentPatch

myDataComponentPatchBuilder.build();

Name: remove

Return Type: DataComponentPatchBuilder

ZenScript
Copy
DataComponentPatchBuilder.remove<T : Object>(type as DataComponentType<T>) as DataComponentPatchBuilder
ParameterType
Parameter
type
Type
DataComponentType<T>
Parameter
T
Type
Object

Name: setComponent

Return Type: DataComponentPatchBuilder

ZenScript
Copy
DataComponentPatchBuilder.setComponent<T : Object>(type as TypedDataComponent<T>) as DataComponentPatchBuilder
ParameterType
Parameter
type
Type
TypedDataComponent<T>
Parameter
T
Type
Object

Name: setComponent

Return Type: DataComponentPatchBuilder

ZenScript
Copy
DataComponentPatchBuilder.setComponent<T : Object>(type as DataComponentType<T>, value as T) as DataComponentPatchBuilder
ParameterType
Parameter
type
Type
DataComponentType<T>
Parameter
value
Type
T
Parameter
T
Type
Object