Class ProjectileAttackGoal

java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.ProjectileAttackGoal
Direct Known Subclasses:
DrownedEntity.TridentAttackGoal

public class ProjectileAttackGoal
extends Goal
  • Field Details

    • mob

      private final MobEntity mob
    • owner

      private final RangedAttackMob owner
    • target

      private LivingEntity target
    • updateCountdownTicks

      private int updateCountdownTicks
    • mobSpeed

      private final double mobSpeed
    • seenTargetTicks

      private int seenTargetTicks
    • minIntervalTicks

      private final int minIntervalTicks
    • maxIntervalTicks

      private final int maxIntervalTicks
    • maxShootRange

      private final float maxShootRange
    • squaredMaxShootRange

      private final float squaredMaxShootRange
  • Constructor Details

    • ProjectileAttackGoal

      public ProjectileAttackGoal​(RangedAttackMob mob, double mobSpeed, int intervalTicks, float maxShootRange)
    • ProjectileAttackGoal

      public ProjectileAttackGoal​(RangedAttackMob mob, double mobSpeed, int minIntervalTicks, int maxIntervalTicks, float maxShootRange)
  • Method Details

    • canStart

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

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

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

      public void tick()
      Overrides:
      tick in class Goal