Minecraft Command Block Remote Volume Selection

Minecraft Command Block Remote Volume Selection - Roof of residential buildings in town

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"

Minecraft Command Block Remote Volume Selection - Man Holding a Megaphone
Minecraft Command Block Remote Volume Selection - Aerial view of residential multistory buildings of living district near straight asphalt road under colorful sundown sky
Minecraft Command Block Remote Volume Selection - Overhead view of colorful roofs of residential buildings and lush green trees in flooded small village



How do you control a command block in Minecraft?

Usage
  • A command block can execute commands when activated by redstone power. ...
  • To execute the command, in Java Edition in multiplayer enable-command-block in the server. ...
  • To enter command or modify the command block, use the Use Item control on the command block to open the command block GUI (graphical user interface).


  • How do you fill an area in Minecraft with commands?

    How to Enter the Command
  • Open the Chat Window. The easiest way to run a command in Minecraft is within the chat window.
  • Type the Command. In this example, we will replace a block with birch planks using the following command: /setblock ~1 ~0 ~1 planks 2.







  • More 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