DataComponentPatch
Link to datacomponentpatch
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.DataComponentPatch;
Static Methods
Link to static-methods
Name: builder
Return Type: DataComponentPatchBuilder
ZenScript Copy// DataComponentPatch.builder() as DataComponentPatchBuilder
DataComponentPatch.builder();
Methods
Link to methods
Name: forget
Return Type: DataComponentPatch
ZenScript CopyDataComponentPatch.forget<T : Object>(component as DataComponentType<T>) as DataComponentPatch
Parameter | Type |
---|---|
Parameter component | Type DataComponentType<T> |
Parameter T | Type Object |
Name: getComponent
Return Type: @org.openzen.zencode.java.ZenCodeType.Nullable T
ZenScript CopyDataComponentPatch.getComponent<T : Object>(type as DataComponentType<T>) as @org.openzen.zencode.java.ZenCodeType.Nullable T
Parameter | Type |
---|---|
Parameter type | Type DataComponentType<T> |
Parameter T | Type Object |
Name: split
Return Type: DataComponentPatchSplitResult
ZenScript Copy// DataComponentPatch.split() as DataComponentPatchSplitResult
myDataComponentPatch.split();
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name isEmpty | Type boolean | Has Getter true | Has Setter false |
Name size | Type int | Has Getter true | Has Setter false |