/data merge <entity|block|storage> <the entity, block or storage> <NBT to merge>
However, using merge will overwrite every other trade the villager has (unless you include all the other trades in your merge command). A better way of doing this is using modify:
/execute as @e[type=villager,tag=Leatherworker] run data modify entity @s Offers.Recipes append value {buy:{id:emerald,Count:1},buyB:{id:rotten_flesh,Count:4},sell:{id:leather,Count:1},maxUses:9999999}
/execute as @e[type=villager,tag=Leatherworker] run data merge entity @s {Offers:{Recipes:[{buy:{id:emerald,Count:1},buyB:{id:rotten_flesh,Count:4},sell:{id:leather,Count:1},maxUses:9999999}]}}
Basically I'm giving leatherworkers the ability to turn rotten flesh into the leather. Here is the trade:
Offers:{Recipes:[{buy:{id:emerald,Count:1},buyB:{id:rotten_flesh,Count:4},sell:{id:leather,Count:1},maxUses:9999999}]}
My problem is that I don't understand the merge command, I'm trying to give the offer above ^^^ to all entities with my custom tag of "Leatherworker"
The syntax is:
However, using merge will overwrite every other trade the villager has (unless you include all the other trades in your merge command). A better way of doing this is using modify:
Command block engineer // Developer // #TeamTrees
If I wanted to write this as a merge command, how would I write it?
Like this:
Command block engineer // Developer // #TeamTrees