So I was trying to make platform gates for a subway system, and I used a technique that I called "block state entanglement", which uses repeating command blocks to detect the block state of certain blocks and run different commands altering other blocks based on the block. I found out that, even though it runs correctly when executed by a player, does not run when in a repeating command block in always active mode.
The command
execute if block 958 67 -781 minecraft:detector_rail[powered=true]
does not run when on a repeating command block at position (958, 67, -776), but the command
execute if block 958 67 -781 minecraft:detector_rail[powered=false]
runs perfectly fine on a repeating command block at position (960, 67, -776).
The world seed is 8146930324540887234.
Comments 2
Try to toggle "Always active" twice on the command block that doesn't work. Does that solve the issue? (See MC-86846)
A few minutes later, I tried it again, at a different location on the same world, and both command blocks worked! The detector rail is at (1293, 71, -739), the command block executing when the detector rail is powered is at (1288, 71, -743), and the command block executing when the detector rail is not powered is at (1288, 71, -741). Is the bug linked to the location of the command blocks?