1

I’m currently making a Minecraft map and I’ve encountered an issue when it comes to villager trading. I made a custom villager with no ai, custom name, custom trades, etc and everything looks normal and working, except the trading itself doesn’t work. When I put in the correct item(s) the villager asks for, nothing happens, and the buy box stays empty. It does work when I don't use any custom items. Why doesn’t my villager trade work and how can I fix this?

I used this command:

/summon minecraft:villager -190 66 180 {NoAI:1b,Rotation:[-90f,0f],HandItems:[{Count:1,id:iron_pickaxe}],CustomName:'{"text":"Bakop","color":"#c00000","bold":true}',VillagerData:{Level:99,profession:"minecraft:armorer",type:"minecraft:plains"},Offers:{Recipes:[{maxUses:1,buy:{id:"minecraft:iron_nugget",Count:3b,tag:{display:{Name:'{"text":"Silver Coin","color":"#9900ff","bold":true}'}}},sell:{id:"minecraft:iron_helmet",Count:1b,tag:{display:{Name:'{"text":"Iron helmet","color":"#b7b7b7","bold":true}'}}}},{maxUses:1,buy:{id:"minecraft:iron_nugget",Count:3b,tag:{display:{Name:'{"text":"Silver Coin","color":"#9900ff","bold":true}'}}},sell:{id:"minecraft:iron_boots",Count:1b,tag:{display:{Name:'{"text":"Iron boots","color":"#b7b7b7","bold":true}'}}}},{maxUses:1,buy:{id:"minecraft:iron_nugget",Count:2b,tag:{display:{Name:'{"text":"Silver Coin","color":"#9900ff","bold":true}'}}},sell:{id:"minecraft:leather_chestplate",Count:1b,tag:{display:{Name:'{"text":"Leather tunic","color":"#b94900","bold":true}'}}}}]}}

Same command with just one trade to make it simpler (same problem occurs):

/summon minecraft:villager -190 66 180 {NoAI:1b,Rotation:[-90f,0f],HandItems:[{Count:1,id:iron_pickaxe}],CustomName:'{"text":"Bakop","color":"#c00000","bold":true}',VillagerData:{Level:99,profession:"minecraft:armorer",type:"minecraft:plains"},Offers:{Recipes:[{maxUses:1,buy:{id:"minecraft:iron_nugget",Count:3b,tag:{display:{Name:'{"text":"Silver Coin","color":"#9900ff","bold":true}'}}},sell:{id:"minecraft:iron_helmet",Count:1b,tag:{display:{Name:'{"text":"Iron helmet","color":"#b7b7b7","bold":true}'}}}}]}}

I'm currently using Minecraft Java Edition version 1.20.1.

5
  • Just a guess, but maybe the NoAI attribute might be the cause of that...
    – Tiimzy
    Jan 3 at 18:03
  • I found out: no ai isn't the problem, nor any of the other aspects. The one thing that messes everything up is giving my 'buy items' in the trade custom names. Is there any way I can fix this or no?
    – Susumee
    Jan 4 at 14:01
  • I have had this same problem before. It wouldn't work at first, but then randomly, it did. At this point, idrk how to help you...
    – Tiimzy
    Jan 4 at 16:10
  • 1
    It's fixed!! Apparantly it worked from the beginning, I just gave myself the wrong item to give the villager for the trade?? I thought I did it right, but there simply must've been an error in my give command somewhere. That might've been your problem before too? I'm not sure. Anyway, thanks for trying to help TimMcYeah!
    – Susumee
    Jan 4 at 19:18
  • Glad I could help (even though I didn't do much...) :)
    – Tiimzy
    Jan 4 at 19:22

0

You must log in to answer this question.

Browse other questions tagged .