Class ElementHolder
java.lang.Object
io.github.xrickastley.sevenelements.element.ElementHolder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable ElementalApplicationprivate final Element(package private) final Map<UUID,InternalCooldownHolder> private final LivingEntity -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateElementHolder(LivingEntity owner, Element element) privateElementHolder(LivingEntity owner, Element element, ElementalApplication application) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanApplyElement(Element element, InternalCooldownContext icdContext) Checks if the element can be applied.booleancanApplyElement(Element element, InternalCooldownContext icdContext, boolean handleICD) Checks if the element can be applied.@Nullable ElementalApplicationgetOrCreateElementalApplication(double gaugeUnits, boolean aura) getOrCreateElementalApplication(double duration, double gaugeUnits) getOwner()booleanstatic ElementHolderof(LivingEntity owner, Element element) static ElementHolderofApplication(LivingEntity owner, Element element, ElementalApplication application) voidsetElementalApplication(@Nullable ElementalApplication application) boolean
-
Field Details
-
owner
-
internalCooldowns
-
element
-
application
-
-
Constructor Details
-
ElementHolder
-
ElementHolder
-
-
Method Details
-
of
-
ofApplication
public static ElementHolder ofApplication(LivingEntity owner, Element element, ElementalApplication application) -
hasElementalApplication
public boolean hasElementalApplication() -
getElement
-
getElementalApplication
-
getOrCreateElementalApplication
-
getOrCreateElementalApplication
-
setElementalApplication
-
shouldDoElements
public boolean shouldDoElements() -
canApplyElement
Checks if the element can be applied.- Parameters:
element- The element to test.icdContext- TheInternalCooldownContextof thisElementalDamageSource. 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- TheInternalCooldownContextof thisElementalDamageSource. This controls the Internal Cooldown of specific attacks, as Internal Cooldowns are different between contexts.handleICD- Whether the ICD should be handled.
-
getOwner
-