DataComponentPatch
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.
import crafttweaker.api.component.DataComponentPatch;
Members
static builder() as Builder
forget(component as DataComponentType<T>) as DataComponentPatch
myDataComponentPatch.forget<T>(myDataComponentType);
Parameters:
component: DataComponentType<T>
Type: DataComponentType<T>
Return Type:
DataComponentPatch
getComponent(type as DataComponentType<T>) as T?
myDataComponentPatch.getComponent<T>(myDataComponentType);
Parameters:
type: DataComponentType<T>
Type: DataComponentType<T>
Return Type:
T?
Getter
// DataComponentPatch.isEmpty as boolmyDataComponentPatch.isEmpty
Return Type:
bool
Getter
// DataComponentPatch.size as intmyDataComponentPatch.size
Return Type:
int
split() as SplitResult