The bug
Bees can end up wandering around randomly, apparently forgetting where their nest is and how to return to it.
I generated a number of worlds and noticed this behavior. Here is a seed with a nearby bee nest at 130, 71, 114, where you might replicate this issue: 1940698433
Attached is a screenshot of a bee that never returned to its nest during the entire day, wandering around a few chunks away from its nest near sundown. The tree attached to the nest has been marked with a gold block.
Linked issues
is duplicated by 6
Attachments
Comments 19
This does NOT just happen with naturally spawned bees. It can happen with any bees that have varying terrain heights nearby. From what I can tell, the bees were coded to stay near their hives on the x and z axis, but lacks the pathfinding for the y axis.
I concur with the previous comment: this is definitely not a problem with just natural bees. I summoned seven bees and bred three more from those seven. By the next game day, seven of them had flown away, never to return.
I also think the problem has gotten worse with recent builds. In the past, it would take dozens of game days to lose all of my bees (I usually have nine in three hives). But, recently (since 1.17-pre1 or perhaps one or two snapshots earlier than that), they've been leaving at a much higher rate.
It's like they fly too high, and this allows them to get past some x/z distance limit, and then when they drop altitude, they can't cross back (or, don't know how to). I've actually watched this happen a couple of times. They'll buzz around blissfully 40-50 blocks from their hives throughout the night.
They CAN be led back to their nest with flowers, so whatever the barrier is, it's pathfinding-only, not a hard barrier.
I'm having this problem as well, though I think it may have to do with spherical distance rather than merely the y-axis: my hives are surrounded by low buildings: there's no need for them even to approach 22 blocks in height, let alone exceed it to move about, and the ones that break away tend to do so centrifugally.
Another point of interest: I've occasionally observed the ones that break away hanging around their nests with pollen but not going in, and then going in when another emerges, but flying off if they have to wait too long. Now, I have six bees and two nests, so there should be enough housing, but perhaps there's an issue with them correctly ascertaining how full their nests are?
Finally: usually, I bring back the stragglers with leads. After being released in the vicinity of their old nest, they will simply float in the air or fly back and forth a short distance–they won't wander away, but they won't go into their nests either, regardless of what the still-registered bees are doing. Quitting and reloading the world jars them back into following their scripts, however, and they'll fly in immediately, though only eventually to wander off again in two to three days.
This issue has gotten a lot worse since the new terrain generation of 1.18. Naturally generated bees rarely stay close to their hives anymore.
Even here in 1.19.3, this bug is still present. Bees are currently far more trouble than they're worth.
This only happens with naturally spawned bees. I have made many bee apiaries, and the bees never leave the area, even if I place a flower they can't get to.