Help With Custom Commands on villigers with a custom item 1.15.2

Help With Custom Commands on villigers with a custom item 1.15.2 - White Rabbit Figurine on White and Pink Floral Textile

I was trying to get an emerald with a custom color added to it and have a villager sell the emerald. I was doing well getting both to spawn but when I tried to combine the two it didn't work. Can you tell me what I have done wrong?

/summon villager ~ ~1 ~ {VillagerData:{profession:farmer,level:2,type:plains},Offers:{Recipes:[{buy:{id:acacia_boat,Count:1},sell:{id:emerald,Count:1,tag:{display:{Name:"\"aqua\"",Lore:["\"TOKENNNN\""]}}},maxUses:9999999},{buy:{id:acacia_boat,Count:1},buyB:{id:acacia_boat,Count:1},sell:{id:emerald,Count:1,tag:{display:{Name:"\"Token\",\" color\":\"aqua\",\"italic\":true},{\"text\":\"ken\",\"color\":\"aqua\",\"italic\":true}]\",},HideFlags:1}\""}}},maxUses:9999999}]}}

And the expanded command:

/summon villager ~ ~1 ~
{ 
   VillagerData:{ profession:farmer, level:2, type:plains },
   Offers:{ 
      Recipes:[ 
         { 
            buy:{ id:acacia_boat, Count:1 },
            sell:{ id:emerald, Count:1,
               tag:{ display:{ Name:"\"aqua\"", Lore:[ "\"TOKENNNN\"" ] } }
            },
            maxUses:9999999
         },
         { 
            buy:{ id:acacia_boat, Count:1 },
            buyB:{ id:acacia_boat, Count:1 },
            sell:{ id:emerald, Count:1,
               tag:{ display:{ Name:"\"Token\",\" color\":\"aqua\",\"italic\":true},{\"text\":\"ken\",\"color\":\"aqua\",\"italic\":true}]\",},HideFlags:1}\"" } }
            },
            maxUses:9999999
         }
      ]
   }
}

To specify the issue, it is only reading the "TOKEN" part of it and not the rest



Best Answer

Use this:

/summon villager ~ ~1 ~ {VillagerData:{profession:farmer,level:2,type:plains},Offers:{Recipes:[{buy:{id:acacia_boat, Count:1b},sell:{id:emerald,Count:1b,tag:{display:{Name:"\"aqua\"",Lore:["\"TOKENNNN\""]}}},maxUses:9999999},{buy:{id:acacia_boat, Count:1b},buyB:{id:acacia_boat, Count:1b},sell:{id:emerald,Count:1b,tag:{display:{Name:"[{\"text\":\"Token\",\"color\":\"aqua\",\"italic\":true},{\"text\":\"ken\",\"color\":\"aqua\",\"italic\":true}]"},HideFlags:1}},maxUses:9999999}]}}




Pictures about "Help With Custom Commands on villigers with a custom item 1.15.2"

Help With Custom Commands on villigers with a custom item 1.15.2 - Crop anonymous medical specialist rubbing shoulders of male client lying on couch in medical salon
Help With Custom Commands on villigers with a custom item 1.15.2 - White Car Parking on the Road at Daytime
Help With Custom Commands on villigers with a custom item 1.15.2 - Leather Samples on the Table for Selection



How do you give someone a custom item in Minecraft?

Here's a handy workaround that lets you give items with custom names and enchantments....Original post
  • Place the item you want to give in a chest.
  • On command, clone the chest to the player's location.
  • Use /setblock in destroy mode to destroy the chest, causing it to drop all its items on the player.


  • How do you give an item a custom name?

    You can give a player any item whenever you want using the /give command in Minecraft.



    Setting up CUSTOM TRADES in Vanilla Minecraft 1.17! (Part 1)




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Jill Wellington, Ryutaro Tsukata, Albert Nunez, cottonbro