Interface Bee

All Superinterfaces:
Ageable, Animals, Attributable, Audience, Breedable, CommandSender, Creature, Damageable, DataComponentView, Entity, Frictional, HoverEventSource<HoverEvent.ShowEntity>, Leashable, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, PersistentDataViewHolder, Pointered, ProjectileSource, ServerOperator, Sound.Emitter

public interface Bee extends Animals
Represents a Bee.
Since:
1.15
  • Method Details

    • getHive

      Get the bee's hive location.
      Returns:
      hive location or null
      Since:
      1.15
    • setHive

      void setHive(@Nullable @Nullable Location location)
      Set the bee's hive location.
      Parameters:
      location - or null
      Since:
      1.15
    • getFlower

      Get the bee's flower location.
      Returns:
      flower location or null
      Since:
      1.15
    • setFlower

      void setFlower(@Nullable @Nullable Location location)
      Set the bee's flower location.
      Parameters:
      location - or null
      Since:
      1.15
    • hasNectar

      boolean hasNectar()
      Get if the bee has nectar.
      Returns:
      nectar
      Since:
      1.15
    • setHasNectar

      void setHasNectar(boolean nectar)
      Set if the bee has nectar.
      Parameters:
      nectar - whether the entity has nectar
      Since:
      1.15
    • hasStung

      boolean hasStung()
      Get if the bee has stung.
      Returns:
      has stung
      Since:
      1.15
    • setHasStung

      void setHasStung(boolean stung)
      Set if the bee has stung.
      Parameters:
      stung - has stung
      Since:
      1.15
    • getAnger

      int getAnger()
      Get the bee's anger level.
      Returns:
      anger level
      Since:
      1.15
    • setAnger

      void setAnger(int anger)
      Set the bee's new anger level.
      Parameters:
      anger - new anger
      Since:
      1.15
    • getCannotEnterHiveTicks

      int getCannotEnterHiveTicks()
      Get the amount of ticks the bee cannot enter the hive for.
      Returns:
      Ticks the bee cannot enter a hive for
      Since:
      1.15.2
    • setCannotEnterHiveTicks

      void setCannotEnterHiveTicks(int ticks)
      Set the amount of ticks the bee cannot enter a hive for.
      Parameters:
      ticks - Ticks the bee cannot enter a hive for
      Since:
      1.15.2
    • setRollingOverride

      void setRollingOverride(@NotNull TriState rolling)
      Sets the override for if the bee is currently rolling.
      Parameters:
      rolling - is rolling, or unset for vanilla behavior
      Since:
      1.18.2
    • getRollingOverride

      @NotNull TriState getRollingOverride()
      Gets the plugin set override for if the bee is currently rolling.
      Returns:
      plugin set rolling override
      Since:
      1.18.2
    • isRolling

      boolean isRolling()
      Gets if the bee is currently rolling.
      Returns:
      is rolling
      Since:
      1.18.2
    • setCropsGrownSincePollination

      void setCropsGrownSincePollination(int crops)
      Sets how many crops this bee has grown since it last pollinated.
      Parameters:
      crops - number of crops
      Since:
      1.19.2
    • getCropsGrownSincePollination

      int getCropsGrownSincePollination()
      Gets how many crops this bee has grown since it last pollinated.
      Returns:
      number of crops
      Since:
      1.19.2
    • setTicksSincePollination

      void setTicksSincePollination(int ticks)
      Sets how many ticks this bee has gone without pollinating.
      Parameters:
      ticks - number of ticks
      Since:
      1.19.2
    • getTicksSincePollination

      int getTicksSincePollination()
      Gets how many ticks this bee has gone without pollinating
      Returns:
      number of ticks
      Since:
      1.19.2
    • setTimeSinceSting

      void setTimeSinceSting(@NonNegative int time)
      Sets how many ticks have passed since this bee last stung. This value is used to determine when the bee should die after stinging.

      Note that bees don’t die at a fixed time. Instead, every few ticks, they have a random chance of dying, and that chance increases with this value.

      Parameters:
      time - number of ticks since last sting
      Since:
      1.21.8
    • getTimeSinceSting

      int getTimeSinceSting()
      Gets how many ticks have passed since this bee last stung. This value increases each tick after the bee stings and is used to determine when the bee should die.

      Note that bees don’t die at a fixed time. Instead, every few ticks, they have a random chance of dying, and that chance increases with this value.

      Returns:
      number of ticks since last sting
      Since:
      1.21.8