4

This question already has an answer here:

I am setting protection in factions on my command block server using adventure mode. I have a command block setting mode to survival in a certain radius, but within that radius I want a smaller radius set to adventure mode. Is there a way to set what's not in the radius of adventure mode to survival mode?

marked as duplicate by Virusbomb, Gigazelle, Schism, MBraedley, Dragonrage Aug 11 '18 at 19:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

The entity selector has several arguments I think you'll find useful for this kind of situation. r=6 (as you probably know) targets entities within a spherical radius of 6. rm can be used to specify a minimum radius. and dx dy dz can be used for a rectangular region. http://minecraft.gamepedia.com/Commands has a nice list and explination of all valid selector arguments.

For your problem, I would use something like /gamemode 2 @a[r=10,m=0] followed by /gamemode 0 @a[r=5,m=2] but there are many ways to do this with the available selectors

  • what do you mean by a minimum radius? – bobby Dec 18 '16 at 3:21
  • A minimum radius only targets entities outside the range specified. For example, rm=3 would find entities 3 or more blocks away (sphericaly), but not any closer. I'm combination with a normal radius, you can create a ring or band of space to target. – SB32 Dec 19 '16 at 14:46
0

Try making 5 different radiuses. Place the Survival radius in the center, and the other 4 around it, with eventual overlaping.
Warning: This method might leave a few blocks out of any radius.

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