bedrock-kit
    Preparing search index...

    Class AssetAbstract

    Base class for every file-backed game-object wrapper in bedrockKit (items, blocks, entities, loot tables, animations, etc.).

    JSDoc-style comment blocks written inside the backing JSON file are parsed eagerly at construction time and exposed as docstrings. This lets you attach structured docs directly inside your addon JSON files:

    {
    /**
    * The ancient guardian. Spawns in deep ocean ruins.
    * @author YourName
    * @version 2.1.0
    */
    "minecraft:entity": { ... }
    }
    const entity = addon.entities.get("mypack:guardian");
    console.log(entity?.behavior?.docstrings[0]?.description);
    // "The ancient guardian. Spawns in deep ocean ruins."

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    • Parameters

      • filePath: string
      • data: Record<string, unknown>
      • rawText: string

      Returns Asset

    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.