类 MobEffectEvent.Applicable

封闭类:
MobEffectEvent

public static class MobEffectEvent.Applicable extends MobEffectEvent
This event is fired to check if a MobEffectInstance can be applied to an entity.

It will be fired whenever LivingEntity.canBeAffected(MobEffectInstance) would be invoked.

  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • getEffectInstance

      public MobEffectInstance getEffectInstance()
      覆盖:
      getEffectInstance 在类中 MobEffectEvent
    • setResult

      public void setResult(MobEffectEvent.Applicable.Result result)
      Changes the result of this event.
    • getResult

      返回 the result of this event, which controls if the mob effect will be applied。
      返回:
      the result of this event, which controls if the mob effect will be applied
    • getEffectSource

      @Nullable public @Nullable Entity getEffectSource()
      返回:
      the entity source of the effect, or null if none exists
    • getApplicationResult

      public boolean getApplicationResult()
      返回 If the mob effect should be applied or not, based on the current event result。
      返回:
      If the mob effect should be applied or not, based on the current event result