Arqade Asked by Vin R on May 5, 2021
So 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
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.
Answered by ExpertCoder14 on May 5, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP