bedrock-kit
    Preparing search index...

    Class Entity

    A unified view of an entity that bridges BehaviorEntity (server-side), ResourceEntity (client-side), and SpawnRule into a single object.

    Entity is not itself a file-backed asset — it is a logical grouping. Raw file data is accessible through entity.behavior.data and entity.resource.data.

    Access via addon.entities.get(id).

    const zombie = addon.entities.get("minecraft:zombie");
    console.log(zombie?.displayName); // "Zombie"
    console.log(zombie?.behavior?.filePath); // ".../entities/zombie.json"
    console.log(zombie?.lootTables.map(lt => lt.id));
    console.log(zombie?.spawnRule?.populationControl); // "monster"
    Index

    Constructors

    Properties

    behavior: BehaviorEntity

    The behavior pack (server-side) definition for this entity. undefined if not present.

    id: string

    The namespaced entity identifier, e.g. "minecraft:zombie".

    resource: ResourceEntity

    The resource pack (client-side) definition for this entity. undefined if not present.

    spawnRule: SpawnRule

    The spawn rule for this entity. undefined if no spawn rule exists.

    Accessors

    • get displayName(): string

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

      Returns string