Represents a predicate for an MCEntity's current effects.
This predicate is able to verify the presence of one or multiple MCPotionEffects on the entity, along with verifying that their EffectData is within some specified constraints. The predicate is not able to check the absence of certain effects, and will also require the specified effects to be present on the entity.
By default, any effect that is on the entity will match the predicate.
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
If the same effect had already been added to the map with a different set of effect data, then the previous configuration is replaced. Otherwise the addition completes normally.
Return Type: MobEffectsPredicate
MobEffectsPredicate.withEffect(effect as MCPotionEffect, builder as Consumer<EffectData>) as MobEffectsPredicate