3

How does one teleport only unemployed villagers in Minecraft 1.18.2 java edition?

I have tried the following:

tp @e[type=villager, nbt={VillagerData:{profession:"minecraft:unemployed"}}, limit=2] Romans1234

tp @e[type=villager, nbt={VillagerData:{profession:"minecraft:0"}}, limit=2] Romans1234

tp @e[type=villager, nbt={VillagerData:{profession:"minecraft:none"}}, limit=2] Romans1234

tp @e[type=villager, nbt={VillagerData:{profession:""}}, limit=2] Romans1234

2 Answers 2

4

Thanks to @BsAxUbx5KoQDEpCAqSffwGy554PSah for providing the link towards the Minecraft Villager professions. From there I was able to find the solution:

/tp @e[type=minecraft:villager, nbt={VillagerData:{profession:"Minecraft:none"}}] Romans1234

The fault in the code mentioned in the question, is that I forgot to add minecraft: to the type parameter.

The above code will teleport all villagers without a profession to a player named Romans1234.

3

The correct code is profession:"minecraft:nitwit", as being unemployed is a kind of profession in the game, not absence of profession as you supposed.

Reference: Minecraft Wiki.

2
  • Hello. While the code you provided is correct, it does not answer the question. I do not want to teleport nitwits, I want to teleport a villager that does not currently have a profession. Thank you for the contribution though!
    – Romans
    Jun 20 at 18:20
  • @Romans You're welcome. Jun 20 at 19:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .