mojira.dev
MC-166980

Bees become stuck wandering to the north-west after completing a task, or randomly in large numbers

On the hunt for flowers, some bees may wander too far and/or simply never return to their home hive. Inversely, they can pop out of their hives and wander away forever, ignoring flowers.

They can also just collectively decide to become flying potatoes and drop what they're doing to go fly aimlessly in any direction.

 

It seems they get stuck in a sort of wandering mode until the world is reopened, where they can then path to the appropriate goal. If they're not already near a poi, they may easily glitch again.

 

How to reproduce:

1) Start a new world and examine bees as they go between flowers and their respective nests in either a natural or artificial setup.

2) I don't quite know the conditions under which they forget what to do, but it happens often. When one doesn't come back, manually lure or lead it back to the nest yourself. It may have completely forgotten or become stuck in a wandering mode and will usually not re-enter.

 

If you exit the world and rejoin whilst the bee(s) is near the nest, it will immediately set a path for the nest it could not see previously.

Related issues

MC-160850 Bees Flying far away from the Hive/Nest after being Harvested for Honey MC-167770 Bees leave nests, hunt for new one MC-167834 Bees keep wandering off of their Beehives. MC-168046 Bee Pathfinding Is Broken MC-169020 Bee pathfinding issues MC-169045 Wandering bees MC-169329 Bee wandering AI has a strong tendancy torwards north (-Z) MC-169515 Bees wander too far from nest. Don't return on their own MC-170293 Bees don't find theirs nests after flying above the sea MC-170425 Bees don't remember their nest if they wander far from it MC-170592 Bees get lost in unloaded chunks MC-170604 Bees wander away from hives. MC-172728 Bees wander away from nest and get lost MC-173121 Bees don't get back to his hives MC-173674 Free roaming bees/tropical fish migrating North/West MC-182261 Bees Despawn in SignlePlayer

Attachments

Comments

migrated
[media][media][media][media][media][media]
Flick Penrose

Can confirm this happens on 1.15.

Flick Penrose

Another thing to note, in my world they all seem to wander off to the northwest, which is roughly the direction of the biome where I originally found them. Don't know if it's a coincidence or not, but when I went about 200 blocks NW looking for them, sure enough I found a group of about 20 bees right at the NW boundary of my chunk loading distance. I found none when looking in other directions.

mudge123

I've had a similar issue with bees too. This also occurs with summoned bees just leaving. Went on an effect hunt for them and saw two bees escaped NW just like you found yours. However they did not come from NW.

Grayson

Bees seem to wander off pre 1.15 generated chunks for me.

Scott Robbins

I grabbed a nest of Bees using my silk touch. Brought them over to a couple empty hives I had and placed them. I started breeding them which seemed to work. Nut they have been slowly disappearing. They do not appear to anger mobs. So it cant be mobs.

I did notice that the fire I placed under them; they seemed to fly into(which is a logic problem in itself) and hurting themselves. So I took out the camp fires. Tried to keep breeding them... but they still disappeared.

  • A few things I fear it may be that you need to quick fix:

  • They are flying into fires or lava and dying... obviously bees should avoid those blocks.

  • They are flying so far away, they are never coming back. Which would be another Logic problem.

  • I also noticed they got hurt by berry bushes. Obviously they should be immune to those.

What else could they be getting damaged from? Are they flying into water and drowning? Try to thing of things you have not programed into their logic.

Thank you.

Steven Prince

MC Version 1.15.1

Mine also attempt to flee to the Northwest, despite having been found much further south and west than their current location.  Additionally, they attempt to do so even within a completely enclosed area with no way out.  Renders the bees that attempt this useless until I manually wrangle them back near their hives, at night or while raining, so maybe they'll go inside and stop trying to leave.

violine1101

Can confirm. Five out of twenty bees did not return to their hives and instead went into a journey to the north west as well. They were all spawned in using spawn eggs right next to their hives.

David Chamberlin

In regards to bee pathfinding, I've noticed that bees are getting sucked down into a whirlpool bubble column even if in the air above it.  If I create a bubble column with magma blocks, then spawn the bee in a glass chute above it, with an open top, the bee is sucked down. If I create a glass chute over ground, it flies out the top most always.  When the bee is sucked down, there is still a chance that it can escape, but most of the time it drowns.  That shouldn't happen, since the bubble column should not be affecting it in the air.

 

TorteShui

I brought back most of the bees that flew north-west and put them into an enclosed area with empty beehives inside. They did not use the new beehives, only newly bred bees did. However, when I took the outside beehives and the bee nest (with silk touch, in case it matters) and put them back, they suddenly used the new beehives inside the enclosed area.

This seems to indicate that they still considered the outside beehives as theirs, but couldn't get in because they were full (not anymore, but they were probably full when they tried to get into them) and thus flew away. As soon as they noticed they were gone, they stopped seeing them as theirs and were free to find a new one.

So, when bees try to find a beehive, that code should probably be synchronized (mutex, critical section), so that it's impossible that 2 bees get assigned the last free spot in the beehive when actually only one can get it. (I don't think it's multi-threaded, but it can also happen in single-threaded code if all bees check for a free slot first before getting assigned to one.)

As a side note, this is a similar behavior like for villagers and beds/workstations as described in MC-150806, so these issues might be related and the faulty code could be in a parent class of bees and villagers, probably some general POI assignment code.

Katherine Vought

I have a cluster of 32 beehives that I'm building into a super-hive with honeycomb as they produce it. I keep repopulating them up to a swarm, but then they wander off. I just found that they all appear to have wandered to the mountain to the NW and the majority are just buzzing around on top of that ridge. Hundreds of bees have accumulated there over the several attempts to repopulate the hive. Screenshots available if it might help.

Edit 3/1/2020: I have since tried the workaround listed here, and enclosed the hive with honey blocks (decorative) and dirt. I then repopulated the bees, some retrieved with leads, and some bred local. At least half of them very quickly are now just stuck against the North and west walls of the enclosure, buzzing away. Screenshot included.

Twilight S.

Oooh this sucks ass!! I roleplay as a beekeeper. I KILLED SOO MANY BEES!!!!  😣😭😭😭😭

Leaving and rejoining does not help because we play on a realm. Their AI gets scrambled and they start aimlessly flow towards Z negative (north). From what i noticed it happens randomly and can happen to any bee exiting nest or hive.

 

Flick Penrose

My workaround has been to make a huge glass enclosure for my bees; even when they get confused they do eventually find their way back so long as they don't get too far away. Not an ideal solution, but for now it works!

Also noticed they don't pathfind around End Rods, it's like they were with fences before.

Tokes

Btw a lot of mob pathfinding bugs include "wandering prefers the NW direction". It's not just bees. Why North-West? West is negative X and North is negative Z. They're showing preference for lower coordinate numbers. And with most mobs it's not that they head straight that direction, it's more like random wanderings pick that direction slightly more than other directions so over time it adds up. I suspect the fact that they're seeing their own current position wrong (from the north-west corner of their body rather than the middle) is behind it, but Mojang says it's fixed in 20w12a (a 1.16 snapshot) so hopefully we don't have to worry about it anymore.

Flick Penrose

Come to think of it, that would explain why my foxes spend so much time upstairs – the staircase leading up is at the NW corner of the house!

Christopher Martin

This impacts MCPE too: MCPE-58748

This issue has been marked as resolved, but how has it been resolved?

Here is the fix I suggested in the MCPE issue thread:

Bees should have two AI modes:

1) Have a "home" hive/nest set - in this mode they would navigate like Sea Turtles, always able to find their home hive or nest while the player is in range. In this mode Bees would work as they do currently while looking for flowers, but when weather, pollen or ToD force them to head home they should be much more able to find their way home (NBT tags with the XYZ coords of the "home" nest/hive would be used to make pathfinding more accurate, just like for the sea turtles). If a Bee arrives at their "home" nest and find it already fully occupied or missing it would immediately change to mode 2

2) No "home" set - in this mode the Bee begins a random wander to find a new home, and nothing can interrupt this search other than taking damage from a player or mob (resulting in combat behavior) or if a player has a flower (to allow homeless Bees to be led to a new home).

Should the current "fix" prove not to actually resolve anything might I suggest that setting a home in an NBT tag and then using those coords to improve pathfinding might be a better fix? I have to make assumptions because there are no details anywhere for how the issue has currently been "fixed".

Roger Antonio

Read the changelogs of the snapshots, it's in there.
Also xisumavoid has a nice snapshot video showing how they fixed it.

Thomas Tanky

there should be a 1.15.3 bugfix release for this. it breaks the main addition of this version after all.

SullyTheUnusual

Still an issue in 20w15a, although it seems to be happening with the baby bees more than the adults.

violine1101

If you still encounter this or a similar issue after 20w12a, please create a new ticket if we don't have one already.

XxSWxX

Supposed to be fixed on 20w12a, however this issue persists after full release 1.16.1. Bees are wandering over 100+ blocks, favoring north-west as title suggests.

Edit: this only happens to bees from hives that had bees preset into them. For instance naturally spawned bees, or hives/nests containing bees made through commands.

TorandoChaser

This is still an issue in 1.16.4. I have a huge flower patch within ten blocks of my beehives, and the bees keep ignoring/not finding it and wandering endlessly away from their hives. I have to use flowers to bring them back, they get totally lost on their own.

violine1101
Marián Kyral

It is still not fixed. I've a new world on 1.17 snapshots. I went to explore west direction from my base and found a place on the coast where were about 20 bees and only one bee nest. Also I've continued by boat and found another bee traveling to the west across the sea. No land were around.

 

Could this be connected with chunk unloading?

KirbAvion

Can confirm that this bug is still present in the 1.17 release.

Arisa Bot

⚠️ Please do not add Affected Versions to resolved reports.

Have a look at the Resolution and the comments to see why this ticket has been resolved. If you think this ticket has been resolved erroneously you can contact the Mojira staff on Discord or Reddit.

-- I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit

Niknokinater

1.17.1 rip

Flick Penrose

Welp, since this isn't getting fixed, I'll just have to keep my bees in greenhouses from now on!

ampolive

New issue with northwest bias in bees pathfinding is tracked in MC-206401.

Niknokinater

coschevi

Confirmed

Important

Mob behaviour

1.15 Pre-release 3, 1.15, 1.15.1, 1.15.1 Pre-release 1, 1.15.2 Pre-release 2, 1.15.2, 20w06a

20w12a

Retrieved