The Bug
Bees do not leave their hives in the Nether and the End when first placed. Bees also do not leave their hives if the weather changes from rain to clear while in the Nether/End. The world must be reloaded to make them leave their hives.
See the reproduction steps below for more details.
Steps to Reproduce (First Placed)
Set the time to night and the weather to clear.
Place a bee nest and summon three bees next to it so that they enter the hive. Break the bee nest and collect it.
Enter the Nether using:
/execute in minecraft:the_nether run tp 0 128 0
Set the time to day and place the bee hive with bees.
❌ Note how the bees do not exit the hive.
✔ Reloading the world makes the bees exit their hive after some time.
Steps to Reproduce (Weather Changes)
Set the time to day and the weather to clear.
Place a bee nest and summon three bees next to it so that they enter the hive. Break the bee nest and collect it.
Enter the Nether using:
/execute in minecraft:the_nether run tp 0 128 0
Set the weather to rain and place the bee hive with bees. Then, reload the world.
Set the weather to clear.
❌ Note how the bees do not exit the hive.
✔ Reloading the world makes the bees exit their hive after some time.
Linked issues
is duplicated by 4
Attachments
Comments 51
Bees leave neither hives nor nests placed in the nether. This does not seem to be affected by the position of the hive, cardinal orientation, elevation, etc.
I am experiencing the same issue. Unfortunately, the world I am playing on is huge (Quite a few Gigabytes in size).
What I tested:
comparing NBT (NBeeT?) data for both hives and the bees inside them. I found working (in the overworld) hive containing a bee differing only in the following attributes: 'Dimension', 'FlowerPos', 'HivePos', 'Motion', 'Pos', 'Rotation', 'TicksInHive'
placing a hive that didn't work in the nether in the overworld - bees popped out immediately.
placing a hive that worked in the overworld in the nether - bees stayed in the hive.
placing the first hive back in the nether after it worked in the overworld - stopped working again.
placing a hive in the nether that worked in the overworld in the nether, surrounded by air blocks with a flower nearby - hapily buzzing hive of couch potatoes.
Anomalies preceding the bee strike:
a server restart
an ongoing render of our minecraft world that will be done in about 30 hours
Additional random potentially useful information:
there are some permaloaded nether chunks with a honey farm that contains quite a few hives in this world.
I'll try to reproduce the problem on a truncated copy of our world in the next days, perhaps I can provide a world download then.
Can confirm for 1.20.6 and 1.21 Pre-Release 2.
I've figured out why this occurs, and wish to add exact reproduction instructions so this super annoying bug can get fixed. The root cause is that the nether and end do not have their rain state correctly initialized upon world load.
Reproduction steps:
Create a world. Make sure it is NOT raining, then save and quit.
Reload the world. Bees will leave their hives in the nether and end.
Set the weather to rain, and save and quit.
Reload the world. Bees will no longer leave their hives in the nether and end.
Code analysis (using Mojang mappings):
When a world is first loaded, a ServerLevelData object is loaded from level.dat to provide various world information, such as time or weather. This information is used in loading all dimensions. Next, in the <init> function of ServerLevel, prepareWeather() is called. This function checks the provided ServerLevelData object and if it is raining, sets rainLevel to 1.0f (otherwise it defaults to 0.0f). Now why is this important?
rainLevel is only ever updated in one other function - advanceWeatherCycle() in ServerLevel, and if the world's dimension returns false for hasSkyLight(), then that method will never change rainLevel, causing it to remain at the value it was initialized to until the world is unloaded and saved to disk.
BehiveBlockEntity calls releaseOccupant() to attempt to release its bees, which will return false if the release reason is not BeeReleaseStatus.EMERGENCY and either isNight() or isRaining() returns true. isNight() will always return false for dimensions with a fixed time (which the nether and end are), and isRaining() returns whether the world's rainLevel is greater than 0.2f.
Thus if the world was saved while raining, upon reloading bees will never be able to leave their hives until the world is saved again when it is not raining.
Can confirm 1.21 - Still present - Bees would not leave the hive in the nether.
Following Capt S0L0's instructions. I shut my server down while it was sunny, and restarted it. After the restart, I went to the nether and the bees were leaving their hives again.
I also am having this issue. My bee farm is in the nether above bedrock. Yesterday it was working as intended. I'm in 1.15.1. I've changed nothing since yesterday. I can hear them buzzing but no exits so far and I've been around the farm for about a half hour now. I've tried breaking a hive and replacing it but still no luck. Actually as I'm writing this, I tried manually pulling honey from a couple of the hives, which did make them angry enough to pop out for a bit, but once they stopped being angry, they went back in and are stuck again.