bedrock-kit
    Preparing search index...

    Class Particle

    Represents a particle effect definition from the resource pack's particles/ directory.

    Access via addon.particles.get(id) or through entity.resource.particles.

    const particle = addon.particles.get("minecraft:stunned_emitter");
    console.log(particle?.texture?.id); // "textures/particle/particles"

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Constructors

    • Parameters

      • id: string
      • filePath: string
      • data: Record<string, unknown>
      • rawText: string
      • addon: AddOn

      Returns Particle

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

    Accessors

    • get texture(): Texture

      The texture used by this particle effect, resolved from basic_render_parameters.texture. undefined if not specified or not found.

      Returns Texture