How do I stop Zombie Villagers from spawning or Zombies
I am making a flat adventure/Survival map which is meant to be played for maybe a year or two and is made to make the game harder.
In the map when you spawn you have a big shop which is setted up with custom villagers using a online generator. There are 2 types of villagers one that sells items and one that buys items. Keep in mind the currency is emeralds.
But the problem is that zombie villagers are able to spawn within the world and I have only intended that the only way to achieve emeralds is by trading with the villagers within the shop.
I want some way to make them despawn or teleporting them to the void.
Keep in mind im not able to remove normal zombies due to that an important item within the shop is zombie flesh.
Best Answer
You will have to label zombies based on their IsVillager byte tag and then run commands based on the label.
1.8
Objective to use.
/scoreboard objectives add ZombieVillager dummy
Commands to run in numerical order.
Set the "ZombieVillager" score to 1 for zombies with
IsVillagerset to 1./scoreboard players set @e[type=Zombie] ZombieVillager 1 {IsVillager:1b}Teleport those zombies to the void.
/tp @e[type=Zombie,score_ZombieVillager_min=1] ~ -64 ~
1.9
Commands to run in numerical order.
Apply "ZombieVillager" label for zombies with
IsVillagerset to 1./scoreboard players tag @e[type=Zombie,tag=!ZombieVillager] add ZombieVillager {IsVillager:1b}Teleport those zombies to the void.
/tp @e[type=Zombie,tag=ZombieVillager] ~ -64 ~
Pictures about "How do I stop Zombie Villagers from spawning or Zombies"



How do you stop a zombie villager from spawning?
Answer: If you haven't placed torches all over the village, start with that - they prevent mobs from spawning at night. Place torches a distance outside of the village to prevent them from spawning close by as well. If you construct a wall or fence around the village, it should keep zombies from wandering in.How do you get rid of zombie villagers in Minecraft?
If a zombie attacks one of your villagers, it will turn them into a zombie villager. You can cure them by using a Splash Potion of Weakness and a Golden Apple.How do you Zombify villagers?
They occur when Zombies lay siege to a village and kill Villagers. If a baby villager is killed, it becomes a Baby Zombie Villager. Like Zombies, Zombie Villagers may spawn with an item equipped.Best Way to Find Zombie Villagers
More answers regarding how do I stop Zombie Villagers from spawning or Zombies
Answer 2
Zombie villagers are now considered a separate type of entity, making it possible to easily target only them:
/tp @e[type=zombie_villager] ~ -64 ~
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
