I'm playing around with command blocks, and would like to have a structure appear when a block (specifically a copper block) is placed. I want the structure to be placed relative to the block, and the block can be placed in about 20 different positions in total. Ideally, the structure should also be removed once the block is destroyed.

The code itself only has to run once every 2mins or something like that, so it doesn't have to be terribly well optimised.

Is there any easy-ish way for me to make this? As of now I have painstakingly placed execute run setblocks for all the positons, but there is definitely a better solution.

I guess the question can also be rephrased as "How to run a command for all blocks of a type in an area" (and then use clone).

Any help is appreciated, although I am still very new to commands (I only just started with nbt data) so please explain if it's a strange concept.

1 Answer 1


the easiest way would actually be to use an entity of some sort to summon th blocks around it and then killing the entity using /kill @e[type=,name=] to kill it and use the execute command to place blocks around it. eg: execute as @e[type=pig,name=summoner] at @s run setblock ~ ~ ~1 concrete, and the next command would be /kill @e[type=pig,name=summoner] and make sure to have that first command in a repeat command block.

  • Otherwise it would be quite advanced stuff to summon at a block. it is actually more complicated than you think
    – RedSkull
    Commented Nov 28, 2022 at 9:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .