2
/summon Villager ~ ~2 ~ {Offers:{Recipes:[{buy:{id:371,Count:15},sell:{id:264,Count:4}}

I'm using this as a recycler villager, and I can't get the first trade to work. What's going on?

4

If you remove the text from the NBT tag, you get this:

{{[{{},{}}

This shows that you have unbalanced brackets. To correct this, just add ]}} to the command, to close all the brackets.

/summon Villager ~ ~2 ~ {Offers:{Recipes:[{buy:{id:371,Count:15},sell:{id:264,Count:4}}]}}

In future, you could use MCStacker, a tool for generating longer commands.

1

Yes, your command is not work because some curly bracket is missing. Let me break down your code and you can see what is wrong on your code.

Here is the breakdown for your code, as you can see there is a lot curly bracket is missing.

enter image description here

Let me show you the correct code. So below this picture is the correct code you need to be.

enter image description here

If I change it into one line it will become like this:

/summon Villager ~ ~2 ~{Offers:{Recipes:[{buy:{id:371,Count:15},sell:{id:264,Count:4}}]}}

Hope this answer can make your problem clear.

Not the answer you're looking for? Browse other questions tagged or ask your own question.