bedrock-kit
    Preparing search index...

    Class ResourceEntity

    Represents a resource pack entity definition file (entity/ directory). Contains client-side rendering data: animations, textures, materials.

    Access via entity.resource on a unified Entity.

    const entity = addon.entities.get("minecraft:zombie");
    console.log(entity?.resource?.animations.map(a => a.animation.id));
    console.log(entity?.resource?.renderControllers.map(rc => rc.id));

    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 animations(): { animation: Animation; shortname: string }[]

      Resolved animation definitions referenced by this entity (excludes controllers).

      Returns { animation: Animation; shortname: string }[]

    • get animationShortnames(): Record<string, string>

      Map of animation shortname → full animation or controller ID.

      Returns Record<string, string>

    • get displayName(): string

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

      Returns string

    • get particles(): { particle: Particle; shortname: string }[]

      Resolved particle definitions referenced by this entity.

      Returns { particle: Particle; shortname: string }[]

    • get particleShortnames(): Record<string, string>

      Map of particle shortname → full particle ID.

      Returns Record<string, string>

    • get renderControllerIds(): string[]

      The list of render controller IDs used by this entity.

      Returns string[]

    • get soundShortnames(): Record<string, string>

      Map of sound shortname → sound definition ID.

      Returns Record<string, string>

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

      Map of texture 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>