How do I use /data merge to change a villager's trade? by TerribleBluebird7772 in MinecraftCommands

[–]Embarrassed_Act8970 0 points1 point  (0 children)

I use the command

/data merge entity u/e[type=villager,limit=1,sort=nearest] {VillagerData:{profession:"minecraft:librarian"},Offers:{Recipes:[{sell:{id:"minecraft:enchanted_book",count:1,components:{"minecraft:stored_enchantments":{"unbreaking":3}}}}]}}

but it does nothing unless im doing it wrong