mojira.dev
MC-187920

Bees sometimes give up when returning home

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

Attachments

Comments

gaspoweredpick

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.

fescar

it also happens in 1.16.5 and 21w07a. (only with naturally spawned bees)

RWQFSFASXC395248

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.

SirDaddicus

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.

SirDaddicus

Oh, and I should add that I am running the datapack for Caves & Cliffs part 2.

KirbAvion

Can confirm in release 1.17. Likely relates to MC-206401.

SirDaddicus

Kirven: 1.17 with or without the datapack?

KirbAvion

Jim: Both. Had this happen on my survival server without the Caves & Cliffs datapack and my creative world with the datapack.

SirDaddicus

OK, I may have a major piece of information. Please check your situations to see if this is true:

Could it be that once they cross a certain threshold upwards, that's when they start losing their ability to return properly to their nests?

My home is seven meters away from the closest nest. It is twenty-two meters from the furthest one (in my farm). The hives are two and three blocks above the surface. There are no hives or nests within another hundred or more meters from this area.

My house started out five blocks tall. I build it in stories, adding five blocks at a time. I didn't have any issues with bees leaving when the house was fifteen blocks tall (or lower). But, once I built the fourth story (to twenty blocks), I noted a small decrease in population.

Now, we all know that bees tend to fly to the top of nearby structures. But, a building that tall is getting close to their distance limit, I suspect.

When I first saw this problem, my building was thirty-five blocks tall, and the problem was extreme. This is the first game since then where I've built up to twenty blocks, and that's when they seem to have started losing their pathing back to the hives.

I will continue building my house further up to try to confirm this theory. But, I would greatly appreciate it if we could get more data from other people who have seen this issue.

Environment: Java 1.17.1 with the C&C datapack. Survival, normal difficulty. Windows 10. Latest Java.

SirDaddicus

The previous comment is definitely at least part of the problem. Once my home base hit 35 blocks in height (or possibly 30), the bees started disappearing en masse. After just three days, there's only one bee left.

I also saw multiple bees fly straight up the wall to the roof. Sometimes they would come back down, other times they would wander off, probably forever (although that's hard to tell with bees without naming them).

SirDaddicus

Regarding Kirven Avion's suggestion that this might be related to MC-206401, a NW bias:

My home is to the west, so this is a possibility.

I do not recall what direction my home was in in my other singleplayer world.

In a 1.17.1 vanilla multiplayer world I'm in, however, the building is 18 blocks tall, and the bees are between 10 and 25 blocks away horizontally, and below the main building by 3-4 blocks. The building is NW of the bees. None of those bees seem to disappear other than through normal attrition. The bees also routinely fly over this building, but it doesn't seem to cause them to lose their pathing.

SirDaddicus

Another possibility I just discovered is that there is an unhoused nether portal nearby. They fly to it, through it (sometimes), and then off into oblivion.

To work around this, build an enclosure around any nearby active nether portals.

SirDaddicus

Does anybody know for sure what the maximum height a bee should be able to travel upwards is? If there's supposed to be a hard limit (like 22 blocks, as indicated on the Wiki), then there's clearly a problem with nearby structures.

SirDaddicus

Back to Kirven Avion's suggestion that this might be related to MC-206401, a NW bias:

I have confirmed that this is indeed part of the issue. I built my tower south of the bees this time, and built to thirty-five blocks. They seem to still leave, but not at nearly the rate they did when my tower was on the north or west sides.

However, I've still seen them flying over the top of the tower. According to the wiki, they're limited to twenty-two blocks distant from their trees, yet they fly over a building much taller than that. So, I think both issues are at play.

Can we please get some kind of statement from Mojang on this?

JL

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.

RWQFSFASXC395248

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.

KirbAvion

Seems to still be present in 1.18.2 and 22w12a.

Aisah Rashwan

Even here in 1.19.3, this bug is still present. Bees are currently far more trouble than they're worth.

Orbic

In 23w14a. In can sometimes even happen with bees that just generated with the world too; they will fly around and never go back to their spawned nest

Zachery Devero

coschevi

Confirmed

Gameplay

Normal

Mob behaviour

1.16 Pre-release 2, 1.16 Pre-release 3, 1.16.1, 1.16.4, 20w51a, ..., 1.18.2, 22w12a, 1.19.3, 23w14a, 23w45a

24w33a

Retrieved