BetaBeta
Betainventory: BlockInventoryComponent | EntityInventoryComponent
The inventory that the item is in.
Betaslot: number
The slot index that the item is in.
Throws a PublicError of type PublicErrorType.NotFound if an item is not found in the specified slot.
Readonly BetainventoryThe inventory that the item is in.
Readonly BetaslotThe slot index that the item is in.
Readonly BetatypeThe item type ID.
Beta
Get the container slot that this item is in.
Throws a PublicError of type PublicErrorType.InvalidObject if this object is not valid.
Beta
Get the I/O capabilities of this item machine.
Throws a PublicError of type PublicErrorType.InvalidObject if this object is not valid, or if the item's inventory is no longer valid.
Throws a PublicError of type PublicErrorType.NotRegistered if the item is not registered as an item machine.
Throws a PublicError of type PublicErrorType.NotFound if the block or entity holding the item no longer exists.
Throws a PublicError of type PublicErrorType.InvalidState if this package has not been initialized (see init).
Beta
Gets the storage of a specific type in the item machine.
The type of storage to get.
Throws a PublicError of type PublicErrorType.InvalidObject if this object is not valid, or if the item's inventory is no longer valid.
Throws a PublicError of type PublicErrorType.NotRegistered if the storage type does not exist.
Throws a PublicError of type PublicErrorType.NotFound if the block or entity holding the item no longer exists.
Throws a PublicError of type PublicErrorType.InvalidState if this package has not been initialized (see init).
Beta
Is this object valid?
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.
The type of storage to set.
The new value. Must be a non-negative integer.
Throws a PublicError of type PublicErrorType.InvalidObject if this object is not valid.
Throws a PublicError of type PublicErrorType.InvalidArgument if the new value isn't a non-negative integer.
Throws a PublicError of type PublicErrorType.InvalidState if this package has not been initialized (see init).
Representation of an item machine.
See
registerItemMachine.