bedrock-kit
    Preparing search index...

    Class Attachable

    Represents an attachable definition from the resource pack's attachables/ directory. Attachables define how items are visually rendered when held or equipped by an entity.

    Access via addon.attachables.get(id) or through item.attachable.

    const att = addon.attachables.get("minecraft:bow");
    console.log(att?.textures.default?.id); // "textures/items/bow_standby"

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Constructors

    Properties

    data: Record<string, unknown>

    The raw parsed JSON data of the asset file.

    docstrings: CommentBlock[]

    All JSDoc-style comment blocks parsed from this asset's source file, in document order. Empty array when no /** … */ blocks are present.

    filePath: string

    Absolute path to the asset's file on disk. Empty string in browser mode.

    id: string

    The namespaced item identifier this attachable is for, e.g. "minecraft:bow".

    Accessors

    • get textures(): Record<string, Texture>

      Map of shortname → resolved Texture, e.g. { "default": Texture }. Entries whose path cannot be found in the addon's texture collection are omitted.

      Returns Record<string, Texture>