java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
nokunami.floral_warfare.common.entity.ai.goal.plants.attack.ChomperChompGoal<T>

public class ChomperChompGoal<T extends BasePlant & IChomper> extends net.minecraft.world.entity.ai.goal.Goal
  • Field Details

    • mob

      public T extends BasePlant & IChomper mob
    • anim

      public boolean anim
    • timeToStartAnim

      public int timeToStartAnim
    • cooldownBetweenChomps

      public int cooldownBetweenChomps
  • Constructor Details

    • ChomperChompGoal

      public ChomperChompGoal(T plant, double speed, boolean mustSee)
  • Method Details

    • canUse

      public boolean canUse()
      Specified by:
      canUse in class net.minecraft.world.entity.ai.goal.Goal
    • canContinueToUse

      public boolean canContinueToUse()
      Overrides:
      canContinueToUse in class net.minecraft.world.entity.ai.goal.Goal
    • start

      public void start()
      Overrides:
      start in class net.minecraft.world.entity.ai.goal.Goal
    • stop

      public void stop()
      Overrides:
      stop in class net.minecraft.world.entity.ai.goal.Goal
    • requiresUpdateEveryTick

      public boolean requiresUpdateEveryTick()
      Overrides:
      requiresUpdateEveryTick in class net.minecraft.world.entity.ai.goal.Goal
    • checkAndPerformAttack

      protected void checkAndPerformAttack(@NotNull @NotNull net.minecraft.world.entity.LivingEntity food, double distance)
    • resetChompCooldown

      protected void resetChompCooldown()
    • isTimeToStartChompAnimation

      public boolean isTimeToStartChompAnimation()
    • isTimeToChomp

      public boolean isTimeToChomp()
    • tick

      public void tick()
      Overrides:
      tick in class net.minecraft.world.entity.ai.goal.Goal
    • getAttackReachSqr

      protected double getAttackReachSqr(net.minecraft.world.entity.LivingEntity target)