which summons the custom villager. Finally, we have
/scoreboard teams empty Chosen
which empties the chosen team. In theory, this chooses a random villager, then if there are 5 more villagers within 15 blocks, it summons the custom villager, because it assumes this means it's a village. Then, it puts all the villagers in a team which eliminates them from being able to start the spawning sequence. But, it tells me the entity UUID is presented in an invalid format in the FIRST COMMAND BLOCK! Please help!
I'm trying to ensure that only one "techie" villager spawns in each village, so they can't be farmed. I also might modify this in the future, so that instead of summoning the villager, it summons an armor stand which it /spreadplayers through the village until it's not on top of cobble, wood, stone slabs, or wood stairs, and then clone a custom house there that a techie villager is automatically placed in.
The Meaning of Life, the Universe, and Everything.
You have a potential problem in that your new Villager will not be a part of any team, and can be picked as the "Chosen" one next time the clock ticks.
I can't really say what your problem is - the command looks ok to me and works when I try it. Usually when I need to figure something like that out I'll just copy the command and have it run with /say instead or something similar, so you can see what entities the selector gets replaced with.
Edit: also, what happens if you try to run it yourself from the chat input?