From ca8edab27c6edcb6a0563058720eda6ed19babee Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Thu, 3 Jun 2021 17:22:21 +0200 Subject: [PATCH] Added volumes --- source/behavior/volumes/1.17.0/volumes.json | 98 +++++++++++++++++++++ source/behavior/volumes/volumes.json | 18 ++++ source/compress_specification.json | 3 +- source/general/volume/identifier.json | 8 ++ vscode-settings.json | 16 ++++ 5 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 source/behavior/volumes/1.17.0/volumes.json create mode 100644 source/behavior/volumes/volumes.json create mode 100644 source/general/volume/identifier.json diff --git a/source/behavior/volumes/1.17.0/volumes.json b/source/behavior/volumes/1.17.0/volumes.json new file mode 100644 index 00000000..97c1e54b --- /dev/null +++ b/source/behavior/volumes/1.17.0/volumes.json @@ -0,0 +1,98 @@ +{ + "$id": "blockception.minecraft.behavior.volumes.1.17.0", + "type": "object", + "title": "Spawn Rules 1.17.0", + "description": "TODO", + "additionalProperties": false, + "required": ["format_version", "minecraft:volume"], + "properties": { + "format_version": { + "const": "1.17.0", + "description": "Specifies the version of the game this entity was made in. Minimum supported version is 1.17.0. Current supported version is 1.17.0.", + "title": "TODO Title" + }, + "minecraft:volume": { + "type": "object", + "title": "Spawn Rules", + "description": "TODO", + "additionalProperties": false, + "properties": { + "description": { + "type": "object", + "title": "Description", + "description": "The description contains a single 'identifier' string", + "additionalProperties": false, + "properties": { + "identifier": { + "title": "Identifier", + "description": "The unique identifier for this volume. It must be of the form 'namespace:name', where namespace cannot be 'minecraft'.", + "$ref": "../../../general/volume/identifier.json" + } + } + }, + "components": { + "type": "object", + "title": "Components", + "description": "TODO", + "additionalProperties": false, + "properties": { + "minecraft:bounds": { + "title": "Minecraft:bounds", + "description": "Component that defines a minimum and maximum block position for a bounding box and which world dimension the bounding box is in. Every volume must have a bounds component.", + "type": "object", + "additionalProperties": false, + "properties": { + "dimension": { + "type": "string", + "description": "The name of the dimension the bounding box will exist in: one of 'overworld', 'nether' or 'the end'.", + "title": "Dimension", + "enum": ["overworld", "nether", "the end"] + }, + "max": { + "type": "array", + "description": "The maximum block position of the bounding box.", + "title": "Maximum", + "items": [ + { "title": "A", "type": "number" }, + { "title": "B", "type": "number" }, + { "title": "C", "type": "number" } + ] + }, + "min": { + "type": "array", + "description": "The minimum block position of the bounding box.", + "title": "Minimum", + "items": [ + { "title": "A", "type": "number" }, + { "title": "B", "type": "number" }, + { "title": "C", "type": "number" } + ] + } + } + }, + "minecraft:fog": { + "title": "Minecraft:fog", + "description": "Displays the given fog whenever a player enters the volume. Each volume can only have one fog attached.", + "type": "object", + "additionalProperties": false, + "properties": { + "fog_identifier": { + "type": "string", + "default": "", + "description": "The identifier of a fog definition. Note that you will not receive any feedback if the definition does not exist.", + "title": "fog identifier" + }, + "priority": { + "type": "integer", + "default": 2147483647, + "description": "The priority for this fog definition setting. Smaller numbers have higher priority. Fogs with equal priority will be combined together.", + "title": "priority" + } + } + } + } + } + } + } + } +} diff --git a/source/behavior/volumes/volumes.json b/source/behavior/volumes/volumes.json new file mode 100644 index 00000000..f4fd0584 --- /dev/null +++ b/source/behavior/volumes/volumes.json @@ -0,0 +1,18 @@ +{ + "$id": "blockception.minecraft.behavior.volumes", + "examples": [ + { + "format_version": "1.17.0", + "minecraft:volume": { + "description": { + "identifier": "example:foo" + }, + "components": {} + } + } + ], + "allOf": [ + { "if": { "properties": { "format_version": { "type": "string", "const": "1.17.0" } } }, "then": { "$ref": "./1.17.0/volumes.json" } }, + { "properties": { "format_version": { "$ref": "../../general/format_version.json" } } } + ] +} diff --git a/source/compress_specification.json b/source/compress_specification.json index fd748e06..2b7d0607 100644 --- a/source/compress_specification.json +++ b/source/compress_specification.json @@ -40,6 +40,7 @@ { "Source": "./behavior/items/items.json", "Destination": "../behavior/items/items.json" }, { "Source": "./behavior/recipes/recipes.json", "Destination": "../behavior/recipes/recipes.json" }, { "Source": "./behavior/spawn_rules/spawn_rules.json", "Destination": "../behavior/spawn_rules/spawn_rules.json" }, - { "Source": "./behavior/trading/trading.json", "Destination": "../behavior/trading/trading.json" } + { "Source": "./behavior/trading/trading.json", "Destination": "../behavior/trading/trading.json" }, + { "Source": "./behavior/volumes/volumes.json", "Destination": "../behavior/volumes/volumes.json" } ] } diff --git a/source/general/volume/identifier.json b/source/general/volume/identifier.json new file mode 100644 index 00000000..8f32afe8 --- /dev/null +++ b/source/general/volume/identifier.json @@ -0,0 +1,8 @@ +{ + "$id": "blockception.minecraft.entity.volume.1.8.0", + "type": "string", + "title": "Entity Identifier 1.8.0", + "description": "The minecraft entity volume", + "examples": ["namespace:volume"], + "pattern": "^[0-9a-zA-Z:_\\.\\-]+$" +} diff --git a/vscode-settings.json b/vscode-settings.json index 2680551a..05b5e3a0 100644 --- a/vscode-settings.json +++ b/vscode-settings.json @@ -262,6 +262,22 @@ "*.trade.json" ], "url": "./minecraft-bedrock-schemas/behavior/trading/trading.json" + }, + { + "fileMatch": [ + "behavior_packs/*/volumes/*.json", + "*behavior*pack*/volumes/*.json", + "*Behavior*Pack*/volumes/*.json", + "*BP*/volumes/*.json", + "*bp*/volumes/*.json", + "behavior_packs/*/volumes/**/*.json", + "*behavior*pack*/volumes/**/*.json", + "*Behavior*Pack*/volumes/**/*.json", + "*BP*/volumes/**/*.json", + "*bp*/volumes/**/*.json", + "*.volume.json" + ], + "url": "./minecraft-bedrock-schemas/behavior/volumes/volumes.json" } ] }