Class EatBlockGoal

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.EatBlockGoal

public class EatBlockGoal extends Goal
  • Field Details

    • EAT_ANIMATION_TICKS

      private static final int EAT_ANIMATION_TICKS
      See Also:
    • IS_TALL_GRASS

      private static final Predicate<BlockState> IS_TALL_GRASS
    • mob

      private final Mob mob
      The entity owner of this AITask
    • level

      private final Level level
      The world the grass eater entity is eating from
    • eatAnimationTick

      private int eatAnimationTick
      Number of ticks since the entity started to eat grass
  • Constructor Details

    • EatBlockGoal

      public EatBlockGoal(Mob pMob)
  • Method Details

    • 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
    • canContinueToUse

      public boolean canContinueToUse()
      Overrides:
      canContinueToUse in class Goal
    • getEatAnimationTick

      public int getEatAnimationTick()
    • tick

      public void tick()
      Overrides:
      tick in class Goal