- 5,872 views, 0 today
- 69 downloads, 0 today
121
Here are a series of commands that will allow you to /execute relative to a specific block. (Tested in 14w21b)
Remember to leave a Diamond to show your support!
______________________________________________________________________________
/scoreboard objectives add BlockExecute dummy
/fill ~7 ~-1 ~ ~ ~-1 ~ redstone_block
/fill ~7 ~1 ~ ~ ~1 ~ <bedrock>
/execute @a ~-2 ~-2 ~-2 /fill ~ ~ ~ ~4 ~4 ~4 double_plant 0 replace
/execute @a ~-4 ~-4 ~-4 /fill ~ ~ ~ ~8 ~8 ~8 double_plant 0 replace
/scoreboard players set @e[type=Item] BlockExecute 1 {Age:0s,Item:{id:minecraft:double_plant}}
/execute @e[score_BlockExecute=1,score_BlockExecute_min=1] ~ ~ ~ <COMMAND(S)>
(optional) /execute @e[score_BlockExecute=1,score_BlockExecute_min=1] ~ ~ ~ /setblock ~ ~ ~ <BLOCK>
/kill @e[score_BlockExecute=1,score_BlockExecute_min=1]
/scoreboard players reset * BlockExecute
______________________________________________________________________________
EXPLAINATION:
Relative to the player, a /fill replace command is executed. This replaces all of the blocks of the player's choosing with a "double_plant" block. When updated, the double_plant block will break into an item and from this entity we execute our commands.
After the commands have been executed the double_plant item is destroyed and the scoreboard is reset.
Special thanks to dandamannnnn for his Destroy Specific Blocks command set up.
______________________________________________________________________________
Remember to leave a Diamond to show your support!
______________________________________________________________________________
/scoreboard objectives add BlockExecute dummy
/fill ~7 ~-1 ~ ~ ~-1 ~ redstone_block
/fill ~7 ~1 ~ ~ ~1 ~ <bedrock>
/execute @a ~-2 ~-2 ~-2 /fill ~ ~ ~ ~4 ~4 ~4 double_plant 0 replace
/execute @a ~-4 ~-4 ~-4 /fill ~ ~ ~ ~8 ~8 ~8 double_plant 0 replace
/scoreboard players set @e[type=Item] BlockExecute 1 {Age:0s,Item:{id:minecraft:double_plant}}
/execute @e[score_BlockExecute=1,score_BlockExecute_min=1] ~ ~ ~ <COMMAND(S)>
(optional) /execute @e[score_BlockExecute=1,score_BlockExecute_min=1] ~ ~ ~ /setblock ~ ~ ~ <BLOCK>
/kill @e[score_BlockExecute=1,score_BlockExecute_min=1]
/scoreboard players reset * BlockExecute
______________________________________________________________________________
EXPLAINATION:
Relative to the player, a /fill replace command is executed. This replaces all of the blocks of the player's choosing with a "double_plant" block. When updated, the double_plant block will break into an item and from this entity we execute our commands.
After the commands have been executed the double_plant item is destroyed and the scoreboard is reset.
Special thanks to dandamannnnn for his Destroy Specific Blocks command set up.
______________________________________________________________________________
Progress | 100% complete |
Tags |
3 Update Logs
Schematic Update : by Lmeagno 06/14/2014 11:07:57 amJun 14th, 2014
The schematic is now available!
LOAD MORE LOGS
2868461
2
Create an account or sign in to comment.
Summon a WitherSkull relative to where the block is (i.e. instead of the /particle command) and have the WitherSkull set a score of the player who summoned it so the command would only activate for players with that score.
However, if I did this there would be twice as many command blocks and the time it would take to activate would be both longer and unreliable.