bedrock-kit
    Preparing search index...

    Class FeatureRule

    Represents a feature rule definition from the behavior pack's feature_rules/ directory.

    Feature rules control where and when world generation features are placed in biomes.

    Access via addon.featureRules.get(id) or through feature.placedByFeatureRules.

    const rule = addon.featureRules.get("tsu_nat:maple_tree_rule");
    console.log(rule?.placesFeature?.id); // "tsu_nat:maple_tree"

    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 feature rule identifier, e.g. "tsu_nat:maple_tree_rule".

    Accessors

    • get placesFeatureId(): string

      The ID of the feature this rule places, from description.places_feature. Use placesFeature for the resolved object.

      Returns string