Adding format version regex

This commit is contained in:
DaanV2
2021-04-06 22:41:46 +02:00
parent 659442fefd
commit 7d96ec8f17
20 changed files with 53 additions and 20 deletions

View File

@@ -5,12 +5,16 @@
{
"format_version": "1.10.0",
"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": [
{ "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" } } }
]
}

View File

@@ -4,6 +4,7 @@
"examples": [{ "format_version": "1.10.0", "animations": { "animation.example": {} } }],
"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.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" } } }
]
}

View File

@@ -7,6 +7,9 @@
"type": "object",
"title": "Biome",
"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" } } }
]
}
}

View File

@@ -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.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.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" } } }
]
}

View File

@@ -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.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.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" } } }
]
}

View File

@@ -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.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.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" } } }
]
}

View File

@@ -15,6 +15,7 @@
],
"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.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" } } }
]
}

View File

@@ -6,6 +6,7 @@
],
"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.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" } } }
]
}

View 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"
}

View File

@@ -16,6 +16,7 @@
],
"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.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" } } }
]
}

View File

@@ -4,6 +4,7 @@
"examples": [{ "format_version": "1.8.0", "animations": { "animation.annie.idle": { "loop": true, "animation_length": 2.12, "bones": {} } } }],
"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.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" } } }
]
}

View File

@@ -19,6 +19,7 @@
"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.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" } } }
]
}

View File

@@ -21,6 +21,7 @@
],
"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.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" } } }
]
}

View File

@@ -2,5 +2,8 @@
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "blockception.minecraft.resource.fog",
"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" } } }
]
}

View File

@@ -12,6 +12,7 @@
],
"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.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" } } }
]
}

View File

@@ -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.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.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" } } }
]
}

View File

@@ -13,6 +13,7 @@
],
"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.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" } } }
]
}

View File

@@ -13,6 +13,7 @@
"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.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" } } }
]
}

View File

@@ -4,6 +4,7 @@
"examples": [{ "format_version": "1.14.0", "sound_definitions": { "music.game": { "category": "music", "sounds": [""] } } }],
"allOf": [
{ "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" } } }
]
}