mojira.dev
MC-178119

Bees go into their beehive / bee nest even in biomes where it never rains

The bug

When it rains, bees are going back into their hives, which is normal. However, in some biomes, like the savanna biome, it never rains, the sky gets darker but there is no rain falling.

When it is raining, bees in these biomes will also go into their hive and hide from the rain. But at their location, it is not raining.

Linked issues

Attachments

Comments

bugi74

Related MC-1105

Avoma

Can confirm in 20w48a.

Avoma

Can confirm in 21w03a.

Avoma

Can confirm in 1.17.1. Video attached.

Avoma

Can confirm in 1.18.2 and 22w16b. Here's a code analysis of this issue.

Code Analysis:

The following is based on a decompiled version of Minecraft 1.18.2 using MCP-Reborn.

net.minecraft.world.entity.animal.Bee.java

public class Bee extends Animal implements NeutralMob, FlyingAnimal {
   ...
   boolean wantsToEnterHive() {
      if (this.stayOutOfHiveCountdown <= 0 && !this.beePollinateGoal.isPollinating() && !this.hasStung() && this.getTarget() == null) {
         boolean flag = this.isTiredOfLookingForNectar() || this.level.isRaining() || this.level.isNight() || this.hasNectar();
         return flag && !this.isHiveNearFire();
      } else {
         return false;
      }
   }
   ...

If we look at the above class, we can see that the code calls the wantsToEnterHive() method if it's raining in the world, regardless of the biome where the bee's hive/nest is located in. Because of this, when it's raining and bees are in non-precipitation biomes, they will enter their hive/nest.

Avoma

Can confirm in 1.19.2.

sof

Can confirm in 24w45a. Also would like to request ownership of this report to maintain it.

sof

(Unassigned)

Confirmed

Mob behaviour

1.15.2, 1.16 Pre-release 4, 1.16.4, 20w48a, 21w03a, ..., 1.18.2, 22w16b, 1.19.2, 24w45a, 1.21.4

Retrieved