bedrock-kit
    Preparing search index...

    Class BehaviorEntity

    Represents a behavior pack entity definition file (entities/ directory). Contains server-side logic: components, events, loot tables, spawn rules.

    Access via entity.behavior on a unified Entity.

    const entity = addon.entities.get("minecraft:zombie");
    console.log(entity?.behavior?.lootTables.map(lt => lt.id));
    console.log(entity?.behavior?.spawnRule?.populationControl);

    Hierarchy (View Summary)

    Index

    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 entity identifier, e.g. "minecraft:zombie".

    Accessors

    • get displayName(): string

      The display name for this entity from the en_US language file. Falls back to the identifier.

      Returns string