While this would look weird because functions are not really a block language instead it's a language where everything is a command so this would require a rework how functions would run
But the idea is that there can be switches for execute and if it passes the check then it skips the switch otherwise check the next value, it could fix performance for commands that are checking for alot of values but after they find it they are still looking for it
How this would change code
From:
execute if block ~ ~ ~ white_terracotta run scoreboard players set out data 1
execute if block ~ ~ ~ orange_terracotta run scoreboard players set out data 1
execute if block ~ ~ ~ magenta_terracotta run scoreboard players set out data 2
it could change to
execute switch if block ~ ~ ~
white_terracotta run scoreboard players set out data 1
orange_terracotta run scoreboard players set out data 1
magenta_terracotta run scoreboard players set out data 2
Please sign in to leave a comment.
1 Comments