Correct me if I'm doing something wrong, but recipes that use tags don't recognise custom block tags at all. I have a custom block that has the
"tag:minecraft:wooden_slabs": {}
tag component, this should allow the block to be used in the new barrel recipe, however the game doesn't recognise the block tag when it's not a tile in the world.
The result is that blocks can't be used with recipe tags.
Steps To Reproduce:
Download the supplied pack, unzip and copy to the behavior packs folder in com.mojang of the latest preview (bug also exists on stable, but pack was made in preview) and load a world in creative with 'Holiday Creator Features' and 'Beta APIs' applied.
Go to the construction tab and get the unkown block and iron ingot item
Place the block and look at it while holding the block
Type !test in chat
Observe the script warnings showing the held item tags and the tags of the block you're looking at, only the block has tags, the held block does not.
Hold the iron ingot item and do the test again
Now observe that the held item now has the wooden_slabs tag (twice but that's a different bug)
Now try to craft a barrel with the custom block replacing the slabs
It won't work
Now try to craft a barrel with the custom item replacing the slabs
It will work
Expected Results:
Custom block tags work in recipes
Observed Results:
Custom block tags aren't recognised when in 'item' form and thus cannot be used in recipes
Attachments
Comments 4
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response.
Could you please attach a functional MCAddon that showcases the issue?
This ticket will automatically reopen when you reply.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📓 Project Summary – 📧 Suggestions – 📖 Minecraft Wiki
Added the mcaddon, just note the provided pack will only work for 1.19.80 and higher.
@Test Pattern, I'm not sure where I found this but this is the only way to tag blocks and items with minecraft tags (such as minecraft:is_pickaxe, minecraft:is_shovel, etc.) that I know of
If this is still an issue in the latest release, could you please update the main.js file, as it is currently broken and throws this error:
[Scripting][error]-Plugin [Recipe Block Tags Bug - 0.0.1] - [main.js] ran with error: [TypeError: cannot read property 'beforeChat' of undefined at <anonymous> (main.js:4)
]
It'd be also appreciated if you could update the API versions, as they're currently outdated.
Your "tag:<namespace>:<name of item>" conundrum is interesting, only I cannot find the API spec indicating you can have more than one colon in recipes ingredients names. Where did you find this usage example?