Custom recipe's "smithing_transform" overrides base item enchantments when you add enchantments components on results.
Custom Recipes:
{
"type": "minecraft:smithing_transform",
"template": {
"item": "minecraft:elytra"
},
"base": {
"item": "minecraft:diamond_chestplate"
},
"addition": {
"item": "minecraft:diamond"
},
"result": {
"id": "minecraft:elytra",
"count": 1,
"components": {
"max_damage": 528,
"minecraft:enchantments": {
"minecraft:unbreaking": 3
},
"minecraft:custom_data": {"material":"diamond"}
}
}
}
tags/item:
trim_template.json
{"values":["minecraft:elytra"]}
tags/item/enchantable:
chest_armor.json
{"values":["minecraft:elytra"]}
Expectation:
Custom recipe item should retain its base enchantments even you add enchantments components to the result.
Ways to replicate:
1.Download and install my datapack attached
2. Get Diamond chestplate and enchant it with any enchantments preferably prot, or mending (cuz i put unbreaking 3 on custom recipe's result for testing)
3. get elytra and diamond.
4. put it on smithing table with this orders:
1st stot: elytra
2nd slot(base): Enchanted diamond chestplate
3rd slot: diamond
on result will only show unbreaking 3 and no protection 4
Attachments
Comments 6
I can confirm the behavior shown in the attached video, but I cannot say whether the datapack is actually being used correctly and whether the bug report as such is valid.
Datapack is being use correctly see "Custom Recipes" on the Description but if you removed the "Enchantment Component" from result, it works as Intended, the item retains its enchantments from base item(slot 2 / diamond chestplate)
Thank you for your report!
After consideration, the issue is being closed as Working as Intended.
Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.
Full Version History – Snapshot Version History – The official Minecraft feedback site
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Hi, after reviewing your in-game footage, I noticed that you are playing in a modified version of Minecraft. Please verify that this is also happening in a vanilla 1.21 environment, and if so, record a new video of this happening in vanilla.
This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki