From 74b890479e642a555d66ed8cc4d407c2f63824cd Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Mon, 27 Sep 2021 10:44:55 +0200 Subject: [PATCH] Added tick.json validation --- source/behavior/functions/tick.json | 21 +++++++++++++++++++++ source/compress_specification.json | 1 + vscode-settings.json | 4 ++++ 3 files changed, 26 insertions(+) create mode 100644 source/behavior/functions/tick.json diff --git a/source/behavior/functions/tick.json b/source/behavior/functions/tick.json new file mode 100644 index 00000000..52f51141 --- /dev/null +++ b/source/behavior/functions/tick.json @@ -0,0 +1,21 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Tick", + "description": "Mcfunction that are to be called per game tick (20 times per second)", + "additionalProperties": false, + "examples": [{ "values": ["foo"] }], + "properties": { + "values": { + "title": "Values", + "description": "The collection of function path to execute", + "type": "array", + "items": { + "title": "Function path", + "description": "The path to the function", + "type": "string", + "pattern": "[a-zA-Z_\\-\\/ ]+", + "examples": ["foo", "folder/foo"] + } + } + } +} diff --git a/source/compress_specification.json b/source/compress_specification.json index 3fbdcfeb..40a4c94f 100644 --- a/source/compress_specification.json +++ b/source/compress_specification.json @@ -40,6 +40,7 @@ { "Source": "./behavior/entities/entities.json", "Destination": "../behavior/entities/entities.json" }, { "Source": "./behavior/features/features.json", "Destination": "../behavior/features/features.json" }, { "Source": "./behavior/feature_rules/feature_rules.json", "Destination": "../behavior/feature_rules/feature_rules.json" }, + { "Source": "./behavior/functions/tick.json", "Destination": "../behavior/functions/tick.json" }, { "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" }, diff --git a/vscode-settings.json b/vscode-settings.json index 4a6e1e6c..ce708a24 100644 --- a/vscode-settings.json +++ b/vscode-settings.json @@ -191,6 +191,10 @@ ], "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/dialogue/dialogue.json" }, + { + "fileMatch": [ "functions/tick.json" ], + "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/functions/tick.json" + }, { "fileMatch": [ "behavior_packs/*/loot_tables/*.json",