Interface MobEffectBehaviour


public interface MobEffectBehaviour
What an effect does to the entity it runs on. Fidorial gives behaviour to few vanilla effects, so a plugin can attach one to a vanilla effect as well as to an effect it registers.

Every hook runs on the thread of the region owning the entity.

Since:
0.1.0
  • Method Details

    • onApplied

      default void onApplied(LivingEntity entity, MobEffectInstance effect)
      Called when the effect is added to an entity, or changed by a new application.
      Parameters:
      entity - the affected entity
      effect - the effect now running
      Since:
      0.1.0
    • onTick

      default void onTick(LivingEntity entity, MobEffectInstance effect)
      Called every tick while the effect runs, before its duration goes down.
      Parameters:
      entity - the affected entity
      effect - the running effect
      Since:
      0.1.0
    • onRemoved

      default void onRemoved(LivingEntity entity, MobEffectInstance effect)
      Called when the effect is removed or runs out.
      Parameters:
      entity - the entity that had it
      effect - the effect that stopped
      Since:
      0.1.0