From c3516b06cf8705d7f242d9d17a7c47c3b3a2a1ea Mon Sep 17 00:00:00 2001 From: Xterionix <72647213+Xterionix@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:16:15 +0500 Subject: [PATCH] - Add separate ref to creative tabs and groups (#233) - Change description so it's not UNDOCUMENTED --- .../blocks/format/minecraft.block.json | 127 +----------------- .../behavior/items/format/minecraft.item.json | 13 +- source/general/vanilla/creative_category.json | 14 ++ source/general/vanilla/item_group.json | 87 ++++++++++++ 4 files changed, 106 insertions(+), 135 deletions(-) create mode 100644 source/general/vanilla/creative_category.json create mode 100644 source/general/vanilla/item_group.json diff --git a/source/behavior/blocks/format/minecraft.block.json b/source/behavior/blocks/format/minecraft.block.json index 8fda0d13..aa3010f3 100644 --- a/source/behavior/blocks/format/minecraft.block.json +++ b/source/behavior/blocks/format/minecraft.block.json @@ -73,133 +73,10 @@ "required": ["category"], "properties": { "category": { - "title": "Category", - "description": "Determines which category this block will be placed under in the inventory and crafting table container screens. Options are \"construction\", \"nature\", \"equipment\", \"items\", and \"none\". If omitted or \"none\" is specified, the block will not appear in the inventory or crafting table container screens.", - "type": "string", - "enum": ["construction", "nature", "equipment", "items", "none"] + "$ref": "../../../general/vanilla/creative_category.json" }, "group": { - "title": "Group", - "$comment": "UNDOCUMENTED", - "description": "A translation string of an existing group in minecraft to group this item under", - "type": "string", - "enum": [ - "itemGroup.name.anvil", - "itemGroup.name.arrow", - "itemGroup.name.axe", - "itemGroup.name.banner_pattern", - "itemGroup.name.banner", - "itemGroup.name.beacon", - "itemGroup.name.bed", - "itemGroup.name.bell", - "itemGroup.name.boat", - "itemGroup.name.boots", - "itemGroup.name.brick", - "itemGroup.name.buttons", - "itemGroup.name.cactus", - "itemGroup.name.camera", - "itemGroup.name.candles", - "itemGroup.name.chemistrytable", - "itemGroup.name.chest", - "itemGroup.name.chestboat", - "itemGroup.name.chestplate", - "itemGroup.name.clay", - "itemGroup.name.climbing", - "itemGroup.name.cobblestone", - "itemGroup.name.composter", - "itemGroup.name.concrete", - "itemGroup.name.concretePowder", - "itemGroup.name.constructionMisc", - "itemGroup.name.cookedFood", - "itemGroup.name.copper", - "itemGroup.name.coral_decorations", - "itemGroup.name.coral", - "itemGroup.name.craftingTables", - "itemGroup.name.crop", - "itemGroup.name.dirt", - "itemGroup.name.door", - "itemGroup.name.dye", - "itemGroup.name.eggBlocks", - "itemGroup.name.element", - "itemGroup.name.enchantedBook", - "itemGroup.name.enchantingTable", - "itemGroup.name.endPortalFrame", - "itemGroup.name.endRod", - "itemGroup.name.fence", - "itemGroup.name.fenceGate", - "itemGroup.name.firework", - "itemGroup.name.fireworkStars", - "itemGroup.name.flower", - "itemGroup.name.furnaces", - "itemGroup.name.glass", - "itemGroup.name.glassPane", - "itemGroup.name.glazedTerracotta", - "itemGroup.name.glowstone", - "itemGroup.name.goatHorn", - "itemGroup.name.grass", - "itemGroup.name.gravel", - "itemGroup.name.greenery", - "itemGroup.name.grindStone", - "itemGroup.name.helmet", - "itemGroup.name.hoe", - "itemGroup.name.horseArmor", - "itemGroup.name.ice", - "itemGroup.name.ironFence", - "itemGroup.name.items", - "itemGroup.name.leaves", - "itemGroup.name.lectern", - "itemGroup.name.leggings", - "itemGroup.name.lights", - "itemGroup.name.lingeringPotion", - "itemGroup.name.log", - "itemGroup.name.minecart", - "itemGroup.name.miscFood", - "itemGroup.name.mobEgg", - "itemGroup.name.monsterStoneEgg", - "itemGroup.name.mushroom", - "itemGroup.name.musicBlocks", - "itemGroup.name.natureBuildingBlocks", - "itemGroup.name.natureMisc", - "itemGroup.name.ore", - "itemGroup.name.oreBlocks", - "itemGroup.name.permission", - "itemGroup.name.pickaxe", - "itemGroup.name.pistons", - "itemGroup.name.planks", - "itemGroup.name.potion", - "itemGroup.name.pressurePlate", - "itemGroup.name.pumpkins", - "itemGroup.name.purpur", - "itemGroup.name.rail", - "itemGroup.name.rawFood", - "itemGroup.name.record", - "itemGroup.name.redstone", - "itemGroup.name.redstoneContainers", - "itemGroup.name.redstoneProducers", - "itemGroup.name.sand", - "itemGroup.name.sandstone", - "itemGroup.name.sapling", - "itemGroup.name.sculk", - "itemGroup.name.seed", - "itemGroup.name.shovel", - "itemGroup.name.shulkerBox", - "itemGroup.name.sign", - "itemGroup.name.skull", - "itemGroup.name.slab", - "itemGroup.name.splashPotion", - "itemGroup.name.stainedClay", - "itemGroup.name.stairs", - "itemGroup.name.stone", - "itemGroup.name.stoneBrick", - "itemGroup.name.sword", - "itemGroup.name.tnt", - "itemGroup.name.torch", - "itemGroup.name.trapdoor", - "itemGroup.name.walls", - "itemGroup.name.wood", - "itemGroup.name.wool", - "itemGroup.name.woolCarpet" - ] + "$ref": "../../../general/vanilla/item_group.json" }, "is_hidden_in_commands": { "title": "Is Hidden In Commands", diff --git a/source/behavior/items/format/minecraft.item.json b/source/behavior/items/format/minecraft.item.json index ca40460d..8c1f607c 100644 --- a/source/behavior/items/format/minecraft.item.json +++ b/source/behavior/items/format/minecraft.item.json @@ -11,7 +11,7 @@ "additionalProperties": false, "type": "object", "title": "Description", - "description": "UNDOCUMENTED.", + "description": "The description for this item", "$comment": "UNDOCUMENTED", "properties": { "identifier": { @@ -33,17 +33,10 @@ "additionalProperties": false, "properties": { "group": { - "type": "string", - "title": "Group", - "maxLength": 256, - "description": "The Creative Group that that includes the specified item. The group name is limited to 256 characters.", - "examples": ["itemGroup.name.blaze"] + "$ref": "../../../general/vanilla/item_group.json" }, "category": { - "type": "string", - "title": "Category", - "description": "The Creative Category that includes the specified item.", - "examples": ["equipment"] + "$ref": "../../../general/vanilla/creative_category.json" }, "is_hidden_in_commands": { "type": "boolean", diff --git a/source/general/vanilla/creative_category.json b/source/general/vanilla/creative_category.json new file mode 100644 index 00000000..92c33cc0 --- /dev/null +++ b/source/general/vanilla/creative_category.json @@ -0,0 +1,14 @@ +{ + "$id": "blockception.minecraft.general.vanilla.creative_category", + "type": "string", + "title": "Category", + "description": "Determines which category this block/item will be placed under in the inventory and crafting table container screens.", + "enum": [ + "nature", + "construction", + "items", + "equipment", + "none", + "commands" + ] +} \ No newline at end of file diff --git a/source/general/vanilla/item_group.json b/source/general/vanilla/item_group.json new file mode 100644 index 00000000..ed462e6b --- /dev/null +++ b/source/general/vanilla/item_group.json @@ -0,0 +1,87 @@ +{ + "$id": "blockception.minecraft.general.vanilla.item_group", + "type": "string", + "title": "Item Group", + "description": "A translation string of an existing group in minecraft to group this block/item under", + "enum": [ + "itemGroup.name.anvil", + "itemGroup.name.arrow", + "itemGroup.name.axe", + "itemGroup.name.banner", + "itemGroup.name.banner_pattern", + "itemGroup.name.bed", + "itemGroup.name.boat", + "itemGroup.name.boots", + "itemGroup.name.buttons", + "itemGroup.name.candles", + "itemGroup.name.chalkboard", + "itemGroup.name.chest", + "itemGroup.name.chestboat", + "itemGroup.name.chestplate", + "itemGroup.name.concrete", + "itemGroup.name.concretePowder", + "itemGroup.name.cookedFood", + "itemGroup.name.copper", + "itemGroup.name.coral", + "itemGroup.name.coral_decorations", + "itemGroup.name.crop", + "itemGroup.name.door", + "itemGroup.name.dye", + "itemGroup.name.enchantedBook", + "itemGroup.name.fence", + "itemGroup.name.fenceGate", + "itemGroup.name.firework", + "itemGroup.name.fireworkStars", + "itemGroup.name.flower", + "itemGroup.name.glass", + "itemGroup.name.glassPane", + "itemGroup.name.glazedTerracotta", + "itemGroup.name.goatHorn", + "itemGroup.name.grass", + "itemGroup.name.hanging_sign", + "itemGroup.name.helmet", + "itemGroup.name.hoe", + "itemGroup.name.horseArmor", + "itemGroup.name.leaves", + "itemGroup.name.leggings", + "itemGroup.name.lingeringPotion", + "itemGroup.name.log", + "itemGroup.name.minecart", + "itemGroup.name.miscFood", + "itemGroup.name.mobEgg", + "itemGroup.name.monsterStoneEgg", + "itemGroup.name.mushroom", + "itemGroup.name.netherWartBlock", + "itemGroup.name.ore", + "itemGroup.name.permission", + "itemGroup.name.pickaxe", + "itemGroup.name.planks", + "itemGroup.name.potion", + "itemGroup.name.potterySherds", + "itemGroup.name.pressurePlate", + "itemGroup.name.rail", + "itemGroup.name.rawFood", + "itemGroup.name.record", + "itemGroup.name.sandstone", + "itemGroup.name.sapling", + "itemGroup.name.sculk", + "itemGroup.name.seed", + "itemGroup.name.shovel", + "itemGroup.name.shulkerBox", + "itemGroup.name.sign", + "itemGroup.name.skull", + "itemGroup.name.slab", + "itemGroup.name.smithing_templates", + "itemGroup.name.splashPotion", + "itemGroup.name.stainedClay", + "itemGroup.name.stairs", + "itemGroup.name.stone", + "itemGroup.name.stoneBrick", + "itemGroup.name.sword", + "itemGroup.name.trapdoor", + "itemGroup.name.walls", + "itemGroup.name.wood", + "itemGroup.name.wool", + "itemGroup.name.woolCarpet" + ] +} \ No newline at end of file