1
HOW TO DELAY COMMAND BLOCKS?
STEP 1 - The engine (you can place this anywhere in your world):
The repeating, unconditional, always active command block:
tag @e[type=area_effect_cloud,tag=Delay,nbt={Age:-1}] add DelayEnd
The 1st chained, unconditional, always active command block:
execute as @e[type=area_effect_cloud,tag=DelayEnd] at @s positioned ~ ~ ~ run data merge block ~ ~ ~ {auto:1b}
The 2nd chained, unconditional, always active command block:
execute as @e[type=area_effect_cloud,tag=DelayEnd] at @s positioned ~ ~ ~ run data merge block ~ ~ ~ {auto:0b}
STEP 2 - Usage:
- The C variable must be replaced by the coordinates of the command block that will be activated after the delay (the red command block on the image)
- The T variable must be replaced by the time (in ticks) before the desired command block (set with the C variable) will be executed (for 3 seconds: 3*20=60)
summon area_effect_cloud C {Tags:["Delay"],Age:-T}
Usage example:
summon area_effect_cloud ~-1 ~ ~ {Tags:["Delay"],Age:-60}
Special thanks to lorgon111 who came up with this contraption and to JannisX11 for the original post on minecraftforum.net.
Create an account or sign in to comment.
1
2
I like the idea, it's very original, but you could just use /schedule...