Class MeleeAttackGoal

    • Field Detail

      • speedModifier

        private final double speedModifier
      • followingTargetEvenIfNotSeen

        private final boolean followingTargetEvenIfNotSeen
      • path

        private Path path
      • pathedTargetX

        private double pathedTargetX
      • pathedTargetY

        private double pathedTargetY
      • pathedTargetZ

        private double pathedTargetZ
      • ticksUntilNextPathRecalculation

        private int ticksUntilNextPathRecalculation
      • ticksUntilNextAttack

        private int ticksUntilNextAttack
      • lastCanUseCheck

        private long lastCanUseCheck
      • failedPathFindingPenalty

        private int failedPathFindingPenalty
      • canPenalize

        private boolean canPenalize
    • Constructor Detail

      • MeleeAttackGoal

        public MeleeAttackGoal​(CreatureEntity p_i1636_1_,
                               double p_i1636_2_,
                               boolean p_i1636_4_)
    • Method Detail

      • canUse

        public boolean canUse()
        Specified by:
        canUse 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
      • checkAndPerformAttack

        protected void checkAndPerformAttack​(LivingEntity p_190102_1_,
                                             double p_190102_2_)
      • resetAttackCooldown

        protected void resetAttackCooldown()
      • isTimeToAttack

        protected boolean isTimeToAttack()
      • getTicksUntilNextAttack

        protected int getTicksUntilNextAttack()
      • getAttackInterval

        protected int getAttackInterval()
      • getAttackReachSqr

        protected double getAttackReachSqr​(LivingEntity p_179512_1_)