misode / misode.github.io

Data Pack Generators and Tools for Minecraft 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21
https://misode.github.io/
MIT License
491 stars 68 forks source link

Item name component doesn't work in recipe generator #534

Closed ProjectEpsilon49 closed 1 month ago

ProjectEpsilon49 commented 1 month ago

I want to name an item Nether Core. My output is { "type": "minecraft:crafting_shapeless", "category": "redstone", "group": "wooden_button", "ingredients": [], "result": { "id": "minecraft:acacia_button", "count": 1, "components": { "minecraft:item_name": "Nether Core" } } } the game doesn't recognize it.

regfunkid commented 1 month ago

Hey, I think I see what your problem is. Your recipe is shapeless, but doesn't specify what the ingredients are. The game can't make a recipe if it lacks either ingredients or an output.

Also, you can't have a minecraft:item_name component written like that. It has to be in JSON format, so "Nether Core" would be written like {"text":"Nether Core"}. I hope that helps!