From 606c76812bdaa9fdd88d0d177aae6f7da9df379e Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Sat, 11 May 2024 11:48:20 +0200 Subject: [PATCH] Fixing up bp items --- source/behavior/items/format/components/icon.json | 8 ++++++-- test/files/correct/data_bp/items/test2.item.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/behavior/items/format/components/icon.json b/source/behavior/items/format/components/icon.json index 720bca6d..f6b7e8f5 100644 --- a/source/behavior/items/format/components/icon.json +++ b/source/behavior/items/format/components/icon.json @@ -9,14 +9,18 @@ }, { "type": "object", - "additionalProperties": true, + "additionalProperties": false, "required": ["textures"], "properties": { "textures": { "title": "Textures", "description": "Contains key-value pairs of textures used by the item", "type": "object", - "additionalProperties": true, + "additionalProperties": { + "type": "string", + "title": "Texture", + "description": "The key from the resource_pack/textures/item_texture.json `texture_data` object associated with the texture file Example: blaze_powder." + }, "required": ["default"], "properties": { "default": { diff --git a/test/files/correct/data_bp/items/test2.item.json b/test/files/correct/data_bp/items/test2.item.json index 46ea4840..94e8b960 100644 --- a/test/files/correct/data_bp/items/test2.item.json +++ b/test/files/correct/data_bp/items/test2.item.json @@ -10,7 +10,7 @@ "components": { "minecraft:can_destroy_in_creative": { "value": false }, "minecraft:max_stack_size": { "value": 64 }, - "minecraft:icon": { "value": "stick" }, + "minecraft:icon": { "textures": { "default": "stick" } }, "minecraft:glint": { "value": true }, "minecraft:damage": { "value": 2 }, "minecraft:stacked_by_data": { "value": true },