Class UseItemGoal<T extends Mob>

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

public class UseItemGoal<T extends Mob> extends Goal
  • Field Details

    • mob

      private final T extends Mob mob
    • item

      private final ItemStack item
    • canUseSelector

      private final Predicate<? super T extends Mob> canUseSelector
    • finishUsingSound

      private final SoundEvent finishUsingSound
  • Constructor Details

  • Method Details

    • canUse

      public boolean canUse()
      Specified by:
      canUse in class Goal
    • canContinueToUse

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

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

      public void stop()
      Overrides:
      stop in class Goal