Minecraft – How to summon villagers with certain professions

minecraft-commandsminecraft-java-edition

I'm building a world to show off each and every type of villager in Minecraft 1.14 (snapshots). I'm wondering if there is a command to summon specific villagers with certain professions (I already know how to make specific trades though). Is it nbt data or what? I just need to summon them into my world with /summon villager ~ ~ ~. I need it for each biome, profession, career, and trade tier.

Best Answer

In 1.14, this sort of data is all contained within the villager's VillagerData compound. It contains

  • profession, which is a string. It can be any of minecraft:armorer, minecraft:butcher, etc.
  • type, which is also a string. It can be any of minecraft:desert, minecraft:jungle, etc.
  • level, which is an integer. This should be pretty self explanatory.

So an example command might be

summon minecraft:villager ~ ~ ~ {VillagerData:{type:"minecraft:plains",profession:"minecraft:mason",level:2}}

You can find all the valid profession and type values here on the wiki.