Class AbstractBurningElementalReaction

java.lang.Object
io.github.xrickastley.sevenelements.element.reaction.ElementalReaction
io.github.xrickastley.sevenelements.element.reaction.AbstractBurningElementalReaction
Direct Known Subclasses:
BurningElementalReaction, QuickenBurningElementalReaction

public abstract sealed class AbstractBurningElementalReaction extends ElementalReaction permits BurningElementalReaction, QuickenBurningElementalReaction
  • Field Details

  • Constructor Details

  • Method Details

    • isTriggerable

      public boolean isTriggerable(LivingEntity entity)
      Overrides:
      isTriggerable in class ElementalReaction
    • onReaction

      protected void onReaction(LivingEntity entity, ElementalApplication auraElement, ElementalApplication triggeringElement, double reducedGauge, @Nullable @Nullable LivingEntity origin)
      Description copied from class: ElementalReaction
      The 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:
      onReaction in class ElementalReaction
      Parameters:
      entity - The LivingEntity this 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 be Math.min(auraElementGU, triggeringElementGU * reactionCoefficient)
      origin - The LivingEntity that triggered this Elemental Reaction.
    • mixin$tick

      @Inject(method="Lio/github/xrickastley/sevenelements/component/ElementComponentImpl;tick()V", at=@At("HEAD")) public static void mixin$tick(@Local(field="owner:Lnet/minecraft/entity/LivingEntity;") LivingEntity entity)
    • mixin$forceReapplyDendroWhenBurning

      @Inject(method="Lio/github/xrickastley/sevenelements/component/ElementComponentImpl;attemptReapply(Lio/github/xrickastley/sevenelements/element/ElementalApplication;)Z", at=@At(value="IF",ordinal=2), directive="INJECT_AS_ELSE") public static void mixin$forceReapplyDendroWhenBurning(@Local(self=true) ElementComponent component, @Local(argsOnly=true) ElementalApplication application)
      Reapplies the Dendro element when the only "highest priority" element is Burning.

      This method will overwrite the current Dendro aura with the provided Elemental Application, as specified by the "Burning Refresh" mechanic by Elemental Gauge Theory > Advanced Mechanics > Burning.

      If the provided application is not the Dendro element, it is ignored.
      Parameters:
      application - The ElementalApplication to reapply.
    • mixin$onlyAllowPyroReactions

      @ModifyExpressionValue(method="Lio/github/xrickastley/sevenelements/component/ElementComponentImpl;triggerReactions(Lio/github/xrickastley/sevenelements/element/ElementalApplication;Lnet/minecraft/entity/LivingEntity;)Ljava/util/Set;", at=@At(value="INVOKE",target="Ljava/util/stream/Stream;noneMatch(Ljava/util/function/Predicate;)Z")) public static boolean mixin$onlyAllowPyroReactions(boolean original, @Local(self=true) ElementComponent component, @Local ElementalReaction reaction)
    • mixin$allowDendroPassthrough

      @ModifyExpressionValue(method="Lio/github/xrickastley/sevenelements/component/ElementComponentImpl;triggerReactions(Lio/github/xrickastley/sevenelements/element/ElementalApplication;Lnet/minecraft/entity/LivingEntity;)Ljava/util/Set;", at=@At(value="CONSTANT_ACCESS",target="hasHigherPriority;Z")) public static boolean mixin$allowDendroPassthrough(boolean original, @Local ElementComponent component, @Local ElementalApplication application)
    • mixin$reduceQuickenGauge

      @Inject(method="Lio/github/xrickastley/sevenelements/element/ElementalApplication;tick()V", at=@At("HEAD")) public static void mixin$reduceQuickenGauge(@Local(argsOnly=true) ElementalApplication application)
    • mixin$changeReaction

      @ModifyVariable(method="Lio/github/xrickastley/sevenelements/component/ElementComponentImpl;triggerReactions(Lio/github/xrickastley/sevenelements/element/ElementalApplication;Lnet/minecraft/entity/LivingEntity;)Ljava/util/Set;", at=@At(value="STORE",ordinal=3,shift=AFTER)) public static Optional<ElementalReaction> mixin$changeReaction(Optional<ElementalReaction> original, @Local(self=true) ElementComponent component, @Local(argsOnly=true) ElementalApplication application)