#Negative condition predicate?

1 messages · Page 1 of 1 (latest)

exotic parcel
#

I need a predicate that lets a function run on any mob, except bees

novel drumBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1733452243:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

calm ermine
#

you don't need a predicate

tough bison
#

But if you do for some reason, there's an inverted predicate type

vale obsidianBOT
#
execute as @e[type=1minecraft:bee] ...
#

Did a mistake

execute as @e[type=!minecraft:bee] ...
exotic parcel
#

this is what my function looks like rn

exotic parcel
tough bison
#

Depends, do you want every non-bee mob in the world to spawn 5 bees?

exotic parcel
#

no just the target entity that is running this function

#

should I go with @s[type=!minecraft:bee] ?

tough bison
#

Or include the target selector argument in the command that runs this function

exotic parcel
#

it's an enchantment

tough bison
#

Then include a predicate that it only works if the enchanted entity is a non-bee

exotic parcel
#

yes that was my original question

#

how do you do that?

tough bison
#

An inverted predicate type

#

Which then has a predicate for if the entity is a bee

exotic parcel
#

how does that work?

#

how do I type it?

tough bison
#

It's just a predicate that you then put another predicate inside of

tough bison
#

inverted predicate, and an entity_properties inside of that

#

Of course, you'll want to do that in the enchantment

exotic parcel
#

I still don't get how I get the inverted predicate...

tough bison
#

...

exotic parcel
#

ah found it

#

that's handy!

tough bison