1

How to make a "Not equal to" operation

TheCubeCrafter7/12/21 3:42 pm
1 emeralds 185 9
7/12/2021 4:57 pm
TheCubeCrafter
Sorry if my questions are getting annoying but does anyone know how to make a "Not equal to" operation?
Posted by avatar
TheCubeCrafter
Level 16 : Journeyman Cow
2

Create an account or sign in to comment.

9

1
07/12/2021 4:14 pm
Level 45 : Master Engineer
packdotmcmeta
packdotmcmeta avatar
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 ...
1
07/12/2021 4:32 pm
Level 16 : Journeyman Cow
TheCubeCrafter
TheCubeCrafter avatar
Im sorry. I'm having trouble wrapping my head around this.
1
07/12/2021 4:37 pm
Level 21 : Expert Engineer
ExpertCoder14
ExpertCoder14 avatar
You haven't really specified what type of "not equal to" operation you are looking for. Is this involving scoreboards?
1
07/12/2021 4:39 pm
Level 16 : Journeyman Cow
TheCubeCrafter
TheCubeCrafter avatar
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
07/12/2021 4:47 pm
Level 21 : Expert Engineer
ExpertCoder14
ExpertCoder14 avatar
Use unless block instead of if block:
execute as @e[type=snowball] at @s unless block ~ ~-1 ~ air run function main:land´╗┐
1
07/12/2021 4:57 pm
Level 16 : Journeyman Cow
TheCubeCrafter
TheCubeCrafter avatar
Thanks!
1
07/12/2021 4:47 pm
Level 45 : Master Engineer
packdotmcmeta
packdotmcmeta avatar
Use the word unless instead of if.
1
07/12/2021 3:55 pm
Level 38 : Artisan Mlem Mlem Bat
HuoKnight
HuoKnight avatar
in what? for what? If you just mean normal text, then just use /=
1
07/12/2021 4:02 pm
Level 16 : Journeyman Cow
TheCubeCrafter
TheCubeCrafter avatar
I mean for datapacks
Planet Minecraft

Website

© 2010 - 2022
www.planetminecraft.com

Welcome