In versions, prior to 1.13 if you wanted to compare two blocks you could use the /testforblocks command but in 1.13 the command was removed. I want to compare two dispensers to detect if the player has put a piece of Redstone dust in the center slot and the way I am trying to do this is by having a second dispenser with a piece of Redstone dust already in the center slot and have the two blocks be compared using commands. What is the 1.13 way of doing this?
I'm sorry that I would only reiterate what they say with this, but I wanted you to know my source.
/execute if|unless blocks [src begin] [src end] [dest] all|masked run [sub command]
the A|B is A or B, src begin is the low number XYZ chords, and end is the hight number ones... the sub command is the command you want executed if it's true, or unless it's true=it's falce.;,;.
I hope this helped.;,;.