bedrock-kit
    Preparing search index...

    Class ManifestFile

    Wraps a pack's manifest.json file. Exposes identity, versioning, dependencies, and capabilities.

    Accessed via addon.behaviorManifest and addon.resourceManifest.

    const bp = addon.behaviorManifest;
    console.log(bp?.name); // "My Pack BP"
    console.log(bp?.version); // [1, 0, 0]
    console.log(bp?.uuid); // "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

    // Check if the BP depends on the Scripting API
    const hasScripting = bp?.dependencies.some(d => d.uuid === "b26a4d4c-afdf-4690-88f8-931846312678");

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    capabilities: string[]

    All capabilities declared in the manifest.

    data: Record<string, unknown>

    The raw parsed JSON data of the asset file.

    dependencies: ManifestDependency[]

    All dependencies declared in the manifest.

    description: string

    The pack description.

    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.

    minEngineVersion: ManifestVersion

    The minimum engine version required (header.min_engine_version).

    name: string

    The pack display name.

    type: PackType

    The pack type as determined by the first module's type.

    uuid: string

    The pack UUID (header.uuid).

    The pack version (header.version).

    Accessors

    • get versionString(): string

      Returns the version as a human-readable string, e.g. "1.2.3".

      Returns string

    Methods

    • Returns true if this pack declares a dependency on the given UUID.

      Parameters

      • uuid: string

      Returns boolean

      // Check for Scripting API dependency
      bp.dependsOn("b26a4d4c-afdf-4690-88f8-931846312678");
    • Returns true if this pack declares the given capability.

      Parameters

      • capability: string

      Returns boolean

      rp.hasCapability("raytraced");