From 0967f0790f9846407585b1a518e33cdf3c30219c Mon Sep 17 00:00:00 2001 From: QuazChick <79767058+QuazChick@users.noreply.github.com> Date: Wed, 9 Jul 2025 10:35:04 +0100 Subject: [PATCH] Correct collision/selection box schemas (#359) * Corrected collision box schema * Corrected selection box schema --- .../blocks/format/components/collision_box.json | 12 +++++++----- .../blocks/format/components/selection_box.json | 17 ++++++++++------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/source/behavior/blocks/format/components/collision_box.json b/source/behavior/blocks/format/components/collision_box.json index 50bb88af..5defbfdc 100644 --- a/source/behavior/blocks/format/components/collision_box.json +++ b/source/behavior/blocks/format/components/collision_box.json @@ -13,22 +13,24 @@ "properties": { "origin": { "title": "Origin", + "default": [-8, 0, -8], "description": "Minimal position of the bounds of the collision box. origin is specified as [x, y, z] and must be in the range (-8, 0, -8) to (8, 16, 8), inclusive.", "type": "array", "items": [ - { "title": "X", "type": "number", "minimum": -8.0, "maximum": 8 }, + { "title": "X", "type": "number", "minimum": -8, "maximum": 8 }, { "title": "Y", "type": "number", "minimum": 0, "maximum": 16 }, - { "title": "Z", "type": "number", "minimum": -8.0, "maximum": 8 } + { "title": "Z", "type": "number", "minimum": -8, "maximum": 8 } ] }, "size": { "title": "Size", + "default": [16, 16, 16], "description": "Size of each side of the collision box. Size is specified as [x, y, z]. origin + size must be in the range (-8, 0, -8) to (8, 16, 8), inclusive.", "type": "array", "items": [ - { "title": "X", "type": "number", "minimum": -8.0, "maximum": 8 }, - { "title": "Y", "type": "number","minimum": 0, "maximum": 16 }, - { "title": "Z", "type": "number","minimum": -8.0, "maximum": 8 } + { "title": "X", "type": "number", "minimum": 0, "maximum": 16 }, + { "title": "Y", "type": "number", "minimum": 0, "maximum": 16 }, + { "title": "Z", "type": "number", "minimum": 0, "maximum": 16 } ] } } diff --git a/source/behavior/blocks/format/components/selection_box.json b/source/behavior/blocks/format/components/selection_box.json index 7eec9518..58f111fb 100644 --- a/source/behavior/blocks/format/components/selection_box.json +++ b/source/behavior/blocks/format/components/selection_box.json @@ -3,31 +3,34 @@ "title": "Selection Box", "description": "Defines the area of the block that is selected by the player's cursor. If set to true, default values are used. If set to false, this block is not selectable by the player's cursor. If this component is omitted, default values are used.", "oneOf": [ - { "type": "boolean" }, + { + "type": "boolean", + "default": true + }, { "type": "object", "additionalProperties": false, "properties": { "origin": { "title": "Origin", - "default": [0, 0, 0], + "default": [-8, 0, -8], "description": "Minimal position of the bounds of the selection box. \"origin\" is specified as [x, y, z] and must be in the range (-8, 0, -8) to (8, 16, 8), inclusive.", "type": "array", "items": [ - { "title": "X", "type": "number", "minimum": -8.0, "maximum": 8 }, + { "title": "X", "type": "number", "minimum": -8, "maximum": 8 }, { "title": "Y", "type": "number", "minimum": 0, "maximum": 16 }, - { "title": "Z", "type": "number", "minimum": -8.0, "maximum": 8 } + { "title": "Z", "type": "number", "minimum": -8, "maximum": 8 } ] }, "size": { "title": "Size", - "default": [8.0, 8.0, 8.0], + "default": [16, 16, 16], "description": "Size of each side of the selection box. Size is specified as [x, y, z]. \"origin\" + \"size\" must be in the range (-8, 0, -8) to (8, 16, 8), inclusive.", "type": "array", "items": [ - { "title": "X", "type": "number", "minimum": -8.0, "maximum": 8}, + { "title": "X", "type": "number", "minimum": 0, "maximum": 16 }, { "title": "Y", "type": "number", "minimum": 0, "maximum": 16 }, - { "title": "Z", "type": "number", "minimum": -8.0, "maximum": 8} + { "title": "Z", "type": "number", "minimum": 0, "maximum": 16 } ] } }