From 2040516e588cc147540a114cc2a637964881c652 Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Sun, 31 Oct 2021 15:15:11 +0100 Subject: [PATCH] Added block reference --- .vscode/settings.json | 2 ++ .../format/components/navigation.climb.json | 2 +- .../format/components/navigation.float.json | 2 +- .../format/components/navigation.fly.json | 2 +- .../format/components/navigation.generic.json | 2 +- .../format/components/navigation.hover.json | 2 +- .../format/components/navigation.swim.json | 2 +- .../format/components/navigation.walk.json | 2 +- source/general/1.10.0/block_reference.json | 19 ----------- source/general/block/reference.json | 32 +++++++++++++++++++ 10 files changed, 41 insertions(+), 26 deletions(-) delete mode 100644 source/general/1.10.0/block_reference.json create mode 100644 source/general/block/reference.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 33cf73e8..46366d9d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,6 +7,8 @@ "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + "editor.insertSpaces": true, + "prettier.printWidth": 150, "prettier.useTabs": false, "prettier.tabWidth": 2 diff --git a/source/behavior/entities/format/components/navigation.climb.json b/source/behavior/entities/format/components/navigation.climb.json index 5fde0ce5..fb44c91c 100644 --- a/source/behavior/entities/format/components/navigation.climb.json +++ b/source/behavior/entities/format/components/navigation.climb.json @@ -36,7 +36,7 @@ "items": { "title": "Block", "description": "Tells the pathfinder which blocks to avoid when creating a path", - "$ref": "../../../../general/block/identifier.json" + "$ref": "../../../../general/block/reference.json" } }, "can_breach": { diff --git a/source/behavior/entities/format/components/navigation.float.json b/source/behavior/entities/format/components/navigation.float.json index c95fa3aa..b860b52f 100644 --- a/source/behavior/entities/format/components/navigation.float.json +++ b/source/behavior/entities/format/components/navigation.float.json @@ -36,7 +36,7 @@ "items": { "title": "Block", "description": "Tells the pathfinder which blocks to avoid when creating a path", - "$ref": "../../../../general/block/identifier.json" + "$ref": "../../../../general/block/reference.json" } }, "can_breach": { diff --git a/source/behavior/entities/format/components/navigation.fly.json b/source/behavior/entities/format/components/navigation.fly.json index 9b1658ed..5505dfa7 100644 --- a/source/behavior/entities/format/components/navigation.fly.json +++ b/source/behavior/entities/format/components/navigation.fly.json @@ -36,7 +36,7 @@ "items": { "title": "Block", "description": "Tells the pathfinder which blocks to avoid when creating a path", - "$ref": "../../../../general/block/identifier.json" + "$ref": "../../../../general/block/reference.json" } }, "can_breach": { diff --git a/source/behavior/entities/format/components/navigation.generic.json b/source/behavior/entities/format/components/navigation.generic.json index 869b0363..b02db343 100644 --- a/source/behavior/entities/format/components/navigation.generic.json +++ b/source/behavior/entities/format/components/navigation.generic.json @@ -36,7 +36,7 @@ "items": { "title": "Block", "description": "Tells the pathfinder which blocks to avoid when creating a path", - "$ref": "../../../../general/block/identifier.json" + "$ref": "../../../../general/block/reference.json" } }, "can_breach": { diff --git a/source/behavior/entities/format/components/navigation.hover.json b/source/behavior/entities/format/components/navigation.hover.json index b151bff5..eca6d6b2 100644 --- a/source/behavior/entities/format/components/navigation.hover.json +++ b/source/behavior/entities/format/components/navigation.hover.json @@ -36,7 +36,7 @@ "items": { "title": "Block", "description": "Tells the pathfinder which blocks to avoid when creating a path", - "$ref": "../../../../general/block/identifier.json" + "$ref": "../../../../general/block/reference.json" } }, "can_breach": { diff --git a/source/behavior/entities/format/components/navigation.swim.json b/source/behavior/entities/format/components/navigation.swim.json index 7bee2d78..53400cab 100644 --- a/source/behavior/entities/format/components/navigation.swim.json +++ b/source/behavior/entities/format/components/navigation.swim.json @@ -36,7 +36,7 @@ "items": { "title": "Block", "description": "Tells the pathfinder which blocks to avoid when creating a path", - "$ref": "../../../../general/block/identifier.json" + "$ref": "../../../../general/block/reference.json" } }, "can_breach": { diff --git a/source/behavior/entities/format/components/navigation.walk.json b/source/behavior/entities/format/components/navigation.walk.json index 50f59a33..26deb4f2 100644 --- a/source/behavior/entities/format/components/navigation.walk.json +++ b/source/behavior/entities/format/components/navigation.walk.json @@ -36,7 +36,7 @@ "items": { "title": "Block", "description": "Tells the pathfinder which blocks to avoid when creating a path", - "$ref": "../../../../general/block/identifier.json" + "$ref": "../../../../general/block/reference.json" } }, "can_breach": { diff --git a/source/general/1.10.0/block_reference.json b/source/general/1.10.0/block_reference.json deleted file mode 100644 index 55f0df3f..00000000 --- a/source/general/1.10.0/block_reference.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$id": "blockception.minecraft.general.1.14.0.block_reference", - "additionalProperties": false, - "type": "object", - "title": "Block Reference", - "description": "UNDOCUMENTED", - "$comment": "UNDOCUMENTED", - "properties": { - "name": { "type": "string", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED", "title": "Name", "$ref": "../block/identifier.json" }, - "states": { - "type": "object", - "propertyNames": { "pattern": "\\w*:?\\w+" }, - "additionalProperties": { "oneOf": [{ "type": "boolean" }, { "type": "integer" }, { "type": "string" }] }, - "description": "UNDOCUMENTED", - "$comment": "UNDOCUMENTED", - "title": "State" - } - } -} diff --git a/source/general/block/reference.json b/source/general/block/reference.json new file mode 100644 index 00000000..62a777a9 --- /dev/null +++ b/source/general/block/reference.json @@ -0,0 +1,32 @@ +{ + "$id": "blockception.minecraft.block.reference", + "description": "A minecraft block reference", + "examples": ["namespace:block", { "name": "namespace:block" }], + "title": "Block Reference", + "oneOf": [ + { "type": "string", "$ref": "./identifier.json" }, + { + "title": "Block Reference", + "description": "", + "type": "object", + "additionalProperties": false, + "properties": { + "name": { "type": "string", "$ref": "./identifier.json" }, + "states": { + "title": "States", + "description": "", + "type": "object", + "propertyNames": { + "pattern": "\\w*:?\\w+" + }, + "example": [{ "property": "value" }], + "additionalProperties": { + "type": ["boolean", "integer", "string"], + "title": "State Value", + "description": "The key of property is the name of the block state/property, the value must be the same as the block properties accepted values" + } + } + } + } + ] +}