Adding format version regex
This commit is contained in:
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -4,7 +4,7 @@
|
|||||||
"[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
"[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
||||||
"[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
"[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
|
||||||
|
|
||||||
"prettier.printWidth": 150,
|
"prettier.printWidth": 180,
|
||||||
"prettier.useTabs": false,
|
"prettier.useTabs": false,
|
||||||
"prettier.tabWidth": 2
|
"prettier.tabWidth": 2
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,12 +5,16 @@
|
|||||||
{
|
{
|
||||||
"format_version": "1.10.0",
|
"format_version": "1.10.0",
|
||||||
"animation_controllers": {
|
"animation_controllers": {
|
||||||
"controller.animation.example": { "initial_state": "default", "states": { "default": { "transitions": [{ "state_1": "query.is_baby" }] }, "state_1": {} } }
|
"controller.animation.example": {
|
||||||
|
"initial_state": "default",
|
||||||
|
"states": { "default": { "transitions": [{ "state_1": "query.is_baby" }] }, "state_1": {} }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/animation_controller.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/animation_controller.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/animation_controller.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/animation_controller.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"examples": [{ "format_version": "1.10.0", "animations": { "animation.example": {} } }],
|
"examples": [{ "format_version": "1.10.0", "animations": { "animation.example": {} } }],
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/animations.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/animations.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/animations.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/animations.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"title": "Biome",
|
"title": "Biome",
|
||||||
"description": "A biome definition",
|
"description": "A biome definition",
|
||||||
"allOf": [{ "if": { "properties": { "format_version": { "type": "string", "const": "1.12.0" } } }, "then": { "$ref": "./1.12.0/biomes.json" } }]
|
"allOf": [
|
||||||
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.12.0" } } }, "then": { "$ref": "./1.12.0/biomes.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.12.0" } } }, "then": { "$ref": "./1.12.0/blocks.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.12.0" } } }, "then": { "$ref": "./1.12.0/blocks.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.0" } } }, "then": { "$ref": "./1.16.0/blocks.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.0" } } }, "then": { "$ref": "./1.16.0/blocks.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.100" } } }, "then": { "$ref": "./1.16.100/blocks.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.100" } } }, "then": { "$ref": "./1.16.100/blocks.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.200" } } }, "then": { "$ref": "./1.16.200/blocks.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.200" } } }, "then": { "$ref": "./1.16.200/blocks.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.13.0" } } }, "then": { "$ref": "./1.13.0/entities.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.13.0" } } }, "then": { "$ref": "./1.13.0/entities.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.14.0" } } }, "then": { "$ref": "./1.14.0/entities.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.14.0" } } }, "then": { "$ref": "./1.14.0/entities.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.0" } } }, "then": { "$ref": "./1.16.0/entities.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.0" } } }, "then": { "$ref": "./1.16.0/entities.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.100" } } }, "then": { "$ref": "./1.16.100/entities.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.100" } } }, "then": { "$ref": "./1.16.100/entities.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16" } } }, "then": { "$ref": "./1.16.0/items.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16" } } }, "then": { "$ref": "./1.16.0/items.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.0" } } }, "then": { "$ref": "./1.16.0/items.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.0" } } }, "then": { "$ref": "./1.16.0/items.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.100" } } }, "then": { "$ref": "./1.16.100/items.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.100" } } }, "then": { "$ref": "./1.16.100/items.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.200" } } }, "then": { "$ref": "./1.16.100/items.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.200" } } }, "then": { "$ref": "./1.16.100/items.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
],
|
],
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.12" } } }, "then": { "$ref": "./1.12.0/recipes.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.12" } } }, "then": { "$ref": "./1.12.0/recipes.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.12.0" } } }, "then": { "$ref": "./1.12.0/recipes.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.12.0" } } }, "then": { "$ref": "./1.12.0/recipes.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
],
|
],
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/spawn_rules.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/spawn_rules.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.11.0" } } }, "then": { "$ref": "./1.11.0/spawn_rules.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.11.0" } } }, "then": { "$ref": "./1.11.0/spawn_rules.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
8
source/general/format_version.json
Normal file
8
source/general/format_version.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema",
|
||||||
|
"$id": "format_version",
|
||||||
|
"title": "Format version",
|
||||||
|
"description": "A version that tells minecraft what type of data format can be expected when reading this file.",
|
||||||
|
"pattern": "^[0-9,.]+?$",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
],
|
],
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/animation_controller.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/animation_controller.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/animation_controller.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/animation_controller.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"examples": [{ "format_version": "1.8.0", "animations": { "animation.annie.idle": { "loop": true, "animation_length": 2.12, "bones": {} } } }],
|
"examples": [{ "format_version": "1.8.0", "animations": { "animation.annie.idle": { "loop": true, "animation_length": 2.12, "bones": {} } } }],
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/actor_animation.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/actor_animation.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/actor_animation.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/actor_animation.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
"allOf": [
|
"allOf": [
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/attachables.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/attachables.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10" } } }, "then": { "$ref": "./1.10.0/attachables.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10" } } }, "then": { "$ref": "./1.10.0/attachables.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/attachables.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/attachables.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
],
|
],
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/entity.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/entity.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/entity.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/entity.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,8 @@
|
|||||||
"$schema": "http://json-schema.org/draft-07/schema",
|
"$schema": "http://json-schema.org/draft-07/schema",
|
||||||
"$id": "blockception.minecraft.resource.fog",
|
"$id": "blockception.minecraft.resource.fog",
|
||||||
"examples": [],
|
"examples": [],
|
||||||
"allOf": [{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.100" } } }, "then": { "$ref": "./1.16.100/fog.json" } }]
|
"allOf": [
|
||||||
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.100" } } }, "then": { "$ref": "./1.16.100/fog.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
],
|
],
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10" } } }, "then": { "$ref": "./1.10.0/items.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10" } } }, "then": { "$ref": "./1.10.0/items.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/items.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/items.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/model_entity.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/model_entity.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.12.0" } } }, "then": { "$ref": "./1.12.0/model_entity.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.12.0" } } }, "then": { "$ref": "./1.12.0/model_entity.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.14.0" } } }, "then": { "$ref": "./1.14.0/model_entity.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.14.0" } } }, "then": { "$ref": "./1.14.0/model_entity.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.0" } } }, "then": { "$ref": "./1.16.0/model_entity.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.0" } } }, "then": { "$ref": "./1.16.0/model_entity.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
],
|
],
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/particle.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/particle.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/particle.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/particle.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"allOf": [
|
"allOf": [
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/render_controllers.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.8.0" } } }, "then": { "$ref": "./1.8.0/render_controllers.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10" } } }, "then": { "$ref": "./1.10.0/render_controllers.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10" } } }, "then": { "$ref": "./1.10.0/render_controllers.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/render_controllers.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/render_controllers.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"examples": [{ "format_version": "1.14.0", "sound_definitions": { "music.game": { "category": "music", "sounds": [""] } } }],
|
"examples": [{ "format_version": "1.14.0", "sound_definitions": { "music.game": { "category": "music", "sounds": [""] } } }],
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "if": { "properties": { "format_version": { "type": "string" } } }, "else": { "$ref": "./sound_definitions_unknown.json" } },
|
{ "if": { "properties": { "format_version": { "type": "string" } } }, "else": { "$ref": "./sound_definitions_unknown.json" } },
|
||||||
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.14.0" } } }, "then": { "$ref": "./1.14.0/sound_definitions.json" } }
|
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.14.0" } } }, "then": { "$ref": "./1.14.0/sound_definitions.json" } },
|
||||||
|
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user