Bedrock Energistics Core
    Preparing search index...

    Interface UiItemSlotElementDefinitionBeta

    Options for defining an item slot UI element.

    This is used to store items without persistent entities. If your machine uses a persistent entity, we recommend accessing the entity's inventory directly rather than using this.

    A slot's contents are saved as a MachineItemStack, which keeps most of an item but not all of it - a shulker box holding items, for one, comes back out as an empty shulker box. Set UiItemSlotElementDefinition.allowedItems to the items your machine actually needs, so that a player cannot put something in a slot that won't survive being stored.

    If a slot has to accept any item at all, use a persistent entity and access its container directly instead of using an item slot element.

    interface UiItemSlotElementDefinition {
        allowedItems?: string[];
        emptyItemId?: string;
        index: number;
        type: "itemSlot";
    }
    Index
    allowedItems?: string[]

    Only allow specific items in this slot.

    Highly recommended. Restricting a slot to what the machine needs also keeps a player from putting in an item that cannot be stored intact - see the remarks on UiItemSlotElementDefinition.

    emptyItemId?: string

    The item ID to use when the slot is empty.

    "fluffyalien_energisticscore:ui_empty_slot"
    
    index: number

    The slot index of this element in the JSON UI.

    type: "itemSlot"