Interface DamageCalculationEvent.Pre

All Superinterfaces:
Cancellable, DamageCalculationEvent, Event
All Known Subinterfaces:
AttackEntityEvent.Pre, DamageEntityEvent.Pre
All Known Implementing Classes:
AbstractDamageCalculationEventPre
Enclosing interface:
DamageCalculationEvent

public static interface DamageCalculationEvent.Pre extends DamageCalculationEvent
Fires before the damage steps and their side effects are applied.
  • Method Details

    • modifiersBefore

      default List<DamageModifier> modifiersBefore(Supplier<DamageStepType> type)
      Gets an unmodifiable list of all modifiers that applies just before the step.
      Parameters:
      type - The step type
      Returns:
      The list of modifiers
    • modifiersBefore

      List<DamageModifier> modifiersBefore(DamageStepType type)
      Gets an unmodifiable list of all modifiers that applies just before the step.
      Parameters:
      type - The step type
      Returns:
      The list of modifiers
    • addModifierBefore

      default void addModifierBefore(Supplier<DamageStepType> type, DamageModifier modifier)
      Adds a modifier that applies just before the step.
      Parameters:
      type - The step type
      modifier - The modifier
    • addModifierBefore

      void addModifierBefore(DamageStepType type, DamageModifier modifier)
      Adds a modifier that applies just before the step.
      Parameters:
      type - The step type
      modifier - The modifier
    • modifiersAfter

      default List<DamageModifier> modifiersAfter(Supplier<DamageStepType> type)
      Gets an unmodifiable list of all modifiers that applies just after the step.
      Parameters:
      type - The step type
      Returns:
      The list of modifiers
    • modifiersAfter

      List<DamageModifier> modifiersAfter(DamageStepType type)
      Gets an unmodifiable list of all modifiers that applies just after the step.
      Parameters:
      type - The step type
      Returns:
      The list of modifiers
    • addModifierAfter

      default void addModifierAfter(Supplier<DamageStepType> type, DamageModifier modifier)
      Adds a modifier that applies just after the step.
      Parameters:
      type - The step type
      modifier - The modifier
    • addModifierAfter

      void addModifierAfter(DamageStepType type, DamageModifier modifier)
      Adds a modifier that applies just after the step.
      Parameters:
      type - The step type
      modifier - The modifier