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 Answer
Use /spreadplayers
:
/spreadplayers x z spreadDistance maxRange target
where
x
andz
: the x- and z-coordinates of the centrespreadDistance
: the minimum distance between the entitiesmaxRange
the maximum horizontal distance to spread the entities from the centre specified inx
andz
(must be at leastspreadDistance
+ 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]
/spreadplayers
, I'm not sure about MCBE.