minecraft-data icon indicating copy to clipboard operation
minecraft-data copied to clipboard

Add tag data

Open dthigpen opened this issue 2 years ago • 0 comments

Block and item tags are used throughout Minecraft, such as in recipes and entity selectors. For example, the minecraft:wooden_axe recipe requires two minecraft:stick and three #minecraft:planks. In general these are useful groupings of similar values and frequently are added to as more blocks are introduced to the game.

Additionally, the current recipe data appears to not properly account for item variants. The wooden_axe appears to have eight variations, accounting for each wood type in the planks tag, however it does not account for the mixing of wood types. It is indeed valid to mix oak_planks and jungle_planks when crafting a wooden_axe. While this might be able to be deduced most of the time there is no distinction in the data presentation for truly alternate recipes and tag based ingredient variations. Even if recipe data is not to be updated I think tag data would be useful.

An example of the buttons.json items tag appears below,

{
  "replace": false,
  "values": [
    "#minecraft:wooden_buttons",
    "minecraft:stone_button",
    "minecraft:polished_blackstone_button"
  ]
}

Note the nested #minecraft:wooden_buttons tag. Given that tags can either reference items (for item tags) or additional tags, I propose either using the string representation as denoted in the example above or creating an id for each tag so that items and tags can be referenced numerically. Possible implementation if numeric ids are preferred:

{
    "id": 10,
    "replace": false,
    "values": [
      {"type": "tag", "id": 62},
      {"type": "item", "id": 609},
      {"type": "item", "id": 610}
    ]
  }

Lastly, there are many tag types (e.g. block, item, fluids, entity_types, etc) and more tags within those, so I am not sure how these would best be represented in aggregate in this repository but it is something to consider.

dthigpen avatar Aug 27 '21 19:08 dthigpen