3

I'm using the /spreadplayers command to randomly spawn zombies around the player for an adventure map. The problem with this is that there are trees and the zombies all end up on the trees and it gets boring. I've tried every method I can think of to fix this, and they either flat out don't work, or take a lot of time to do. If someone can help with this, that would be amazing, as I've been at it for a while.

  • I'm on minecraft 16w05b
  • I've tried using /execute @e ~ ~ ~ detect /testforblock ~ ~-1 ~
  • I've tried to re-spread all entities above a certain height
  • I've tried to give anything standing on leaves or above a certain height a score

I don't know what else to try or do! — if anyone can either successfully do one of these or think of another method, please tell me!

  • The command is /execute @e ~ ~ ~ detect ~ ~-1 ~ minecraft:leaves -1 <command> for Oak, Spruce, Birch, and Jungle, and /execute @e ~ ~ ~ detect ~ ~-1 ~ minecraft:leaves2 -1 <command> for Dark Oak and Acacia, as well as likely any other woulds Mojang adds in the near future. – rustphoenix Feb 9 '16 at 17:20
1

I do not have a solution as to how to use the /spreadplayers command to make this work. But, another solution to your problem (if the randomness is not that important) would be using the /summon command.

If you want to scatter the zombies around manually you will have to create multiple Command blocks though, but you can just copy-paste the commands and change out the coordinates.

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.