SoulFire TypeScript SDK 2.10.3
    Preparing search index...

    Type Alias InventorySlot

    InventorySlot: Message<"soulfire.v1.InventorySlot"> & {
        count: number;
        displayName?: string;
        iconBase64?: string;
        iconMimeType?: string;
        itemId: string;
        slot: number;
    }

    Represents an item in an inventory slot. Used for both container slots and carried (cursor) items.

    Type Declaration

    • count: number

      The number of items in this stack. Range: 1 to the item's maximum stack size (typically 1, 16, or 64).

      from field: int32 count = 3;

    • OptionaldisplayName?: string

      The custom display name of the item, if it has been renamed. Only present when the item has a custom name component (e.g., renamed in an anvil). Contains the plain text string, not JSON text components.

      from field: optional string display_name = 4;

    • OptionaliconBase64?: string

      Base64-encoded square icon image for this item's inventory render. The image is rendered server-side to match the item's resolved in-game appearance. Static items are sent as PNG. Animated items may be sent as GIF.

      from field: optional string icon_base64 = 5;

    • OptionaliconMimeType?: string

      MIME type for the rendered item icon image. Values: "image/png" or "image/gif".

      from field: optional string icon_mime_type = 6;

    • itemId: string

      The Minecraft item identifier in namespaced format. Examples: "minecraft:diamond_sword", "minecraft:stone", "minecraft:enchanted_book"

      from field: string item_id = 2;

    • slot: number

      The slot index within the container.

      • For container menus: 0 to (total_slots - 1)
      • For player inventory: 0-4 crafting, 5-8 armor, 9-35 main inventory, 36-44 hotbar, 45 offhand
      • For carried items (cursor): -1 is used as a special indicator

      from field: int32 slot = 1;

    from message soulfire.v1.InventorySlot