Skip to content

Add Behavior Pack: Create feature / feature rule commands#335

Merged
DaanV2 merged 2 commits intomainfrom
copilot/add-command-for-features
Mar 24, 2026
Merged

Add Behavior Pack: Create feature / feature rule commands#335
DaanV2 merged 2 commits intomainfrom
copilot/add-command-for-features

Conversation

Copy link
Contributor

Copilot AI commented Mar 24, 2026

Users had no way to scaffold feature and feature rule files from the command palette — they had to create them manually.

Changes

  • ide/shared/src/constants.ts — Added Commands.Create.Behaviorpack.Feature (bc-create-behavior-feature) and Feature_Rule (bc-create-behavior-feature_rule) constants.

  • ide/base/server/src/lsp/templates/definitions/behavior-pack.ts — Added template bodies:

    • feature: minecraft:single_block_feature skeleton (format 1.16.0)
    • feature_rule: minecraft:feature_rules skeleton (format 1.13.0) with biome filter, distribution, and a places_feature placeholder
  • ide/base/server/src/lsp/commands/commands/templates.ts — Wired up TemplateItem entries targeting features/${{id.safe}}.feature.json and feature_rules/${{id.safe}}.feature_rule.json.

  • ide/base/client/src/commands/create-templates.ts — Registered createCommandWithID handlers with namespace-qualified ID validation.

  • ide/vscode/package.json — Exposed both commands in the palette under the Blockception category with ext:is_active enablement.

Example output

Running Behavior Pack: Create feature rule file and entering example:my_rule produces:

{
  "format_version": "1.13.0",
  "minecraft:feature_rules": {
    "description": {
      "identifier": "example:my_rule",
      "places_feature": "namespace:feature_name"
    },
    "conditions": {
      "placement_pass": "surface_pass",
      "minecraft:biome_filter": [{ "test": "has_biome_tag", "operator": "==", "value": "overworld" }]
    },
    "distribution": {
      "iterations": 1,
      "x": { "extent": [0, 15] },
      "y": { "extent": [0, 64] },
      "z": { "extent": [0, 15] },
      "scatter_chance": 100
    }
  }
}

places_feature is intentionally left as a placeholder since it must reference a separately defined feature identifier.

Original prompt

This section details on the original issue you should resolve

<issue_title>Features and Feature rules command</issue_title>
<issue_description>Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Add a command for creating features and feature rules using CTRL+P

Describe alternatives you've considered
Manually creating the file</issue_description>

Comments on the Issue (you are @copilot in this section)


⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

Copilot AI changed the title [WIP] Add command for creating features and feature rules Add Behavior Pack: Create feature / feature rule commands Mar 24, 2026
Copilot AI requested a review from DaanV2 March 24, 2026 14:57
@DaanV2 DaanV2 marked this pull request as ready for review March 24, 2026 15:35
@DaanV2 DaanV2 merged commit a7d68fa into main Mar 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Features and Feature rules command

2 participants