Class AbstractSwirlElementalReaction
java.lang.Object
io.github.xrickastley.sevenelements.element.reaction.ElementalReaction
io.github.xrickastley.sevenelements.element.reaction.AbstractSwirlElementalReaction
- Direct Known Subclasses:
CryoSwirlElementalReaction,ElectroSwirlElementalReaction,FrozenSwirlElementalReaction,HydroSwirlElementalReaction,PyroSwirlElementalReaction
public abstract sealed class AbstractSwirlElementalReaction
extends ElementalReaction
permits PyroSwirlElementalReaction, HydroSwirlElementalReaction, ElectroSwirlElementalReaction, CryoSwirlElementalReaction, FrozenSwirlElementalReaction
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.xrickastley.sevenelements.element.reaction.ElementalReaction
ElementalReaction.Settings -
Field Summary
FieldsFields inherited from class io.github.xrickastley.sevenelements.element.reaction.ElementalReaction
applyResultAsAura, auraElement, endsReactionTrigger, id, name, preventsPriorityUpgrade, preventsReactionsAfter, reactionCoefficient, reactionDisplayOrder, reversable, text, triggeringElement -
Constructor Summary
ConstructorsConstructorDescriptionCreates a Swirl reaction with the specified settings.AbstractSwirlElementalReaction(ElementalReaction.Settings settings, boolean elementalAbsorptionOnly) Creates a Swirl reaction with the specified settings.AbstractSwirlElementalReaction(ElementalReaction.Settings settings, Element swirlElement) Creates a Swirl reaction with the specified settings. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidonReaction(LivingEntity entity, ElementalApplication auraElement, ElementalApplication triggeringElement, double reducedGauge, @Nullable LivingEntity origin) The function to execute after the Elemental Reaction has been triggered.Methods inherited from class io.github.xrickastley.sevenelements.element.reaction.ElementalReaction
displayReaction, getAuraElement, getAuraElementPriority, getElementPair, getEntitiesInAoE, getEntitiesInAoE, getHighestElementPriority, getId, getPriority, getPriority, getReactionDamage, getReactionDamage, getReactionDamage, getReactionDamage, getReactionDisplayOrder, getText, getTriggeringElement, getTriggeringElementPriority, hasAnyElement, hasAnyElement, hasElement, idEquals, isTriggerable, isTriggerable, onTrigger, preventsReaction, preventsReaction, shouldApplyResultAsAura, shouldEndReactionTrigger, shouldPreventPriorityUpgrade, trigger, trigger
-
Field Details
-
swirlElement
-
elementalAbsorptionOnly
private final boolean elementalAbsorptionOnly
-
-
Constructor Details
-
AbstractSwirlElementalReaction
AbstractSwirlElementalReaction(ElementalReaction.Settings settings) Creates a Swirl reaction with the specified settings.
The specified aura element will serve as the "swirlable" element.
For example, if the Aura Element isElement.PYRO, then the Pyro element is swirled and spread to nearby targets (r=3m).
For the Gauge Units applied by the Swirl reaction, as well as its duration, you may refer here: invalid input: '<'a href=https://genshin-impact.fandom.com/wiki/Elemental_Gauge_Theory/Advanced_Mechanics#Swirl_Elemental_Application"> Swirl Elemental Application- Parameters:
settings- TheSettingsfor thisElementalReaction.
-
AbstractSwirlElementalReaction
AbstractSwirlElementalReaction(ElementalReaction.Settings settings, boolean elementalAbsorptionOnly) Creates a Swirl reaction with the specified settings.
The "swirlable" element is the spread element upon triggering the swirl reaction.
For example, if the swirlable Element isElement.PYRO, then the Pyro element is swirled and spread to nearby targets (r=3m).
For the Gauge Units applied by the Swirl reaction, as well as its duration, you may refer here: invalid input: '<'a href=https://genshin-impact.fandom.com/wiki/Elemental_Gauge_Theory/Advanced_Mechanics#Swirl_Elemental_Application"> Swirl Elemental Application- Parameters:
settings- TheSettingsfor thisElementalReaction.elementalAbsorptionOnly- Whether Swirl will only deal its Elemental Absorption damage to the Swirl target instead, i.e. the entity the Swirl reaction was triggered on.
-
AbstractSwirlElementalReaction
AbstractSwirlElementalReaction(ElementalReaction.Settings settings, Element swirlElement) Creates a Swirl reaction with the specified settings.
The "swirlable" element is the spread element upon triggering the swirl reaction.
For example, if the swirlable Element isElement.PYRO, then the Pyro element is swirled and spread to nearby targets (r=3m).
For the Gauge Units applied by the Swirl reaction, as well as its duration, you may refer here: invalid input: '<'a href=https://genshin-impact.fandom.com/wiki/Elemental_Gauge_Theory/Advanced_Mechanics#Swirl_Elemental_Application"> Swirl Elemental Application- Parameters:
settings- TheSettingsfor thisElementalReaction.swirlElement- The element to Swirl.
-
-
Method Details
-
onReaction
protected void onReaction(LivingEntity entity, ElementalApplication auraElement, ElementalApplication triggeringElement, double reducedGauge, @Nullable @Nullable LivingEntity origin) Description copied from class:ElementalReactionThe function to execute after the Elemental Reaction has been triggered. This function is executed after both elements have reacted and have been reduced.- Specified by:
onReactionin classElementalReaction- Parameters:
entity- TheLivingEntitythis Elemental Reaction was triggered on.auraElement- The aura element that triggered this reaction.triggeringElement- The triggering element that reacted with the aura element.reducedGauge- The gauge units reduced from both Elements. This will always beMath.min(auraElementGU, triggeringElementGU * reactionCoefficient)origin- TheLivingEntitythat triggered this Elemental Reaction.
-