Class BowAttackGoal<T extends HostileEntity & RangedAttackMob>

java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.BowAttackGoal<T>

public class BowAttackGoal<T extends HostileEntity & RangedAttackMob>
extends Goal
  • Field Details

    • actor

      private final T extends HostileEntity & RangedAttackMob actor
    • speed

      private final double speed
    • attackInterval

      private int attackInterval
    • squaredRange

      private final float squaredRange
    • cooldown

      private int cooldown
    • targetSeeingTicker

      private int targetSeeingTicker
    • movingToLeft

      private boolean movingToLeft
    • backward

      private boolean backward
    • combatTicks

      private int combatTicks
  • Constructor Details

    • BowAttackGoal

      public BowAttackGoal​(T actor, double speed, int attackInterval, float range)
  • Method Details

    • setAttackInterval

      public void setAttackInterval​(int attackInterval)
    • canStart

      public boolean canStart()
      Specified by:
      canStart in class Goal
    • isHoldingBow

      protected boolean isHoldingBow()
    • shouldContinue

      public boolean shouldContinue()
      Overrides:
      shouldContinue in class Goal
    • start

      public void start()
      Overrides:
      start in class Goal
    • stop

      public void stop()
      Overrides:
      stop in class Goal
    • tick

      public void tick()
      Overrides:
      tick in class Goal