Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/mojang/minecraft-creator-tools/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Minecraft Creator Tools provides multiple validation suites to catch errors, enforce best practices, and ensure compatibility. Each suite runs a different set of validators appropriate for your project’s stage and target audience.

Available Suites

Main Suite (Default)

The default validation suite for general development:
mct validate -i ./my-project
Validates:
  • JSON syntax and schema validation
  • Format version compatibility
  • Reference integrity (entities, items, blocks)
  • Resource pack/behavior pack linkage
  • Script module versions
  • Common mistakes and typos

Add-on Suite (Strict)

Comprehensive validation for add-ons intended for distribution:
mct validate addon -i ./my-project
Includes everything from Main suite, plus:
  • Manifest completeness and accuracy
  • Licensing and attribution requirements
  • Inappropriate content detection
  • Performance recommendations
  • Accessibility guidelines
  • Marketplace compliance checks
The add-on suite is stricter and may report warnings for things the main suite allows.

All Suite (Comprehensive)

Runs every available validator:
mct validate all -i ./my-project
Includes all validators across all suites. Use this for final quality assurance before release.

Current Platform Suite

Validates against the currently installed Minecraft version:
mct validate currentplatform -i ./my-project
Checks compatibility with your local Minecraft installation, ensuring:
  • Feature availability in current version
  • Correct format versions
  • Block/item/entity availability

Validation Categories

Error Level

Critical issues that will cause your add-on to fail:
  • JSON syntax errors
  • Invalid format versions
  • Missing required files
  • Broken references
  • Invalid identifiers
Issues that may cause problems:
  • Deprecated features
  • Performance concerns
  • Inconsistent naming
  • Missing optional metadata
Suggestions for improvement:
  • Best practice violations
  • Optimization opportunities
  • Alternative approaches
Informational messages:
  • Project statistics
  • Feature usage
  • Compatibility notes

Built-in Validators

Schema Validation

Validates JSON files against official Minecraft schemas:
  • Entity definitions (behavior/resource)
  • Block definitions
  • Item definitions
  • Animation files
  • Particle effects
  • Sound definitions
  • Manifest files

Version Managers

Automatically detect and fix outdated versions:
  • BaseGameVersionManager - Updates minimum Minecraft version
  • ScriptModuleManager - Updates script API module versions
  • BehaviorPackEntityTypeManager - Updates entity format versions

Reference Validators

Ensure all references resolve correctly:
  • Entity references in spawn rules
  • Item references in recipes and loot tables
  • Block references in features
  • Texture references in models
  • Sound references in sound definitions

Output Formats

Control validation output with the -ot flag:
mct validate -i ./my-project -show
Displays results directly in terminal. Best for quick checks.

Custom Validation

You can create custom validators programmatically:
import { 
  IProjectInfoGenerator, 
  InfoItemType,
  ProjectInfoSet 
} from '@minecraft/creator-tools';

class CustomValidator implements IProjectInfoGenerator {
  id = 'CUSTOM';
  title = 'Custom Validator';
  
  async generate(project, projectInfoSet) {
    // Validate project structure
    if (!project.defaultBehaviorPackFolder) {
      projectInfoSet.addInfo(
        InfoItemType.error,
        'CUSTOM001',
        'Missing behavior pack folder',
        project
      );
    }
  }
}

// Register and run
const infoSet = new ProjectInfoSet(project);
infoSet.addGenerator(new CustomValidator());
await infoSet.generateForProject();

Configuration Options

Exclusions

Exclude specific validators:
mct validate -i ./my-project -x "SCHEMA,BASEVERSION"

Specific Checks

Run only specific validators:
mct validate -i ./my-project -only "ENTITY,BLOCK"

CI/CD Integration

Example GitHub Actions workflow:
.github/workflows/validate.yml
name: Validate Add-on

on: [push, pull_request]

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
      - run: npm install -g @minecraft/creator-tools
      - run: mct validate addon -i . -ot json -o reports
      - name: Check for errors
        run: |
          if grep -q '"type":"error"' reports/info.json; then
            echo "Validation errors found!"
            exit 1
          fi

Performance Tips

Use --threads to control parallelism. Default is 8, maximum is 16.
mct validate -i ./my-project --threads 16
Large projects benefit from increased thread count. Small projects may not see improvement.

Exit Codes

  • 0 - No errors found
  • 53 - Internal validation error
  • 56 - Test failures detected
  • 57 - Validation errors found

Build docs developers (and LLMs) love