Class ElementHolder

java.lang.Object
io.github.xrickastley.sevenelements.element.ElementHolder

public final class ElementHolder extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • of

      public static ElementHolder of(LivingEntity owner, Element element)
    • ofApplication

      public static ElementHolder ofApplication(LivingEntity owner, Element element, ElementalApplication application)
    • hasElementalApplication

      public boolean hasElementalApplication()
    • getElement

      public Element getElement()
    • getElementalApplication

      @Nullable public @Nullable ElementalApplication getElementalApplication()
    • getOrCreateElementalApplication

      public ElementalApplication getOrCreateElementalApplication(double gaugeUnits, boolean aura)
    • getOrCreateElementalApplication

      public ElementalApplication getOrCreateElementalApplication(double duration, double gaugeUnits)
    • setElementalApplication

      public void setElementalApplication(@Nullable @Nullable ElementalApplication application)
    • shouldDoElements

      public boolean shouldDoElements()
    • canApplyElement

      public boolean canApplyElement(Element element, InternalCooldownContext icdContext)
      Checks if the element can be applied.
      Parameters:
      element - The element to test.
      icdContext - The InternalCooldownContext of this ElementalDamageSource. This controls the Internal Cooldown of specific attacks, as Internal Cooldowns are different between contexts.
    • canApplyElement

      public boolean canApplyElement(Element element, InternalCooldownContext icdContext, boolean handleICD)
      Checks if the element can be applied.
      Parameters:
      element - The element to test.
      icdContext - The InternalCooldownContext of this ElementalDamageSource. This controls the Internal Cooldown of specific attacks, as Internal Cooldowns are different between contexts.
      handleICD - Whether the ICD should be handled.
    • getOwner

      public LivingEntity getOwner()