MutableBundleContents

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.

script.zs
import crafttweaker.api.item.component.MutableBundleContents;

Members

clearItems() as Mutable
script.zs
// Mutable.clearItems() as MutableBundleContents;
myMutable.clearItems();

Return Type: MutableBundleContents

static of(contents as BundleContents) as Mutable
script.zs
// Mutable.of(contents as BundleContents) as MutableBundleContents;
MutableBundleContents.of(myBundleContents);

Parameters:

contents Type: BundleContents

Return Type: MutableBundleContents

removeOne() as IItemStack
script.zs
// Mutable.removeOne() as IItemStack;
myMutable.removeOne();

Return Type: IItemStack

toImmutable() as BundleContents
script.zs
// Mutable.toImmutable() as BundleContents;
myMutable.toImmutable();

Return Type: BundleContents

implicit as BundleContents
script.zs
// Mutable as BundleContents
myMutable as BundleContents

Return Type: BundleContents

tryInsert(stack as ItemStack) as int
script.zs
// Mutable.tryInsert(stack as ItemStack) as int;
myMutable.tryInsert(myItemStack);

Parameters:

stack Type: ItemStack

Return Type: int