0

I am trying to make some custom villager trades that use emeralds with mending for money.
But if I try to trade with those emeralds, the villager doesn't trade with me. These are the commands.

This is buying armor with emerald:

/summon villager ~ ~1.5 ~ {VillagerData:{profession:armorer,level:5,type:plains},PersistenceRequired:1,Silent:1,NoAI:1,Rotation:[270f,0f],CustomName:"\"armor\"",Offers:{Recipes:[{buy:{id:emerald,Count:8,tag:{Enchantments:[{id:mending,lvl:1}]}},sell:{id:iron_helmet,Count:1,tag:{Enchantments:[{id:protection,lvl:5}]}},rewardExp:0b,maxUses:9999999},{buy:{id:emerald,Count:8,tag:{Enchantments:[{id:mending,lvl:1}]}},sell:{id:iron_chestplate,Count:1,tag:{Enchantments:[{id:protection,lvl:5}]}},rewardExp:0b,maxUses:9999999},{buy:{id:emerald,Count:8,tag:{Enchantments:[{id:mending,lvl:1}]}},sell:{id:iron_leggings,Count:1,tag:{Enchantments:[{id:protection,lvl:5}]}},rewardExp:0b,maxUses:9999999},{buy:{id:emerald,Count:8,tag:{Enchantments:[{id:mending,lvl:1}]}},sell:{id:iron_boots,Count:1,tag:{Enchantments:[{id:protection,lvl:5}]}},rewardExp:0b,maxUses:9999999},{buy:{id:emerald,Count:24,tag:{Enchantments:[{id:mending,lvl:1}]}},sell:{id:netherite_helmet,Count:1,tag:{Enchantments:[{id:protection,lvl:5},{id:unbreaking,lvl:3}]}},rewardExp:0b,maxUses:9999999},{buy:{id:emerald,Count:24,tag:{Enchantments:[{id:mending,lvl:1}]}},sell:{id:netherite_chestplate,Count:1,tag:{Enchantments:[{id:protection,lvl:5},{id:unbreaking,lvl:3}]}},rewardExp:0b,maxUses:9999999},{buy:{id:emerald,Count:24,tag:{Enchantments:[{id:mending,lvl:1}]}},sell:{id:netherite_leggings,Count:1,tag:{Enchantments:[{id:protection,lvl:5},{id:unbreaking,lvl:3}]}},rewardExp:0b,maxUses:9999999},{buy:{id:emerald,Count:24,tag:{Enchantments:[{id:mending,lvl:1}]}},sell:{id:netherite_boots,Count:1,tag:{Enchantments:[{id:protection,lvl:5},{id:unbreaking,lvl:3}]}},rewardExp:0b,maxUses:9999999}]}}

This is buying emerald with some things:

/summon villager ~ ~1.5 ~ {VillagerData:{profession:weaponsmith,level:4,type:plains},PersistenceRequired:1,Silent:1,NoAI:1,Rotation:[90f,0f],CustomName:"\"miner\"",Offers:{Recipes:[{buy:{id:redstone,Count:16},sell:{id:emerald,Count:1,tag:{Enchantments:[{id:mending,lvl:1}]}},rewardExp:0b,maxUses:9999999},{buy:{id:lapis_lazuli,Count:16},sell:{id:emerald,Count:1,tag:{Enchantments:[{id:mending,lvl:1}]}},rewardExp:0b,maxUses:9999999},{buy:{id:iron_ingot,Count:8},sell:{id:emerald,Count:1,tag:{Enchantments:[{id:mending,lvl:1}]}},rewardExp:0b,maxUses:9999999},{buy:{id:gold_ingot,Count:8},sell:{id:emerald,Count:1,tag:{Enchantments:[{id:mending,lvl:1}]}},rewardExp:0b,maxUses:9999999},{buy:{id:stone,Count:64},sell:{id:emerald,Count:1,tag:{Enchantments:[{id:mending,lvl:1}]}},rewardExp:0b,maxUses:9999999}]}}

Also I generated some of the commands at the Digminecraft.

1
  • 1
    Those commands are so long, maybe you should break them in more lines just for the sake of readability
    – pinckerman
    Nov 13 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.