Interface ServerEvents.LivingEntity.Effect.Add

Enclosing class:
ServerEvents.LivingEntity.Effect
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ServerEvents.LivingEntity.Effect.Add
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addEffect(net.minecraft.world.entity.LivingEntity affectedEntity, @NotNull net.minecraft.world.effect.MobEffectInstance effect, net.minecraft.world.entity.Entity sourceEntity)
    Called when an effect is about to be applied to an entity.
  • Method Details

    • addEffect

      boolean addEffect(@NotNull net.minecraft.world.entity.LivingEntity affectedEntity, @NotNull @NotNull net.minecraft.world.effect.MobEffectInstance effect, @Nullable net.minecraft.world.entity.Entity sourceEntity)
      Called when an effect is about to be applied to an entity.
      Parameters:
      affectedEntity - the entity to which the effect will be applied
      effect - the effect instance to be applied
      sourceEntity - the entity causing the effect, or null if no source is specified
      Returns:
      true if the effect should be applied, otherwise false