Class ElementalReaction.Settings
java.lang.Object
io.github.xrickastley.sevenelements.element.reaction.ElementalReaction.Settings
- Enclosing class:
ElementalReaction
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate final Identifierprivate final Stringprivate booleanprivate Set<Identifier> private doubleprivate booleanprivate final @Nullable Text -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyResultAsAura(boolean applyResultAsAura) Whether the triggering Element is applied as an aura.endsReactionTrigger(boolean endsReactionTrigger) Whether this reaction ends all future reactions from triggering.preventsPriorityUpgrade(boolean preventsPriorityUpgrade) Whether this reaction prevents the priority upgrade.preventsReactionsAfter(Identifier... reactions) Whether this reaction prevents other reactions from triggering after it.reversable(boolean reversable) Sets the Elemental Reaction as reversable.setAuraElement(Element element) setAuraElement(Element element, int priority) Sets the Aura Element of the Elemental Reaction.setReactionCoefficient(double reactionCoefficient) Sets the reaction coefficient of the Elemental Reaction.setReactionDisplayOrder(Element... elementOrder) Sets the display order when this reaction is displayed.setTriggeringElement(Element element) setTriggeringElement(Element element, int priority) Sets the Triggering Element of the Elemental Reaction.
-
Field Details
-
name
-
id
-
text
-
reactionCoefficient
private double reactionCoefficient -
auraElement
-
triggeringElement
-
reversable
private boolean reversable -
applyResultAsAura
private boolean applyResultAsAura -
endsReactionTrigger
private boolean endsReactionTrigger -
preventsPriorityUpgrade
private boolean preventsPriorityUpgrade -
preventsReactionsAfter
-
reactionDisplayOrder
-
-
Constructor Details
-
Settings
-
-
Method Details
-
setReactionCoefficient
Sets the reaction coefficient of the Elemental Reaction. This is a multiplier that dictates how many gauge units are consumed from the aura element.- Parameters:
reactionCoefficient- The reaction coefficient of the Elemental Reaction.
-
setAuraElement
-
setAuraElement
Sets the Aura Element of the Elemental Reaction.
This is the element that must be applied onto the entity in order for the reaction to be triggered by applying the Triggering Element onto the entity.
However, when the Elemental Reaction is considered "reversable" throughSettings#reversable(), the Aura Element may be considered as the Triggering Element, and the Triggering Element may be considered as the Aura Element.- Parameters:
element- The Aura Element of the Elemental Reaction.priority- The priority of this reaction triggering whenauraElementis currently the triggering element.prioritywill only be applied whenreversableistrue, as that is the only instance theauraElementcan be considered a triggering element.
-
setTriggeringElement
-
setTriggeringElement
Sets the Triggering Element of the Elemental Reaction.
This is the element that must be applied onto the entity with the specified Aura Element in order for the reaction to be triggered.
However, when the Elemental Reaction is considered "reversable" throughSettings#reversable(), the Triggering Element may be considered as the Aura Element, and the Aura Element may be considered as the Triggering Element.- Parameters:
element- The Triggering Element of the Elemental Reaction.priority- The priority of this reaction triggering whentriggeringElementis the triggering element.
-
setReactionDisplayOrder
Sets the display order when this reaction is displayed.
This must contain only the Aura and Triggering element, as anIllegalArgumentExceptionwill be thrown when a different unexpectedElementis added instead.- Parameters:
elementOrder- The order of the elements when this reaction is displayed.
-
reversable
Sets the Elemental Reaction as reversable.
When this istrue, the Triggering Element can be considered as an Aura Element.- Parameters:
reversable- Whether the Elemental Reaction is reversable.
-
applyResultAsAura
Whether the triggering Element is applied as an aura.
Once all possible Elemental Reactions have been triggered, the triggering element may have some Gauge Units left. This setting allows for the remaining Gauge Units to be applied as an Elemental Aura.
If multiple Elemental Reactions are triggered, all triggered Elemental Reactions must have this setting set totruefor the Gauge Units from the triggering element to be applied as an Elemental Aura.
Do note that this setting will not affect Elemental Applications withElementalApplication.Type.DURATION, as those are always applied as an Aura Element after possible reactions.- Parameters:
applyResultAsAura- Whether the remaining Gauge Units from the triggering element are applied as an Elemental Aura.
-
endsReactionTrigger
Whether this reaction ends all future reactions from triggering.
Once a reaction is triggered, an attempt to trigger another is made. This setting denies other reactions to be triggered after triggering this reaction.- Parameters:
endsReactionTrigger- Whether reactions can be triggered after this reaction.
-
preventsPriorityUpgrade
Whether this reaction prevents the priority upgrade.
Once a reaction is triggered, an attempt to trigger another is made. If no reactions were found, an attempt to upgrade the "element priority" is done. This setting denies that attempt after triggering this reaction.
However, the attempt to upgrade the priority will only be denied once after this reaction. Succeeding reactions must also have this property enabled in order for the upgrade to be fully denied.- Parameters:
preventsPriorityUpgrade- Whether the element priority can be upgraded after this reaction.
-
preventsReactionsAfter
Whether this reaction prevents other reactions from triggering after it.
This setting denies the specified reactions from triggering directly after this reaction.- Parameters:
reactions- The reactions to prevent from triggering directly after this reaction.
-
getAuraElement
-
getTriggeringElement
-