0

I'm trying to create a pokeball in Minecraft but I was wondering if there is any way for the command block to test for all mobs in a certain radius and give a different output depending on the mob without having to test for each mob individually with individual command blocks

bumped to the homepage by Community 2 days ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • 1
    Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins! – Frank Apr 25 '17 at 14:41
0

You could use

/testfor @e[type=!player,r=RADIUS]

this will test for all mobs that are not players in the chosen RADIUS.

Otherwise there is no way to do what you are asking besides doing individual mobs.

0

update for 1.13;

/execute if entity @e[type=!player,distance=5] run <command>

you can potentially stack if/unless statements in there if you want more, but this is the shortened way.

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.