Class ActionConfig

java.lang.Object
nokunami.floral_warfare.common.entity.ActionConfig

public class ActionConfig extends Object
  • Constructor Details

    • ActionConfig

      public ActionConfig()
  • Method Details

    • actState

      public boolean actState()
    • repeatAnim

      public boolean repeatAnim()
    • resetRepeats

      public Predicate<net.minecraft.world.entity.Mob> resetRepeats()
    • resetRepeats

      public boolean resetRepeats(net.minecraft.world.entity.Mob entity)
    • repeatAmount

      public int repeatAmount(net.minecraft.world.entity.Mob mob)
    • intervalSupplier

      public ActionIntervalSupplier<net.minecraft.world.entity.Mob> intervalSupplier()
    • actionInterval

      public ActionInterval actionInterval(net.minecraft.world.entity.Mob mob)
    • rangeSupplier

      public ActionRangeSupplier<net.minecraft.world.entity.Mob> rangeSupplier()
    • range

      public ActionRange range(net.minecraft.world.entity.Mob mob)
    • goalTick

      public Consumer<net.minecraft.world.entity.Mob> goalTick()
    • tickGoal

      public void tickGoal(net.minecraft.world.entity.Mob entity)
    • canUseGoal

      public Predicate<net.minecraft.world.entity.Mob> canUseGoal()
    • canUseGoal

      public boolean canUseGoal(net.minecraft.world.entity.Mob entity)
    • shouldUpdateEveryTick

      public boolean shouldUpdateEveryTick(net.minecraft.world.entity.Mob mob)
    • actStatus

      public ActionConfig actStatus(boolean config)

      Sets the Act Status whilest performing action, useful for animations and texture swaping.

    • repeatAnimation

      public ActionConfig repeatAnimation(boolean repeat)

      Whether to repeat the attack animation or not, only applies to burst attacks.

    • repeat

      public ActionConfig repeat(int times, boolean animation)
    • repeat

      public ActionConfig repeat(int times, Predicate<net.minecraft.world.entity.Mob> resetPredicate, boolean animation)
    • repeat

      public ActionConfig repeat(ToIntFunction<net.minecraft.world.entity.Mob> times, Predicate<net.minecraft.world.entity.Mob> resetPredicate, boolean animation)
    • action

      public ActionConfig action(int interval, int preDelay, int postDelay)
      Parameters:
      interval - Sets the interval for action.
      preDelay - Sets the ticks before to play animation before performing Action.
      postDelay - Sets the ticks after performing action. (used for post effects like fire breath, etc.)
    • action

      public ActionConfig action(ActionIntervalSupplier<net.minecraft.world.entity.Mob> supplier)
      Applies a ActionInterval with a function.
    • range

      public ActionConfig range(double actionRange)
      Parameters:
      actionRange - Sets the range for action.
    • range

      public ActionConfig range(double actionRange, double maxRange)
      Parameters:
      actionRange - Sets the range for action, if target is within this range it will perform the action.
      maxRange - Sets the max distance, if target is greater than this, it'll forget.
    • range

      public ActionConfig range(ActionRangeSupplier<net.minecraft.world.entity.Mob> supplier)
      Applies a ActionRange with a function.
    • actionPredicate

      public ActionConfig actionPredicate(Predicate<net.minecraft.world.entity.Mob> predicate)
      Parameters:
      predicate - Defines a predicate to use action goal.
    • shouldAlwaysTick

      public ActionConfig shouldAlwaysTick(Predicate<net.minecraft.world.entity.Mob> predicate)
      Parameters:
      predicate - Defines a predicate to check if goal should update on every tick.
    • onGoalTick

      public ActionConfig onGoalTick(Consumer<net.minecraft.world.entity.Mob> predicate)
      Parameters:
      predicate - Defines a predicate to consumer to tick when goal is active.