So, I made this command in my test redstone world:
execute if block -66 4 -121 lever[powered=true] run setblock -70 4 -123 diamond_block replace
with another repeat block (unconditional - always active)
execute if block -66 4 -121 lever[powered=false] run setblock -70 4 -123 air replace
This makes a diamond block appear and disappear with the flick of a switch.
I tried to replicate it in another area: (also repeat - unconditional - always active)
execute if block -62 4 -135 lever[powered=true] run setblock -65 4 -139 diamond_block replace
execute if block -62 4 -135 lever[powered=false] run setblock -65 4 -139 stone replace
The strangest part is that I got the stone command block to work, but not the diamond one! And then, I fiddled with the lever (breaking and putting it back) and changing back and forth between impulse and repeat. Which, led me to the conclusion that it depends on the order or how I set down (or activate) the command blocks, but I just can't figure out how.
For an example, will placing the lever first before both commands cause problems? Is it the first placement of the diamond command thats causing problems? Should I place down the stone one instead as the first? If that makes sense. There's something about the order of how they are activated. I don't know if this is a glitch or what. Maybe I'm getting this all wrong.
Has anyone else experienced this? Is there a solution?