In Bedrock Edition, I am making a dungeon full of traps, enemies, and puzzles. One obstacle I've been struggling to make is a fire trap.
The design I'm going for is a 2×2 tile of ancient debris that lights on fire and extinguishes on a cycle. I know that this is possible to create, but I am looking for a way to make it into a couple of command blocks that spread worldwide.
I've tried hiding entities around the blocks the fire trap but it never worked. I've tried making individual systems for every trap, but it takes up too much time and effort for the amount I want to include, and creates lag and delay between the traps.
Would there be a command system that can detect for every block in an area AND place fire above them? Thanks.
Best Answer
While I'm not aware of a command-based system that would achieve your objective the way you describe, it would certainly be possible to do this using entities and execute commands. The method I would use for this is below. I hope you find that it works for you and if you have any questions, please post a comment.
Method
Fire on:
/execute @e[type=armor_stand, name=firetrap] ~ ~ ~ setblock ~ ~ ~ fire
Fire off:
/execute @e[type=armor_stand, name=firetrap] ~ ~ ~ setblock ~ ~ ~ air
name=firetrap
in the command. For the system to work, we need to name a name tag, 'firetrap' using an anvil and name all of the armour stands with it, so that they are all called 'firetrap'.Fire resistance:
/effect @e[type=armor_stand, name=firetrap] fire_resistance 100000 255 true
Invisibility:
/effect @e[type=armor_stand, name=firetrap] invisibility 100000 255 true
What the commands do
/execute @e[type=armor_stand, name=firetrap] ~ ~ ~ setblock ~ ~ ~ fire
Execute a command as all the armour stands within 100 blocks of this command block which are called 'firetrap'. Execute the command to set the block they are standing in as fire on behalf of them.
/effect @e[type=armor_stand, name=firetrap] fire_resistance 100000 255 true
Give all of the armour stands within 100 blocks which are called 'firetrap' fire resistance for 100000 seconds (normally it would be this number of seconds but the number 100000 means indefinitely) and with 255 intensity. Set hide particles to true.
Result