How to replace a block in a region with an entityEdit

Here is one easy way of doing it:

  1. Create a fill command to replace the block type you want in a certain region with a block that will break, for example a torch. This can also be done with setblock to replace the block. An example would be this:                                    /fill ~5 ~1 ~-4 ~ ~-1 ~8 minecraft:torch 0 replace minecraft:stained_hardened_clay 14                                             This will replace only red hardened clay (14) with torches. Use a different block that will break if you place it if you will have blocks beneath it.
  2. Create a fill/setblock clock (20htz clock) to place the next 2 commands on. They should activate in the correct order, otherwise you should switch their place till they do. Try placing the command in step 3 on the -x side and step 4's command on the +z side.
  3. summon another entity or place a block of your choice at the item with an execute command. This will be the entity you want to replace with the block. it will look something like this: /execute @e[type=Item] ~ ~ ~ /summon FallingSand ~ ~-0.30 ~ {Block:stained_hardened_clay,Data:11,Time:1,DropItem:0} This will summon falling sand at the item.
  4. Kill the item. This should look something like this: /kill @e[type=Item]  This will kill all items, but you can specify what types and in what area.
  5. Now you are done!

Explanation of the concept:Edit

This works by replacing the block you specified with a torch, which will instantly break as long as there is no block beneath it. You can use other blocks such as double_plant, so long as it breaks immediately once placed. Then you can execute on that entity to do whatever you want, in this case summon falling sand. Then withein a 20th of a second it will kill the item. This makes for a seemless method of replacing the block with an entity or whatever you want.

Here are some example or explanation videos:Edit


Destroy & Replace (Destroy Specific Blocks in a Fill Command)

Destroy & Replace (Destroy Specific Blocks in a Fill Command)

This explains the method.

Example of it in use

MINECRAFT UNMODDED Cave-ins from Terrafirmacraft - Vanilla Minecraft!

MINECRAFT UNMODDED Cave-ins from Terrafirmacraft - Vanilla Minecraft!

Here is one example for a usage of this concept.

Community content is available under CC-BY-SA unless otherwise noted.