Execute command relative to block

Execute command relative to block - Happy grandmother sitting on floor with Asian boy and girl while playing with wooden blocks and building tower in living room near window

Is it possible to execute commands relative to a block? For example, if I have a stone block and I want to execute a particle command at it, how can I do that? I do know how to use the execute command, it's used like this:

/execute <target> ~ ~ ~ /<command>

Unfortunately, I don't know how to do this relative to a block. How can I do this? Is this possible? As always, all help is appreciated, thanks!






Pictures about "Execute command relative to block"

Execute command relative to block - From above of Asian boy and girl playing with wooden blocks near window on floor in living room with grandmother
Execute command relative to block - Cheerful black manager looking at smartphone while walking down street
Execute command relative to block - Man Holding a Megaphone



How do you execute a command at a block?

Steps to Use a Command Block
  • Place the Command Block in Creative Mode. Before you can program and use the command block, you need to place the command block on the ground. ...
  • Add a Redstone Device. Next, you need to add a redstone device next to the command block. ...
  • Program the Command Block. ...
  • Activate the Command Block.


  • How do you fill blocks relative to player?

    To fill an area relative to the player, put the following code into a command block or your chat: /execute @<p,a,r,e> <x> <y> <z> /fill <x1> <y1> <z1> <x2> <y2> <z2> <block> 0 replace <blocktoreplace> . The p, a, r, and e are the selectors.



    [Minecraft Commands] Execute Relative to Block




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Alex Green, Alex Green, Ono Kosuki, Pressmaster