From 84b19ed1d583650dfae5fbc8092e44ac53bb2dad Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Sat, 6 Jan 2024 23:22:39 +0100 Subject: [PATCH] Fixing recipes --- source/behavior/recipes/1.12.0/recipes.json | 22 ------ source/behavior/recipes/recipes.json | 40 ++++++----- .../types/base types/definition.json | 32 ++++----- .../{1.12.0 => }/types/base types/item.json | 36 +++++----- .../{1.12.0 => }/types/base types/tags.json | 14 ++-- .../recipes/types/base types/unlock.json | 43 ++++++++++++ .../recipes/{1.12.0 => }/types/furnace.json | 28 ++++---- .../types/recipe_brewing_container.json | 39 ++++++----- .../types/recipe_brewing_mix.json | 39 ++++++----- .../{1.12.0 => }/types/recipe_shaped.json | 69 ++++++++++--------- .../{1.12.0 => }/types/recipe_shapeless.json | 49 ++++++------- .../types/recipe_smithing_transform.json | 3 +- 12 files changed, 221 insertions(+), 193 deletions(-) delete mode 100644 source/behavior/recipes/1.12.0/recipes.json rename source/behavior/recipes/{1.12.0 => }/types/base types/definition.json (96%) rename source/behavior/recipes/{1.12.0 => }/types/base types/item.json (96%) rename source/behavior/recipes/{1.12.0 => }/types/base types/tags.json (97%) create mode 100644 source/behavior/recipes/types/base types/unlock.json rename source/behavior/recipes/{1.12.0 => }/types/furnace.json (98%) rename source/behavior/recipes/{1.12.0 => }/types/recipe_brewing_container.json (93%) rename source/behavior/recipes/{1.12.0 => }/types/recipe_brewing_mix.json (93%) rename source/behavior/recipes/{1.12.0 => }/types/recipe_shaped.json (96%) rename source/behavior/recipes/{1.12.0 => }/types/recipe_shapeless.json (95%) rename source/behavior/recipes/{1.12.0 => }/types/recipe_smithing_transform.json (91%) diff --git a/source/behavior/recipes/1.12.0/recipes.json b/source/behavior/recipes/1.12.0/recipes.json deleted file mode 100644 index b8cde7232..000000000 --- a/source/behavior/recipes/1.12.0/recipes.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$id": "blockception.minecraft.behavior.1.12.0.recipe", - "description": "Minecraft recipe", - "required": ["format_version"], - "additionalProperties": false, - "minProperties": 2, - "type": "object", - "title": "Recipe", - "properties": { - "format_version": { - "type": "string", - "description": "A version that tells minecraft what type of data format can be expected when reading this file.", - "title": "Format Version" - }, - "minecraft:recipe_furnace": { "$ref": "./types/furnace.json" }, - "minecraft:recipe_brewing_container": { "$ref": "./types/recipe_brewing_container.json" }, - "minecraft:recipe_brewing_mix": { "$ref": "./types/recipe_brewing_mix.json" }, - "minecraft:recipe_shaped": { "$ref": "./types/recipe_shaped.json" }, - "minecraft:recipe_shapeless": { "$ref": "./types/recipe_shapeless.json" }, - "minecraft:recipe_smithing_transform": { "$ref": "./types/recipe_smithing_transform.json" } - } -} diff --git a/source/behavior/recipes/recipes.json b/source/behavior/recipes/recipes.json index 6f250570f..aed2f7944 100644 --- a/source/behavior/recipes/recipes.json +++ b/source/behavior/recipes/recipes.json @@ -1,21 +1,23 @@ { - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "blockception.minecraft.behavior.recipes", - "examples": [ - { - "format_version": "1.20.41", - "minecraft:recipe_shaped": { - "description": { "identifier": "minecraft:item" }, - "tags": ["crafting_table"], - "pattern": [], - "key": {}, - "result": { "item": "minecraft:boat", "data": 4 } - } - } - ], - "allOf": [ - { "if": { "properties": { "format_version": { "type": "string", "const": "1.12" } } }, "then": { "$ref": "./1.12.0/recipes.json" } }, - { "if": { "properties": { "format_version": { "type": "string", "const": "1.12.0" } } }, "then": { "$ref": "./1.12.0/recipes.json" } }, - { "properties": { "format_version": { "$ref": "../../general/format_version.json" } } } - ] + "$id": "blockception.minecraft.behavior.1.12.0.recipe", + "description": "Minecraft recipe", + "required": ["format_version"], + "additionalProperties": false, + "minProperties": 2, + "type": "object", + "title": "Recipe", + "descreiption": "A recipe is a set of ingredients and a result that can be crafted using a crafting table, furnace, brewing stand, or stonecutter.", + "properties": { + "format_version": { + "type": "string", + "description": "A version that tells minecraft what type of data format can be expected when reading this file.", + "title": "Format Version" + }, + "minecraft:recipe_furnace": { "$ref": "./types/furnace.json" }, + "minecraft:recipe_brewing_container": { "$ref": "./types/recipe_brewing_container.json" }, + "minecraft:recipe_brewing_mix": { "$ref": "./types/recipe_brewing_mix.json" }, + "minecraft:recipe_shaped": { "$ref": "./types/recipe_shaped.json" }, + "minecraft:recipe_shapeless": { "$ref": "./types/recipe_shapeless.json" }, + "minecraft:recipe_smithing_transform": { "$ref": "./types/recipe_smithing_transform.json" } + } } diff --git a/source/behavior/recipes/1.12.0/types/base types/definition.json b/source/behavior/recipes/types/base types/definition.json similarity index 96% rename from source/behavior/recipes/1.12.0/types/base types/definition.json rename to source/behavior/recipes/types/base types/definition.json index f8cd61f33..37bce2f0b 100644 --- a/source/behavior/recipes/1.12.0/types/base types/definition.json +++ b/source/behavior/recipes/types/base types/definition.json @@ -1,16 +1,16 @@ -{ - "$id": "blockception.minecraft.behavior.1.12.0.recipe.definition", - "description": "Recipe definition 1.12.0", - "title": "Definition", - "type": "object", - "properties": { - "identifier": { - "type": "string", - "pattern": "[a-z0-9_:\\-]+", - "title": "Recipe Identifier", - "description": "UNDOCUMENTED.", - "$comment": "UNDOCUMENTED" - } - }, - "additionalProperties": false -} +{ + "$id": "blockception.minecraft.behavior.1.12.0.recipe.definition", + "description": "Recipe definition 1.12.0", + "title": "Definition", + "type": "object", + "properties": { + "identifier": { + "type": "string", + "pattern": "[a-z0-9_:\\-]+", + "title": "Recipe Identifier", + "description": "UNDOCUMENTED.", + "$comment": "UNDOCUMENTED" + } + }, + "additionalProperties": false +} diff --git a/source/behavior/recipes/1.12.0/types/base types/item.json b/source/behavior/recipes/types/base types/item.json similarity index 96% rename from source/behavior/recipes/1.12.0/types/base types/item.json rename to source/behavior/recipes/types/base types/item.json index fa635cb4f..25b48968a 100644 --- a/source/behavior/recipes/1.12.0/types/base types/item.json +++ b/source/behavior/recipes/types/base types/item.json @@ -1,18 +1,18 @@ -{ - "$id": "blockception.minecraft.behavior.1.12.0.recipe.item", - "description": "Recipe item 1.12.0", - "title": "Item", - "oneOf": [ - { "type": "string", "title": "Item Identifier" }, - { - "additionalProperties": false, - "type": "object", - "required": ["item"], - "properties": { - "item": { "type": "string", "title": "Item Identifier" }, - "data": { "type": "integer", "minimum": 0, "title": "Item Data Value" }, - "count": { "type": "integer", "minimum": 1, "default": 1, "title": "Count" } - } - } - ] -} +{ + "$id": "blockception.minecraft.behavior.1.12.0.recipe.item", + "description": "Recipe item 1.12.0", + "title": "Item", + "oneOf": [ + { "type": "string", "title": "Item Identifier" }, + { + "additionalProperties": false, + "type": "object", + "required": ["item"], + "properties": { + "item": { "type": "string", "title": "Item Identifier" }, + "data": { "type": "integer", "minimum": 0, "title": "Item Data Value" }, + "count": { "type": "integer", "minimum": 1, "default": 1, "title": "Count" } + } + } + ] +} diff --git a/source/behavior/recipes/1.12.0/types/base types/tags.json b/source/behavior/recipes/types/base types/tags.json similarity index 97% rename from source/behavior/recipes/1.12.0/types/base types/tags.json rename to source/behavior/recipes/types/base types/tags.json index 20cc2b0bc..1b185c7ce 100644 --- a/source/behavior/recipes/1.12.0/types/base types/tags.json +++ b/source/behavior/recipes/types/base types/tags.json @@ -1,7 +1,7 @@ -{ - "$id": "blockception.minecraft.behavior.1.12.0.recipe.tags", - "description": "Recipe tags 1.12.0", - "title": "Tags", - "type": "array", - "items": { "type": "string", "title": "Tag", "examples": ["smithing_table", "deprecated"] } -} +{ + "$id": "blockception.minecraft.behavior.1.12.0.recipe.tags", + "description": "Recipe tags 1.12.0", + "title": "Tags", + "type": "array", + "items": { "type": "string", "title": "Tag", "examples": ["smithing_table", "deprecated"] } +} diff --git a/source/behavior/recipes/types/base types/unlock.json b/source/behavior/recipes/types/base types/unlock.json new file mode 100644 index 000000000..2813fd7d1 --- /dev/null +++ b/source/behavior/recipes/types/base types/unlock.json @@ -0,0 +1,43 @@ +{ + "title": "Item", + "$id": "blockception.minecraft.behavior.recipe.unlock", + "description": "Unlock achievement", + "type": "object", + "required": ["context"], + "oneOf": [ + { + "properties": { + "context": { + "type": "string", + "title": "Context", + "description": "The context of the achievement to unlock" + } + } + }, + { + "properties": { + "item": { + "type": "string", + "title": "Item", + "examples": ["minecraft:stick"], + "description": "The item to unlock" + }, + "data": { + "type": "integer", + "title": "Data", + "description": "The data of the item to unlock" + } + } + }, + { + "properties": { + "tag": { + "type": "string", + "title": "Item Tag", + "description": "The item to unlock", + "examples": ["minecraft:planks", "minecraft:wooden_slabs"] + } + } + } + ] +} diff --git a/source/behavior/recipes/1.12.0/types/furnace.json b/source/behavior/recipes/types/furnace.json similarity index 98% rename from source/behavior/recipes/1.12.0/types/furnace.json rename to source/behavior/recipes/types/furnace.json index 84bd5b467..85c36f5cc 100644 --- a/source/behavior/recipes/1.12.0/types/furnace.json +++ b/source/behavior/recipes/types/furnace.json @@ -1,14 +1,14 @@ -{ - "$id": "blockception.minecraft.behavior.1.12.0.recipe.furnace", - "description": "Represents a furnace recipe for a furnace.'Input` items will burn and transform into items specified in `output`..", - "title": "Furnace Recipe 1.12.0", - "additionalProperties": false, - "required": ["description"], - "type": "object", - "properties": { - "description": { "$ref": "./base types/definition.json" }, - "tags": { "$ref": "./base types/tags.json" }, - "input": { "type": "string", "description": "Items used as input for the furnace recipe.", "title": "Input" }, - "output": { "type": "string", "description": "Items used as output for the furnace recipe.", "title": "Output" } - } -} +{ + "$id": "blockception.minecraft.behavior.1.12.0.recipe.furnace", + "description": "Represents a furnace recipe for a furnace.'Input` items will burn and transform into items specified in `output`..", + "title": "Furnace Recipe 1.12.0", + "additionalProperties": false, + "required": ["description"], + "type": "object", + "properties": { + "description": { "$ref": "./base types/definition.json" }, + "tags": { "$ref": "./base types/tags.json" }, + "input": { "type": "string", "description": "Items used as input for the furnace recipe.", "title": "Input" }, + "output": { "type": "string", "description": "Items used as output for the furnace recipe.", "title": "Output" } + } +} diff --git a/source/behavior/recipes/1.12.0/types/recipe_brewing_container.json b/source/behavior/recipes/types/recipe_brewing_container.json similarity index 93% rename from source/behavior/recipes/1.12.0/types/recipe_brewing_container.json rename to source/behavior/recipes/types/recipe_brewing_container.json index 1b7cb8443..9792cc42c 100644 --- a/source/behavior/recipes/1.12.0/types/recipe_brewing_container.json +++ b/source/behavior/recipes/types/recipe_brewing_container.json @@ -1,19 +1,20 @@ -{ - "$id": "blockception.minecraft.behavior.1.12.0.recipe.brewing.container", - "description": "Represents a Potion Brewing Container Recipe..", - "title": "Brewing Recipe 1.12.0", - "additionalProperties": false, - "required": ["description"], - "type": "object", - "properties": { - "description": { "$ref": "./base types/definition.json" }, - "tags": { "$ref": "./base types/tags.json" }, - "input": { "type": "string", "description": "Input potion used on the brewing stand.", "title": "Input" }, - "output": { - "type": "string", - "description": "Output potion from mixing the input potion with the reagent on the brewing stand.", - "title": "Output" - }, - "reagent": { "type": "string", "description": "Item used to mix with the input potion.", "title": "Reagent" } - } -} +{ + "$id": "blockception.minecraft.behavior.1.12.0.recipe.brewing.container", + "description": "Represents a Potion Brewing Container Recipe..", + "title": "Brewing Recipe 1.12.0", + "additionalProperties": false, + "required": ["description"], + "type": "object", + "properties": { + "description": { "$ref": "./base types/definition.json" }, + "tags": { "$ref": "./base types/tags.json" }, + "unlock": { "$ref": "./base types/unlock.json" }, + "input": { "type": "string", "description": "Input potion used on the brewing stand.", "title": "Input" }, + "output": { + "type": "string", + "description": "Output potion from mixing the input potion with the reagent on the brewing stand.", + "title": "Output" + }, + "reagent": { "type": "string", "description": "Item used to mix with the input potion.", "title": "Reagent" } + } +} diff --git a/source/behavior/recipes/1.12.0/types/recipe_brewing_mix.json b/source/behavior/recipes/types/recipe_brewing_mix.json similarity index 93% rename from source/behavior/recipes/1.12.0/types/recipe_brewing_mix.json rename to source/behavior/recipes/types/recipe_brewing_mix.json index 2447c90fd..0d768fe6f 100644 --- a/source/behavior/recipes/1.12.0/types/recipe_brewing_mix.json +++ b/source/behavior/recipes/types/recipe_brewing_mix.json @@ -1,19 +1,20 @@ -{ - "$id": "blockception.minecraft.behavior.1.12.0.recipe.brewing.mix", - "description": "Represents a Potion Brewing Container Recipe..", - "title": "Brewing Recipe 1.12.0", - "additionalProperties": false, - "required": ["description"], - "type": "object", - "properties": { - "description": { "$ref": "./base types/definition.json" }, - "tags": { "$ref": "./base types/tags.json" }, - "input": { "type": "string", "description": "Input potion used on the brewing stand.", "title": "Input" }, - "output": { - "type": "string", - "description": "Output potion from mixing the input potion with the reagent on the brewing stand.", - "title": "Output" - }, - "reagent": { "type": "string", "description": "Item used to mix with the input potion.", "title": "Reagent" } - } -} +{ + "$id": "blockception.minecraft.behavior.1.12.0.recipe.brewing.mix", + "description": "Represents a Potion Brewing Container Recipe..", + "title": "Brewing Recipe 1.12.0", + "additionalProperties": false, + "required": ["description"], + "type": "object", + "properties": { + "description": { "$ref": "./base types/definition.json" }, + "tags": { "$ref": "./base types/tags.json" }, + "unlock": { "$ref": "./base types/unlock.json" }, + "input": { "type": "string", "description": "Input potion used on the brewing stand.", "title": "Input" }, + "output": { + "type": "string", + "description": "Output potion from mixing the input potion with the reagent on the brewing stand.", + "title": "Output" + }, + "reagent": { "type": "string", "description": "Item used to mix with the input potion.", "title": "Reagent" } + } +} diff --git a/source/behavior/recipes/1.12.0/types/recipe_shaped.json b/source/behavior/recipes/types/recipe_shaped.json similarity index 96% rename from source/behavior/recipes/1.12.0/types/recipe_shaped.json rename to source/behavior/recipes/types/recipe_shaped.json index e2161f66f..de1082e3b 100644 --- a/source/behavior/recipes/1.12.0/types/recipe_shaped.json +++ b/source/behavior/recipes/types/recipe_shaped.json @@ -1,34 +1,35 @@ -{ - "$id": "blockception.minecraft.behavior.1.12.0.recipe.shaped", - "description": "Represents a shaped crafting recipe for a crafting table. The key used in the pattern may be any single character except the `space` character, which is reserved for empty slots in a recipe..", - "title": "Shaped Recipe 1.12.0", - "additionalProperties": false, - "required": ["description"], - "type": "object", - "properties": { - "description": { "$ref": "./base types/definition.json" }, - "tags": { "$ref": "./base types/tags.json" }, - "key": { - "type": "object", - "description": "Patten key character mapped to item names.", - "title": "Key", - "minProperties": 1, - "additionalProperties": { "$ref": "./base types/item.json" } - }, - "group": { "type": "string", "title": "Group", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" }, - "pattern": { - "type": "array", - "description": "Characters that represent a pattern to be defined by keys.", - "title": "Pattern", - "maxItems": 3, - "minItems": 1, - "items": { "type": "string", "title": "Pattern" } - }, - "priority": { "type": "integer", "description": "Item used as output for the furnace recipe.", "title": "Priority" }, - "result": { - "description": "When input items match the pattern then these items are the result.", - "title": "Result", - "oneOf": [{ "$ref": "./base types/item.json" }, { "type": "array", "items": { "$ref": "./base types/item.json" } }] - } - } -} +{ + "$id": "blockception.minecraft.behavior.1.12.0.recipe.shaped", + "description": "Represents a shaped crafting recipe for a crafting table. The key used in the pattern may be any single character except the `space` character, which is reserved for empty slots in a recipe..", + "title": "Shaped Recipe 1.12.0", + "additionalProperties": false, + "required": ["description"], + "type": "object", + "properties": { + "description": { "$ref": "./base types/definition.json" }, + "tags": { "$ref": "./base types/tags.json" }, + "unlock": { "$ref": "./base types/unlock.json" }, + "key": { + "type": "object", + "description": "Patten key character mapped to item names.", + "title": "Key", + "minProperties": 1, + "additionalProperties": { "$ref": "./base types/item.json" } + }, + "group": { "type": "string", "title": "Group", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" }, + "pattern": { + "type": "array", + "description": "Characters that represent a pattern to be defined by keys.", + "title": "Pattern", + "maxItems": 3, + "minItems": 1, + "items": { "type": "string", "title": "Pattern" } + }, + "priority": { "type": "integer", "description": "Item used as output for the furnace recipe.", "title": "Priority" }, + "result": { + "description": "When input items match the pattern then these items are the result.", + "title": "Result", + "oneOf": [{ "$ref": "./base types/item.json" }, { "type": "array", "items": { "$ref": "./base types/item.json" } }] + } + } +} diff --git a/source/behavior/recipes/1.12.0/types/recipe_shapeless.json b/source/behavior/recipes/types/recipe_shapeless.json similarity index 95% rename from source/behavior/recipes/1.12.0/types/recipe_shapeless.json rename to source/behavior/recipes/types/recipe_shapeless.json index 327eb6018..735b92ab0 100644 --- a/source/behavior/recipes/1.12.0/types/recipe_shapeless.json +++ b/source/behavior/recipes/types/recipe_shapeless.json @@ -1,24 +1,25 @@ -{ - "$id": "blockception.minecraft.behavior.1.12.0.recipe.shapeless", - "description": "Represents a shapeless crafting recipe..", - "title": "Shapeless Recipe 1.12.0", - "additionalProperties": false, - "required": ["description"], - "type": "object", - "properties": { - "description": { "$ref": "./base types/definition.json" }, - "tags": { "$ref": "./base types/tags.json" }, - "ingredients": { - "description": "Items used as input (without a shape) for the recipe.", - "title": "Ingredients", - "oneOf": [{ "$ref": "./base types/item.json" }, { "type": "array", "items": { "$ref": "./base types/item.json" } }] - }, - "group": { "type": "string", "title": "Group", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" }, - "priority": { "type": "integer", "description": "Item used as output for the furnace recipe.", "title": "Priority" }, - "result": { - "description": "When input items match the pattern then these items are the result.", - "title": "Result", - "oneOf": [{ "$ref": "./base types/item.json" }, { "type": "array", "items": { "$ref": "./base types/item.json" } }] - } - } -} +{ + "$id": "blockception.minecraft.behavior.1.12.0.recipe.shapeless", + "description": "Represents a shapeless crafting recipe..", + "title": "Shapeless Recipe 1.12.0", + "additionalProperties": false, + "required": ["description"], + "type": "object", + "properties": { + "description": { "$ref": "./base types/definition.json" }, + "tags": { "$ref": "./base types/tags.json" }, + "unlock": { "$ref": "./base types/unlock.json" }, + "ingredients": { + "description": "Items used as input (without a shape) for the recipe.", + "title": "Ingredients", + "oneOf": [{ "$ref": "./base types/item.json" }, { "type": "array", "items": { "$ref": "./base types/item.json" } }] + }, + "group": { "type": "string", "title": "Group", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" }, + "priority": { "type": "integer", "description": "Item used as output for the furnace recipe.", "title": "Priority" }, + "result": { + "description": "When input items match the pattern then these items are the result.", + "title": "Result", + "oneOf": [{ "$ref": "./base types/item.json" }, { "type": "array", "items": { "$ref": "./base types/item.json" } }] + } + } +} diff --git a/source/behavior/recipes/1.12.0/types/recipe_smithing_transform.json b/source/behavior/recipes/types/recipe_smithing_transform.json similarity index 91% rename from source/behavior/recipes/1.12.0/types/recipe_smithing_transform.json rename to source/behavior/recipes/types/recipe_smithing_transform.json index c05835e05..defbbc50d 100644 --- a/source/behavior/recipes/1.12.0/types/recipe_smithing_transform.json +++ b/source/behavior/recipes/types/recipe_smithing_transform.json @@ -1,13 +1,14 @@ { "$id": "blockception.minecraft.behavior.1.12.0.recipe.recipe_smithing_transform", "description": "Represents a smithing table crafting recipe..", - "title": "Smithing transform Recipe 1.12.0", + "title": "Smithing Transform Recipe 1.12.0", "additionalProperties": false, "required": ["description"], "type": "object", "properties": { "description": { "$ref": "./base types/definition.json" }, "tags": { "$ref": "./base types/tags.json" }, + "unlock": { "$ref": "./base types/unlock.json" }, "base": { "description": "Item used as base for the smithing recipe.", "title": "Base",