3

How can I increase the number of zombies spawning through the use of command blocks in Minecraft? I would like to avoid commands like

/execute @e[type=Zombie] ~ ~ ~ summon Zombie ~ ~ ~

because it would grow exponentially and would soon become quite too much to handle.

1

If you want to just have more zombies, you could use a scoreboard tag to prevent exponential growth:

/execute @e[type=Zombie,tag=!duplicate] ~ ~ ~ /summon Zombie ~ ~ ~ {Tags:["duplicate"]}
/scoreboard players tag @e[type=Zombie,tag=!duplicate] add duplicate

This will duplicate all original zombies once, and the summoned ones never. You can run the first command multiple times to increase the amount of Zombie multiplication further.

0

There might be a way.

According to http://minecraft.gamepedia.com :

On Hard difficulty, zombies can spawn additional zombies to “help” when damaged. Each zombie has a "likeliness to call reinforcements" statistic which ranges from 0–10%, and "leader" zombies (0–5% depending on regional difficulty) get a bonus of 50–75 percentage points to the stat. When the zombie is damaged by an entity or is damaged while targeting an entity, up to 50 attempts will be made to randomly choose a spawn location (0 or ±7–40 blocks away in all three axes) that is above a block with a solid top surface, has light level 9 or lower, has no players within 7 blocks, and has no colliding entities or blocks at which to spawn the reinforcement. Both the damaged zombie and the new zombie will have a 5 percentage point penalty to their "likeliness to call reinforcement" stat, making it less likely that an infinite number of zombies will spawn.

This means that in vanilla minecraft, when you'll try to kill a Zombie, (if you have hard difficulty on), he may be able to spawn other zombies to kill you. This behavior is controlled by the stat zombie.spawnReinforcements. So you could use the /entitydata command to increase that stat of each zombies in your game. In this way, each zombies that you will try to kill will spawn more zombies.

Now, if you'd like to spawn zombies more zombies even not when you are attacking them, you can copy that behavior with command blocks. I'll explain. Imagine that you set to each zombies that are spawning and score of reinforcement to 2. Then you'll use /execute on each zombies that have that score to make them spawn another zombie. Then you'll give to each zombies a reinforcement score of 1 so they won't spawn any more zombies. In this way, each time a zombie spawn, you'll have to zombies. It's the exact same thing that is used to make sure zombies spawned with reinforcement won't be infinite :

Both the damaged zombie and the new zombie will have a 5 percentage point penalty to their "likeliness to call reinforcement" stat

Hope that helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.