Right now, /execute only lets you check conditions using “and”-style logic. If you want something to run when one thing OR another thing is true, you usually have to copy the same command multiple times.
This gets messy really fast, especially in datapacks where commands already tend to be long and complicated.
Example:
If I want to run a function when a player has either tag=example1 or tag=example2, I currently have to do this:
execute as @a if entity @s[tag=example1] run function example:function
execute as @a if entity @s[tag=example2] run function example:function
That’s fine for small amounts of code, but once you add more conditions, it becomes hard to read and annoying to maintain.
Example with the "or" condition:
execute as @a at @s
if entity @s[tag=example1]
or entity @s[tag=example2]
run function example:function
This would make commands shorter, easier to understand, and less repetitive. It would also help a lot with more complex datapacks where using multiple duplicate commands isn’t practical.
Overall, this would just make /execute nicer to work with without changing how existing commands behave.
Please sign in to leave a comment.
1 Comments