I'm relatively new to command blocks, but I'd like to set up a command block to build upwards. I'd like it to be on a redstone clock, building, say, one block upwards every minute. Does anyone have any suggestions on how to do this? I'm unsure about how to make the height at which it build change without manually typing in a new number. Thanks for any help!
The only thing I can think of is the set up a clock that constantly uses /setblock as the base, then every 60 seconds (using a scoreboard clock) clone the growing pillar upwards.
Hmm.. just tested it out in-world. Got the good ol' "source and destination areas cannot overlap" error. Forgot how crappy /clone can be. Sorry, I don't really have any other ideas that aren't super involved.
Hey, I don't know if you're still watching this thread, but I figured it out. All you have to do to combat the error is first clone it somewhere else, then clone the pillar back up.
So the setup involved 6 command blocks total. 2 as the timer, 1 as the /setblock command, and 3 as the clone mechanism. There will also be an armor stand located wherever you want the pillar.
Timer Setup:
Step 1: Type "/scoreboard objectives add clonePillar dummy" into the chat
Step 2: Place a command block and set it to "repeat" and "needs redstone". Type "/scoreboard players add @e[tag=clonePillar] clonePillar 1" into it. This the timer. Turn it on and off by placing and destroying a redstone block next to it.
Step 3: Place a command block next to the other and set it to "repeat" and "always active". Type "/scoreboard players set @e[scores={clonePillar=BLANK}] clonePillar 0" into it. Replace BLANK with the number of seconds you want between each time the pillar grows, times 20 (e.g. 1200 for 60 seconds).
Setblock Command:
Step 1: Place a command block and set it to "repeat" and "always active". Type "/execute as @e[tag=clonePillar] at @s run setblock ~ ~ ~ BLANK" into it. Replace BLANK with the block you want the pillar to be made of.
Clone Mechanism:
Explanation: This one's a bit more tricky than the other 2. You need to have a second spot for the pillar to clone to. It will be as high as the actual pillar and needs to have nothing above it for as high as it will grow (or else it will replace the blocks, and that won't be a fun time). You can place it anywhere close enough to the first pillar that the chunks are loaded.
Step 1: Place a command block and set it to "repeat" and "always active". Type "/execute as @e[scores={clonePillar=1}] at @s run clone ~ ~ ~ ~ BLANK1 ~ BLANK2" into it. Replace BLANK1 with the y coordinate of how high you want the pillar to grow. Replace BLANK2 with the x, y, and z coordinates of the base of the second pillar that I talked about in the explanation.
Step 2: Place a command block and set it to "repeat" and "always active". Type "/execute as @e[scores={clonePillar=2}] at @s run clone BLANK1 BLANK2 ~ ~1~" into it. Replace BLANK1 with the coordinates of the base of the second pillar. Replace BLANK2 with the coordinates of the top of the second pillar (it should be the same x and z as BLANK1, with the y coordinate as high as the second pillar needs to be).
Step 3: Place a command block and set it to "repeat" and "always active". Type "/execute as @e[scores={clonePillar=3}] at @s run fill BLANK1 BLANK2 air". Replace BLANK1 and BLANK2 with the same coordinates from Step 2.
Armor Stand:
Step 1: Type "/summon armor_stand ~ ~ ~ {Tags:["clonePillar"]}" into chat. You can replace the "~ ~ ~" with whatever coordinates you want the pillar's base to be.
That should work. Please tell me to elaborate if you need more explanation or it doesn't work in your world.
I found a quite easy way around this if you would like to give it a shot.
Simply spawn an armor stand with a tag to it.
Set this command:
execute at @e[type=minecraft:armor_stand] run setblock ~ ~-1 ~ stone (repeat always active)
set a time to give the armor stand levitation for 1 second on 0 amplifier.
It will raise it up and place one block on there. So, you can put the levitation buff on the armor stand every minute and raise it high enough for 1 block to spawn below it. Also make the armor stand invisible.
Welp, I stand corrected. Didn't even think of moving the armor stand haha. I think it'd be easier to just teleport the armor stand up one every so often tho.
Thank you both for the advice! Playing around with it all has been super helpful, and I've got things working now, plus I've learned a bunch on the way.
Thank you both for the advice! Playing around with it all has been super helpful, and I've got things working now, plus I've learned a bunch on the way.
I'm relatively new to command blocks, but I'd like to set up a command block to build upwards. I'd like it to be on a redstone clock, building, say, one block upwards every minute. Does anyone have any suggestions on how to do this? I'm unsure about how to make the height at which it build change without manually typing in a new number. Thanks for any help!
The only thing I can think of is the set up a clock that constantly uses /setblock as the base, then every 60 seconds (using a scoreboard clock) clone the growing pillar upwards.
Tell me if you need further explanation
How would I do that? Like I said, I'm pretty new to command block stuff, so any explanation would be great. Thank you!
Hmm.. just tested it out in-world. Got the good ol' "source and destination areas cannot overlap" error. Forgot how crappy /clone can be. Sorry, I don't really have any other ideas that aren't super involved.
Thanks for the attempt anyway!
Hey, I don't know if you're still watching this thread, but I figured it out. All you have to do to combat the error is first clone it somewhere else, then clone the pillar back up.
So the setup involved 6 command blocks total. 2 as the timer, 1 as the /setblock command, and 3 as the clone mechanism. There will also be an armor stand located wherever you want the pillar.
Timer Setup:
Step 1: Type "/scoreboard objectives add clonePillar dummy" into the chat
Step 2: Place a command block and set it to "repeat" and "needs redstone". Type "/scoreboard players add @e[tag=clonePillar] clonePillar 1" into it. This the timer. Turn it on and off by placing and destroying a redstone block next to it.
Step 3: Place a command block next to the other and set it to "repeat" and "always active". Type "/scoreboard players set @e[scores={clonePillar=BLANK}] clonePillar 0" into it. Replace BLANK with the number of seconds you want between each time the pillar grows, times 20 (e.g. 1200 for 60 seconds).
Setblock Command:
Step 1: Place a command block and set it to "repeat" and "always active". Type "/execute as @e[tag=clonePillar] at @s run setblock ~ ~ ~ BLANK" into it. Replace BLANK with the block you want the pillar to be made of.
Clone Mechanism:
Explanation: This one's a bit more tricky than the other 2. You need to have a second spot for the pillar to clone to. It will be as high as the actual pillar and needs to have nothing above it for as high as it will grow (or else it will replace the blocks, and that won't be a fun time). You can place it anywhere close enough to the first pillar that the chunks are loaded.
Step 1: Place a command block and set it to "repeat" and "always active". Type "/execute as @e[scores={clonePillar=1}] at @s run clone ~ ~ ~ ~ BLANK1 ~ BLANK2" into it. Replace BLANK1 with the y coordinate of how high you want the pillar to grow. Replace BLANK2 with the x, y, and z coordinates of the base of the second pillar that I talked about in the explanation.
Step 2: Place a command block and set it to "repeat" and "always active". Type "/execute as @e[scores={clonePillar=2}] at @s run clone BLANK1 BLANK2 ~ ~1~" into it. Replace BLANK1 with the coordinates of the base of the second pillar. Replace BLANK2 with the coordinates of the top of the second pillar (it should be the same x and z as BLANK1, with the y coordinate as high as the second pillar needs to be).
Step 3: Place a command block and set it to "repeat" and "always active". Type "/execute as @e[scores={clonePillar=3}] at @s run fill BLANK1 BLANK2 air". Replace BLANK1 and BLANK2 with the same coordinates from Step 2.
Armor Stand:
Step 1: Type "/summon armor_stand ~ ~ ~ {Tags:["clonePillar"]}" into chat. You can replace the "~ ~ ~" with whatever coordinates you want the pillar's base to be.
That should work. Please tell me to elaborate if you need more explanation or it doesn't work in your world.
I found a quite easy way around this if you would like to give it a shot.
Simply spawn an armor stand with a tag to it.
Set this command:
execute at @e[type=minecraft:armor_stand] run setblock ~ ~-1 ~ stone (repeat always active)
set a time to give the armor stand levitation for 1 second on 0 amplifier.
It will raise it up and place one block on there. So, you can put the levitation buff on the armor stand every minute and raise it high enough for 1 block to spawn below it. Also make the armor stand invisible.
Welp, I stand corrected. Didn't even think of moving the armor stand haha. I think it'd be easier to just teleport the armor stand up one every so often tho.
Thank you both for the advice! Playing around with it all has been super helpful, and I've got things working now, plus I've learned a bunch on the way.
You're welcome. I appreciate the gratitude.