Skip to content

SlowTool JSON Schema

Choose a tag to compare

@nibbyy nibbyy released this 20 Jun 07:24
· 4 commits to master since this release

This JSON Schema provides autocomplete, field descriptions, and validation when writing data-driven SlowTools in your IDE for Minecraft 26.1.2.

It covers definitions placed at:

data/<namespace>/slowcraft/slow_tool/<path>.json

What the schema provides

Once connected to your editor, the schema can:

  • Suggest SlowTool fields as you type
  • Show field descriptions on hover
  • Mark missing required fields
  • Warn about unknown fields
  • Check value types and limits
  • Validate simple and object-form item stacks
  • Validate Minecraft text components

The schema currently covers:

  • display
  • outputs
  • use_time
  • name
  • exclude_from_creative
  • show_overlay

IntelliJ IDEA

  1. Download slow_tool.schema.json from the Assets section below.

  2. Store it somewhere inside your datapack or mod project. For example:

    docs/schemas/slow_tool.schema.json
    
  3. Open IntelliJ's settings with Ctrl+Alt+S.

  4. Go to:

    Languages & Frameworks
    └── Schemas and DTDs
        └── JSON Schema Mappings
    
  5. Add a new schema mapping.

  6. Name it:

    Slowcraft SlowTool
    
  7. Set Schema file or URL to the downloaded slow_tool.schema.json.

  8. Set the schema version to JSON Schema 2020-12.

  9. Add this file path pattern:

    **/data/*/slowcraft/slow_tool/**/*.json
    
  10. Apply the changes.

IntelliJ should now provide completion and validation whenever you edit a SlowTool definition.

You can also open a definition, click No JSON schema in the status bar, and select New Schema Mapping to reach the same settings page.

Visual Studio Code

  1. Download slow_tool.schema.json from the Assets section below.

  2. Place it in your workspace's .vscode folder:

    .vscode/slow_tool.schema.json
    
  3. Open or create:

    .vscode/settings.json
    
  4. Add the following schema mapping:

{
  "json.schemas": [
    {
      "fileMatch": [
        "**/data/*/slowcraft/slow_tool/**/*.json"
      ],
      "url": "./.vscode/slow_tool.schema.json"
    }
  ]
}

If your settings.json already contains other settings, merge the json.schemas property into the existing object instead of replacing the entire file.

VS Code should now provide autocomplete, hover descriptions, and validation for SlowTool definitions.

What the schema cannot check

The schema validates the structure of a definition, but it does not know which mods or items are installed in your game.

A definition may still fail to load if it references:

  • An item that does not exist
  • An invalid data component
  • A definition or dependency supplied by a missing mod
  • Data that is valid JSON but invalid for the installed Minecraft version

Always test the finished datapack in-game.

For complete examples and field explanations, see the Data-Driven SlowTools documentation.