Minecraft Command Block Remote Volume Selection
For some reason they thought it would be a good idea for the dx, dy, dz parameters to only ever extend from the command block itself. Is there a way, maybe combining this with execute, to select a volume remotely?
The goal is to see if players are within a rectangular prism region.
Best Answer
You are correct, you can use the execute command to do anything remotely. Just spawn an invisible armor stand named Dummy somewhere near the command block (it doesn't matter where). Then run
/execute @e[name=Dummy] <world coordinates here> <command to run here>
Many commands have more compact ways of doing things like this, but this works for any command.
Pictures about "Minecraft Command Block Remote Volume Selection"



How do you control a command block in Minecraft?
UsageHow do you fill an area in Minecraft with commands?
How to Enter the CommandMore answers regarding minecraft Command Block Remote Volume Selection
Answer 2
It's possible to select a cuboid region but the command block must represent one of the corners.
[dx=DX,dy=DY,dz=DZ]
To use this, place the command block in the corner of the area you are selecting. This needs to be in the corner with the lowest coordinate values, i.e., the bottom, southmost, westmost corner. DX, DY & DZ represent the size of the cuboid- replace them with those values. For example,
[dx=10,dy=5,dz=10]
will target everything in a 10x10 area that is 5 blocks high.
You need to put this in the command that needs target selection. This is done in the same way that you would set an area by point and radius. For example:
kill @e[dx=10,dy=5,dz=10]
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Wendelin Jacober, Pressmaster, sergio souza, Pok Rie
