Bedrock Energistics Core
    Preparing search index...

    Class ItemMachineBeta

    Representation of an item machine.

    Index

    Constructors

    • Beta

      Parameters

      • Betainventory: BlockInventoryComponent | EntityInventoryComponent

        The inventory that the item is in.

      • Betaslot: number

        The slot index that the item is in.

      Returns ItemMachine

      Throws if an item is not found in the specified slot.

    Properties

    inventory: BlockInventoryComponent | EntityInventoryComponent

    The inventory that the item is in.

    slot: number

    The slot index that the item is in.

    typeId: string

    The item type ID.

    Methods

    • Beta

      Get the container slot that this item is in.

      Returns ContainerSlot

      Throws if this object is not valid.

    • Beta

      Gets the storage of a specific type in the item machine.

      Parameters

      • type: string

        The type of storage to get.

      Returns Promise<number>

      Throws if the storage type does not exist

      Throws if this object is not valid.

    • Beta

      Is this object valid?

      Returns boolean

      true if the type ID of the item in the specified slot has NOT changed since the creation of this object, otherwise false.

    • Beta

      Sets the storage of a specific type in the item machine.

      Parameters

      • type: string

        The type of storage to set.

      • value: number

        The new value. Must be an integer.

      Returns void

      Throws if this object is not valid.