JSON schemas for Minecraft Bedrock Edition add-on developers
These steps are for Visual Studio Code
- Create .vscode folder at root of project
- Create
settings.json
folder - Add the following:
{
// Allows comments in JSON files
"files.associations": {
"*.json": "jsonc"
},
// Schema associations
// Based on Vanilla reference folder structure
"json.schemas": [
{
"fileMatch": [
// Entity behavior files
"/behaviors/entities/**/*.json"
],
"url": "https://raw.githubusercontent.com/BlueFrogGames/minecraft-addon-schemas/1.17/entity.schema.json"
},
{
"fileMatch": [
// Entity resource files
"/resources/entity/**/*.json"
],
"url": "https://raw.githubusercontent.com/BlueFrogGames/minecraft-addon-schemas/1.17/client_entity.schema.json"
},
{
// Spawn rules
"fileMatch": [
"/behaviors/spawn_rules/**/*.json"
],
"url": "https://raw.githubusercontent.com/BlueFrogGames/minecraft-addon-schemas/1.17/spawn_rules.schema.json"
},
{
// Items
"fileMatch": [
"/behaviors/items/**/*.json"
],
"url": "https://raw.githubusercontent.com/BlueFrogGames/minecraft-addon-schemas/1.17/item.schema.json"
}
]
}
The "fileMatch"
option checks the schema against any files ending in ".behavior.json"
or any file within the entities/
directory
For more details, or a reference, see the settings.json
in the example