MutableBundleContents
Link to mutablebundlecontents
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.item.component.MutableBundleContents;
Static Methods
Link to static-methods
Name: of
Return Type: MutableBundleContents
ZenScript CopyMutableBundleContents.of(contents as BundleContents) as MutableBundleContents
Parameter | Type |
---|---|
Parameter contents | Type BundleContents |
Casters
Link to casters
Result Type | Is Implicit |
---|---|
Result Type BundleContents | Is Implicit true |
Methods
Link to methods
Name: clearItems
Return Type: MutableBundleContents
ZenScript Copy// MutableBundleContents.clearItems() as MutableBundleContents
myMutableBundleContents.clearItems();
Name: removeOne
Return Type: IItemStack?
ZenScript Copy// MutableBundleContents.removeOne() as IItemStack?
myMutableBundleContents.removeOne();
Name: toImmutable
Return Type: BundleContents
ZenScript Copy// MutableBundleContents.toImmutable() as BundleContents
myMutableBundleContents.toImmutable();
Name: tryInsert
Return Type: int
ZenScript CopyMutableBundleContents.tryInsert(stack as ItemStack) as int
Parameter | Type |
---|---|
Parameter stack | Type ItemStack |