Bedrock Energistics Core
    Preparing search index...

    Function setMachineStorage

    • Beta

      Sets the storage of a specific type in a machine.

      Parameters

      • block: Block

        The machine block.

      • type: string

        The type of storage to set.

      • value: number

        The new value. Must be an integer.

      • callOnStorageSet: boolean = true

        Whether to call the onStorageSet event on the machine, if applicable.

      Returns Promise<void>

      Throws if the storage type does not exist.

      Throws if the new value isn't a non-negative integer.

      Throws if the block is not valid.

      Throws if the block is not registered as a machine.