enter image description hereSo I used a command block in 1.16.4 to summon a villager who sells dirt with custom name of 'DIRT BLOCK'. Then I /give myself the dirt block also with the name 'DIRT BLOCK' , I can do the trade at the first time, but as I closed the GUI of villager trading, and drop the item, I can't trade it with them anymore. Below is my villager code

summon villager ~ ~1.5 ~ {VillagerData:{profession:librarian,level:5,type:plains},Invulnerable:1,NoAI:1,Offers:{Recipes:[{buy:{id:dirt,Count:1,maxUses:99999,tag:{display:{Name:"\"DIRT BLOCK\""}}},sell:{id:stone,Count:1,maxUses:99999}}]}}

and below is the /give code I wrote

/give @s dirt{display:{Name:"\"DIRT BLOCK\""}} 64
  • 2
    I believe dropping the item causes it to change NBT tags, meaning the villager won't accept it. Citation needed; I don't think I'm right but I can't see any other explanation.
    – Corsaka
    Commented Nov 9, 2020 at 12:30
  • I'm going to test this out in MC Java Edition 1.16.4. If you are playing in a different version, please comment so I can switch versions.
    – One 2 Many
    Commented Nov 9, 2020 at 17:36

1 Answer 1


I cannot reproduce your problem. Here is something you can do to help yourself:

First, hold the item in your main hand, then run the following command. Note the data that your item has on it:

/data get entity @s SelectedItem

Then, drop the item, pick it back up, and run the same command again.

If you notice anything different, that must mean that maybe another command machine is changing the NBT data.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .