-1

I’m making pretty much zombies on mince craft but I can’t figure out a good way to spawn them with out just using /summon at pre set points and having a long chain of command blocks set on either a timer or just connected by redstone. If there’s a way to have them spawn at random points within a ~ ~ ~ ~ ~ ~ area or just a square radius I’d love it if you could help.

1

1 Answer 1

0

Use /spreadplayers:

/spreadplayers x z spreadDistance maxRange target

where

  • x and z: the x- and z-coordinates of the centre
  • spreadDistance: the minimum distance between the entities
  • maxRange the maximum horizontal distance to spread the entities from the centre specified in x and z (must be at least spreadDistance + 1)
  • taget: the entities to spread

For example, to “summon” zombies at least 1 block apart in a 7 × 7 square centred at your current position, you need to first summon the zombies:

summon zombie

and then teleport them using spreadplayers:

spreadplayers ~ ~ 1 3 @e[type=zombie,x=~,y=~,z=~,dx=1,dy=1,dz=1]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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