Class Bee.BeePollinateGoal

Enclosing class:
Bee

class Bee.BeePollinateGoal extends Bee.BaseBeeGoal
  • Field Details

    • MIN_POLLINATION_TICKS

      private static final int MIN_POLLINATION_TICKS
      See Also:
    • MIN_FIND_FLOWER_RETRY_COOLDOWN

      private static final int MIN_FIND_FLOWER_RETRY_COOLDOWN
      See Also:
    • MAX_FIND_FLOWER_RETRY_COOLDOWN

      private static final int MAX_FIND_FLOWER_RETRY_COOLDOWN
      See Also:
    • VALID_POLLINATION_BLOCKS

      private final Predicate<BlockState> VALID_POLLINATION_BLOCKS
    • ARRIVAL_THRESHOLD

      private static final double ARRIVAL_THRESHOLD
      See Also:
    • POSITION_CHANGE_CHANCE

      private static final int POSITION_CHANGE_CHANCE
      See Also:
    • SPEED_MODIFIER

      private static final float SPEED_MODIFIER
      See Also:
    • HOVER_HEIGHT_WITHIN_FLOWER

      private static final float HOVER_HEIGHT_WITHIN_FLOWER
      See Also:
    • HOVER_POS_OFFSET

      private static final float HOVER_POS_OFFSET
      See Also:
    • successfulPollinatingTicks

      private int successfulPollinatingTicks
    • lastSoundPlayedTick

      private int lastSoundPlayedTick
    • pollinating

      private boolean pollinating
    • hoverPos

      @Nullable private Vec3 hoverPos
    • pollinatingTicks

      private int pollinatingTicks
    • MAX_POLLINATING_TICKS

      private static final int MAX_POLLINATING_TICKS
      See Also:
  • Constructor Details

    • BeePollinateGoal

      BeePollinateGoal()
  • Method Details

    • canBeeUse

      public boolean canBeeUse()
      Specified by:
      canBeeUse in class Bee.BaseBeeGoal
    • canBeeContinueToUse

      public boolean canBeeContinueToUse()
      Specified by:
      canBeeContinueToUse in class Bee.BaseBeeGoal
    • hasPollinatedLongEnough

      private boolean hasPollinatedLongEnough()
    • isPollinating

      boolean isPollinating()
    • stopPollinating

      void stopPollinating()
    • start

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

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

      public boolean requiresUpdateEveryTick()
      Overrides:
      requiresUpdateEveryTick in class Goal
    • tick

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

      private void setWantedPos()
    • getOffset

      private float getOffset()
    • findNearbyFlower

      private Optional<BlockPos> findNearbyFlower()
    • findNearestBlock

      private Optional<BlockPos> findNearestBlock(Predicate<BlockState> p_28076_, double p_28077_)