But when I programm java "else" is valid syntax. My grandpa taught me java.
This is a bug.
That doesnt make sense. I also want
execute if block ~ ~ ~ minecraft:netherite_block run setblock ~ ~ ~ diamond block else run setblock ~ ~ ~ netherite_block
which doesnt work. Your method
execute if block ~ ~ ~ minecraft:diamond_block run setblock ~ ~ ~ netherite_block
Then, another that’s
execute unless block ~ ~ ~ minecraft:diamond_block run setblock ~ ~ ~ diamond_block
doesnt work either. It always places a diamond block even if there is already a diamond block. Its supposed to swap these blocks.
Thank you for your report!
MC-80032 is my issue. Fuond it.