BundleContents

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.BundleContents;

Implements

BundleContents implements the following interfaces:

TooltipComponent

Members

Getter
Checks if the BundleContents is empty.
script.zs
// BundleContents.isEmpty as bool
myBundleContents.isEmpty

Return Type: bool

Getter
Gets the items of the BundleContents.
script.zs
// BundleContents.items as Iterable<ItemStack>
myBundleContents.items

Return Type: Iterable<ItemStack>

static of(items as List<IItemStack>) as BundleContents
Creates a new BundleContents with the given items.

Returns: The new BundleContents.

script.zs
// BundleContents.of(items as List<IItemStack>) as BundleContents;
BundleContents.of(myList);

Parameters:

items Type: List<IItemStack> - The items to add to the bundle.

Return Type: BundleContents

Getter
Gets the size of the BundleContents.
script.zs
// BundleContents.size as int
myBundleContents.size

Return Type: int