Minecraft – What’s wrong with this command

minecraft-java-edition

So I entered this and it says this all the time

Data Tag Parsing Failed: Encountered Multiple Top Tags, Only One Expected

And here is the command:

/summon Villager ~ ~1 ~ {NoAI:1,Rotation:[45.0f,-15.0f]},{CustomName:"Fire"}

Best Answer

You don't need to separate the {NoAI:1,Rotation:[45.0f,-15.0f]} portion of the NBT tag and the {CustomName:"Fire"} portion. In fact, it's causing the syntax error here.

What you're going to want is as follows:

/summon Villager ~ ~1 ~ {NoAI:1,Rotation:[45.0f,-15.0f],CustomName:"Fire"}

Additionally, you may want to add CustomNameVisible:1 to the NBT tag to make the name show up like a player name, so the command becomes the following:

/summon Villager ~ ~1 ~ {NoAI:1,Rotation:[45.0f,-15.0f],CustomName:"Fire",CustomNameVisible:1}