Currently, it is impossible to actually create custom items using only a data pack. Therefore, most data packs that add "new items" to the game actually use vanilla items with custom data components. The main problems with that are as follows:
1. Most items in the game have other usage that cannot be disabled with data components, such as, e.g. bundle functionality and crafting recipes. For example, even though basically all of the functionality of the poisonous potato can be removed with data components, since there are currently no recipes using it in vanilla Minecraft, if a future update or mod/data pack decides to add one you won't be able to do anything.
2. It's difficult to reference in other places in the data pack: you have to either A)check for all of the data components of the custom item, which can get long pretty quickly and isn't easy to change, since you need to change it in multiple places or B)give it a custom_data tag, which is a bit clumsy.
So, I suggest adding a data//item folder to data packs, containing JSON files with custom items. They would be defined as an object with keys representing default data components, such as minecraft:item_name, minecraft:item_model, minecraft:attribute_modifiers etc. and be referenced with a custom namespaced item ID corresponding to the name of the JSON file.
This would make creating custom items easier and also enable them to be used in places where data components are not supported, such as crafting recipes.
Please sign in to leave a comment.
0 Comments