1
How to make a "Not equal to" operation
Sorry if my questions are getting annoying but does anyone know how to make a "Not equal to" operation?
Create an account or sign in to comment.
9
1
Use these. The first one compares the score to a number and the second compares the score to another scoreboard value.
/execute unless score score here matches # run ...
/execute unless score first score = second score run ...
/execute unless score score here matches # run ...
/execute unless score first score = second score run ...
1
Im sorry. I'm having trouble wrapping my head around this.
1
You haven't really specified what type of "not equal to" operation you are looking for. Is this involving scoreboards?
1
Here's what i mean: execute as @e[type=snowball] at @s if block ~ ~-1 ~ air run function main:landInstead of making this explode in air i want it to explode when air is not below it
2
Use
unless block
instead of if block
:execute as @e[type=snowball] at @s unless block ~ ~-1 ~ air run function main:land
1
Thanks!
1
Use the word unless instead of if.
1
in what? for what? If you just mean normal text, then just use /=
1
I mean for datapacks