Script API - v1.26.10
    Preparing search index...

    Class ItemInventoryComponent

    This component is added to items with the Storage Item component. Can access and modify this items inventory container.

    export class ItemInventoryComponent extends ItemComponent {
    private constructor();
    readonly container: Container;
    static readonly componentId = 'minecraft:inventory';
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    container: Container

    This property can throw when used.

    InvalidContainerError

    This property can't be read in early-execution mode.

    isValid: boolean

    Returns whether the component is valid. A component is considered valid if its owner is valid, in addition to any addition to any additional validation required by the component.

    This property can't be read in early-execution mode.

    typeId: string

    Identifier of the component.

    This property can't be read in early-execution mode.

    componentId: "minecraft:inventory" = 'minecraft:inventory'