Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Datapack Optimization HelperNew to Visual Studio Code? Get it now.
Datapack Optimization Helper

Datapack Optimization Helper

TheSalt_

|
1,275 installs
| (2) | Free
An extension for datapack(mcfunction) optimization
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Datapack Optimization Helper

Visual Studio Marketplace Open VSX

Vscode Extension for minecraft datapack optimization.

English | 한국어

Features

Example

  • Add lint warnings for optimizations

  • Detect infinite recursion calls

  • Add some quick fixes

  • Ctrl+Click on if/unless in unreachable/always-pass conditions to jump to the score assignment

  • Suppress warnings with comments:

    • # warn-off - Suppress all warnings for the next line
    • # warn-off rule-id - Suppress specific rule
    • # warn-off-file - Suppress warnings for entire file

image

  • Show function references with CodeLens

image

  • Automatically update function references when renaming .mcfunction files
    • Updates function and schedule function commands
    • Optionally updates references in comments

image

  • Tracking scoreboard values

    • Visible when holding Ctrl + Alt
    • To always show them, set editor.inlayHints.enabled to on
  • Test scoreboard values with # test-score

    • Insert # test-score <target> <objective> <value> anywhere in the file to pin a score to a specific value for testing
    • The overridden value is reflected in inlay hints, hover, and diagnostics from that line onwards
    • Right-click (or use the command palette) → Datapack Optimization: Add Test Score to insert interactively — shows all scores in the file with their current values at the cursor position
    # test-score #counter obj 10
    
    scoreboard players add #counter obj 3
    # inlay hint: #counter:obj = 13
    

Configuration

Project Configuration

Create datapack.config.json in the same folder as pack.mcmeta:

{
    "rules": {
        "disabled": ["scoreboard-fake-player-missing-hash"]
    },
    "executeGroup": {
        "outputPath": "{dir}",
        "outputName": "{name}_line_{line}"
    }
}

Project settings override user settings.

Disable Rules

image

default: scoreboard-fake-player-missing-hash

Output path for function grouping

image

default: {dir}

Output name for function grouping

image

default: {name}_line_{line}

image

Scoreboard Inlay Hints Enabled

Enable tracking scoreboard values.

default: true

Scoreboard Inlay Hints Padding

Number of padding spaces for Scoreboard Inlay Hints. Set to 0 to auto alignment.

default: 1

Rename Behavior

image

Controls how function references are updated when renaming .mcfunction files.

  • ask: Show a dialog to choose (default)
  • codeOnly: Only update code references
  • includeComments: Update code and comment references
  • skip: Don't update references

Contributing

If you want to add an optimization rule, or report a bug, please make an issue

And any contributions are welcome!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft