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 Copyimport crafttweaker.api.component.DataComponentPatchBuilder;
Methods
Link to methods
Name: build
Return Type: DataComponentPatch
ZenScript Copy// DataComponentPatchBuilder.build() as DataComponentPatch
myDataComponentPatchBuilder.build();
Name: remove
Return Type: DataComponentPatchBuilder
ZenScript CopyDataComponentPatchBuilder.remove<T : Object>(type as DataComponentType<T>) as DataComponentPatchBuilder
Parameter | Type |
---|---|
Parameter type | Type DataComponentType<T> |
Parameter T | Type Object |
Name: setComponent
Return Type: DataComponentPatchBuilder
ZenScript CopyDataComponentPatchBuilder.setComponent<T : Object>(type as TypedDataComponent<T>) as DataComponentPatchBuilder
Parameter | Type |
---|---|
Parameter type | Type TypedDataComponent<T> |
Parameter T | Type Object |
Name: setComponent
Return Type: DataComponentPatchBuilder
ZenScript CopyDataComponentPatchBuilder.setComponent<T : Object>(type as DataComponentType<T>, value as T) as DataComponentPatchBuilder
Parameter | Type |
---|---|
Parameter type | Type DataComponentType<T> |
Parameter value | Type T |
Parameter T | Type Object |