The bug
Bees freeze if they cannot execute their current AI task and cannot pathfind to their current target, such as a player, a flower, or a bee hive/nest. This is probably the case because bees don't have a wandering AI and completely rely on their current target(s) for pathfinding.
This issue seems to occur in multiple different scenarios:
Bee cannot find a flower or pathfind to a flower
Angry bee cannot pathfind to its attacker (MC-159676)
Bee cannot find a new home hive/nest or cannot pathfind to its home hive/nest, either after having pollinated a flower or after not finding a flower to pollinate
The last case appears to happen most often. It seems like if a bee has not pollinated a flower for a while (about 3600 ticks, maybe a bit more) and does not have a home hive (which happens often, see MC-159418), this issue occurs.
The fact that the bee does not have any animation when being stuck in the air is a client-side issue and also occurs in other circumstances. That issue is tracked in MC-159518.
To reproduce
There are many ways to reproduce this issue, however the most common way this happens is if a bee is too high up in the sky. That case is easily reproducible using the following steps:
Spawn a bee at the top of the world, way above the ground
Follow the bee for a while, until its
TicksSincePollination
value is at least3600
Wait a bit longer
→ ❌ The bee will stand still
Linked issues
is duplicated by
relates to
Attachments
Comments
Here you go:
{NoGravity: 1b, Brain: {memories: {}}, HurtByTimestamp: 0, FlowerPos: {X: 0, Y: 0, Z: 0}, HasStung: 0b, Attributes: [{Base: 10.0d, Name: "generic.maxHealth"}, {Base: 0.0d, Name: "generic.knockbackResistance"}, {Base: 0.30000001192092896d, Name: "generic.movementSpeed"}, {Base: 0.0d, Name: "generic.armor"}, {Base: 0.0d, Name: "generic.armorToughness"}, {Base: 16.0d, Name: "generic.followRange"}, {Base: 0.0d, Name: "generic.attackKnockback"}, {Base: 0.6000000238418579d, Name: "generic.flyingSpeed"}, {Base: 2.0d, Name: "generic.attackDamage"}], Invulnerable: 0b, FallFlying: 0b, ForcedAge: 0, PortalCooldown: 0, AbsorptionAmount: 0.0f, FallDistance: 0.0f, InLove: 0, DeathTime: 0s, HandDropChances: [0.085f, 0.085f], CannotEnterHiveTicks: 0, PersistenceRequired: 0b, Age: 0, TicksSincePollination: 33872, Anger: 0, Motion: [0.0d, 0.0d, 0.0d], Health: 8.0f, HurtBy: "512419b6-e5d9-422b-a13f-98444e576e38", HasNectar: 0b, LeftHanded: 0b, Air: 300s, OnGround: 0b, Rotation: [20.729439f, 0.0f], HandItems: [{}, {}], ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], Fire: -1s, ArmorItems: [{}, {}, {}, {}], CropsGrownSincePollination: 0, CanPickUpLoot: 0b, HurtTime: 0s, HivePos: {X: 0, Y: 0, Z: 0}}
How do u copy the command output? I got the same behaviour on a bee and want to help 🙂
I couldn't copy it from chat or a command block output, but if you look at the bee and press F3 + i you'll copy the exact same data to the clipboard 🙂
Thanks 😃 Here is my bee
{NoGravity: 1b, Brain: {memories: {}}, HurtByTimestamp: 0, FlowerPos: {X: 0, Y: 0, Z: 0}, HasStung: 0b, Attributes: [{Base: 10.0d, Name: "generic.maxHealth"}, {Base: 0.0d, Name: "generic.knockbackResistance"}, {Base: 0.30000001192092896d, Name: "generic.movementSpeed"}, {Base: 0.0d, Name: "generic.armor"}, {Base: 0.0d, Name: "generic.armorToughness"}, {Base: 16.0d, Modifiers: [{UUIDMost: 2153429020781006355L, UUIDLeast: -8744511316061402533L, Amount: 0.011939049796697743d, Operation: 1, Name: "Random spawn bonus"}], Name: "generic.followRange"}, {Base: 0.0d, Name: "generic.attackKnockback"}, {Base: 0.6000000238418579d, Name: "generic.flyingSpeed"}, {Base: 2.0d, Name: "generic.attackDamage"}], Invulnerable: 0b, FallFlying: 0b, ForcedAge: 0, PortalCooldown: 0, AbsorptionAmount: 0.0f, FallDistance: 0.0f, InLove: 0, DeathTime: 0s, HandDropChances: [0.085f, 0.085f], CannotEnterHiveTicks: 0, PersistenceRequired: 0b, Age: 0, TicksSincePollination: 27613, Anger: 0, Motion: [0.0d, 0.0d, 0.0d], Health: 10.0f, HurtBy: "", HasNectar: 0b, LeftHanded: 0b, Air: 300s, OnGround: 0b, Rotation: [324.48358f, 0.0f], HandItems: [{}, {}], ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], Fire: -1s, ArmorItems: [{}, {}, {}, {}], CropsGrownSincePollination: 0, CanPickUpLoot: 0b, HurtTime: 0s, HivePos: {X: 149, Y: 65, Z: -405}}
Tbh I compared it with a normal functional bee and there is no difference at all
Thanks a lot!
I couldn't copy it from chat or a command block output, but if you look at the bee and press F3 + i you'll copy the exact same data to the clipboard
Completely forgot that that exists as well. That's a much easier method!
I noticed that with Peter's bee, the flower position and the hive position are both at 0 / 0 / 0, which the bee probably has trouble pathfinding to. For the David's bee, only the flower position is 0 / 0 / 0, and it's probably currently trying to get to that flower. That might be the cause.
Can confirm; this happened to a few of my bees after testing MC-159418.

2 of my bees had this issue. heres their data
i tried to summon it at these locations and it did the same thing again. I believe it may be based on that
/summon minecraft:bee 19770.97 90.81 20187.44 {NoGravity: 1b, Brain: {memories: {}}, HurtByTimestamp: 0, FlowerPos: {X: 19737, Y: 68, Z: 20208}, HasStung: 0b, Attributes: [{Base: 10.0d, Name: "generic.maxHealth"}, {Base: 0.0d, Name: "generic.knockbackResistance"}, {Base: 0.30000001192092896d, Name: "generic.movementSpeed"}, {Base: 0.0d, Name: "generic.armor"}, {Base: 0.0d, Name: "generic.armorToughness"}, {Base: 16.0d, Modifiers: [{UUIDMost: -5094849852239887970L, UUIDLeast: -8046747775998917280L, Amount: -0.15949128254100747d, Operation: 1, Name: "Random spawn bonus"}], Name: "generic.followRange"}, {Base: 0.0d, Name: "generic.attackKnockback"}, {Base: 0.6000000238418579d, Name: "generic.flyingSpeed"}, {Base: 2.0d, Name: "generic.attackDamage"}], Invulnerable: 0b, FallFlying: 0b, ForcedAge: 0, LoveCauseLeast: -8562011397477746349L, PortalCooldown: 0, AbsorptionAmount: 0.0f, FallDistance: 0.0f, InLove: 0, DeathTime: 0s, HandDropChances: [0.085f, 0.085f], CannotEnterHiveTicks: 0, PersistenceRequired: 0b, Age: 0, TicksSincePollination: 1913, Anger: 0, Motion: [0.0d, 0.0d, 0.0d], Health: 10.0f, HurtBy: "", HasNectar: 1b, LeftHanded: 0b, Air: 300s, OnGround: 0b, LoveCauseMost: -6112541712436606294L, Rotation: [108.81909f, 0.0f], HandItems: [{}, {}], ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], Fire: -1s, ArmorItems: [{}, {}, {}, {}], CropsGrownSincePollination: 0, CanPickUpLoot: 0b, HurtTime: 0s, HivePos: {X: 19770, Y: 76, Z: 20187}}
/summon minecraft:bee 19595.93 93.65 20452.34 {NoGravity: 1b, Brain: {memories: {}}, HurtByTimestamp: 0, FlowerPos: {X: 0, Y: 0, Z: 0}, HasStung: 0b, Attributes: [{Base: 10.0d, Name: "generic.maxHealth"}, {Base: 0.0d, Name: "generic.knockbackResistance"}, {Base: 0.30000001192092896d, Name: "generic.movementSpeed"}, {Base: 0.0d, Name: "generic.armor"}, {Base: 0.0d, Name: "generic.armorToughness"}, {Base: 16.0d, Name: "generic.followRange"}, {Base: 0.0d, Name: "generic.attackKnockback"}, {Base: 0.6000000238418579d, Name: "generic.flyingSpeed"}, {Base: 2.0d, Name: "generic.attackDamage"}], Invulnerable: 0b, FallFlying: 0b, ForcedAge: 0, PortalCooldown: 0, AbsorptionAmount: 0.0f, FallDistance: 0.0f, InLove: 0, DeathTime: 0s, HandDropChances: [0.085f, 0.085f], CannotEnterHiveTicks: 0, PersistenceRequired: 0b, Age: 0, TicksSincePollination: 48161, Anger: 0, Motion: [0.0d, 0.0d, 0.0d], Health: 10.0f, HurtBy: "", HasNectar: 0b, LeftHanded: 0b, Air: 300s, OnGround: 0b, Rotation: [286.20593f, 0.0f], HandItems: [{}, {}], ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], Fire: -1s, ArmorItems: [{}, {}, {}, {}], CropsGrownSincePollination: 0, CanPickUpLoot: 0b, HurtTime: 0s, HivePos: {X: 19678, Y: 71, Z: 20490}}
I have encountered the same behavior. When moving away from certain bees, they stop moving when I get about 10 blocks away for more than a few seconds (how long is hard to measure with in-game tools, sorry). Their wings flap briefly, before freezing as well. This seems to happen to all bees which have been in contact with hives, nests, flowers, and have been bred by the player, however I haven't yet seen it happen with newly spawned bees from a spawn egg.
Contact with any other entity (including other un-frozen bees) makes them resume moving briefly, before freezing again as before. Going within 10 blocks of bees in this frozen state with a flower in either hand makes them resume normal behavior as well.
Here is entity data from bees in each state:
bee while fully frozen:
/summon minecraft:bee -44.82 131.80 241.99 {NoGravity: 1b, Brain: {memories: {}}, HurtByTimestamp: 0, FlowerPos: {X: -39, Y: 84, Z: 242}, HasStung: 0b, Attributes: [{Base: 10.0d, Name: "generic.maxHealth"}, {Base: 0.0d, Name: "generic.knockbackResistance"}, {Base: 0.30000001192092896d, Name: "generic.movementSpeed"}, {Base: 0.0d, Name: "generic.armor"}, {Base: 0.0d, Name: "generic.armorToughness"}, {Base: 16.0d, Modifiers: [{UUIDMost: -7230590118419873231L, UUIDLeast: -8771545964165856279L, Amount: -0.057467406681150024d, Operation: 1, Name: "Random spawn bonus"}], Name: "generic.followRange"}, {Base: 0.0d, Name: "generic.attackKnockback"}, {Base: 0.6000000238418579d, Name: "generic.flyingSpeed"}, {Base: 2.0d, Name: "generic.attackDamage"}], Invulnerable: 0b, FallFlying: 0b, ForcedAge: 0, LoveCauseLeast: -8619228188265336982L, PortalCooldown: 0, AbsorptionAmount: 0.0f, FallDistance: 0.0f, InLove: 0, DeathTime: 0s, HandDropChances: [0.085f, 0.085f], CannotEnterHiveTicks: 0, PersistenceRequired: 0b, Age: 0, TicksSincePollination: 13314, Anger: 0, Motion: [0.0d, 0.0d, 0.0d], Health: 10.0f, HurtBy: "", HasNectar: 0b, LeftHanded: 0b, Air: 300s, OnGround: 0b, LoveCauseMost: 3707801596262960063L, Rotation: [277.48062f, 0.0f], HandItems: [{}, {}], ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], Fire: -1s, ArmorItems: [{}, {}, {}, {}], CropsGrownSincePollination: 0, CanPickUpLoot: 0b, HurtTime: 0s, HivePos: {X: -30, Y: 81, Z: 243}}
bee unfrozen by proximity to flower:
/summon minecraft:bee -45.97 127.70 242.70 {NoGravity: 1b, Brain: {memories: {}}, HurtByTimestamp: 0, FlowerPos: {X: -39, Y: 84, Z: 242}, HasStung: 0b, Attributes: [{Base: 10.0d, Name: "generic.maxHealth"}, {Base: 0.0d, Name: "generic.knockbackResistance"}, {Base: 0.30000001192092896d, Name: "generic.movementSpeed"}, {Base: 0.0d, Name: "generic.armor"}, {Base: 0.0d, Name: "generic.armorToughness"}, {Base: 16.0d, Modifiers: [{UUIDMost: -7230590118419873231L, UUIDLeast: -8771545964165856279L, Amount: -0.057467406681150024d, Operation: 1, Name: "Random spawn bonus"}], Name: "generic.followRange"}, {Base: 0.0d, Name: "generic.attackKnockback"}, {Base: 0.6000000238418579d, Name: "generic.flyingSpeed"}, {Base: 2.0d, Name: "generic.attackDamage"}], Invulnerable: 0b, FallFlying: 0b, ForcedAge: 0, LoveCauseLeast: -8619228188265336982L, PortalCooldown: 0, AbsorptionAmount: 0.0f, FallDistance: 0.0f, InLove: 0, DeathTime: 0s, HandDropChances: [0.085f, 0.085f], CannotEnterHiveTicks: 0, PersistenceRequired: 0b, Age: 0, TicksSincePollination: 13848, Anger: 0, Motion: [-0.06521457611299691d, -0.006764298418545248d, 0.07642133858908207d], Health: 10.0f, HurtBy: "", HasNectar: 0b, LeftHanded: 0b, Air: 300s, OnGround: 0b, LoveCauseMost: 3707801596262960063L, Rotation: [285.60947f, -10.880027f], HandItems: [{}, {}], ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], Fire: -1s, ArmorItems: [{}, {}, {}, {}], CropsGrownSincePollination: 0, CanPickUpLoot: 0b, HurtTime: 0s, HivePos: {X: -30, Y: 81, Z: 243}}
a normal bee straight from a spawn egg which does not seem to be affected by this issue:
/summon minecraft:bee 35.85 84.15 242.72 {NoGravity: 1b, Brain: {memories: {}}, HurtByTimestamp: 0, FlowerPos: {X: 0, Y: 0, Z: 0}, HasStung: 0b, Attributes: [{Base: 10.0d, Name: "generic.maxHealth"}, {Base: 0.0d, Name: "generic.knockbackResistance"}, {Base: 0.30000001192092896d, Name: "generic.movementSpeed"}, {Base: 0.0d, Name: "generic.armor"}, {Base: 0.0d, Name: "generic.armorToughness"}, {Base: 16.0d, Modifiers: [{UUIDMost: -8403298993994316057L, UUIDLeast: -7859490514782730486L, Amount: -0.05443785083886528d, Operation: 1, Name: "Random spawn bonus"}], Name: "generic.followRange"}, {Base: 0.0d, Name: "generic.attackKnockback"}, {Base: 0.6000000238418579d, Name: "generic.flyingSpeed"}, {Base: 2.0d, Name: "generic.attackDamage"}], Invulnerable: 0b, FallFlying: 0b, ForcedAge: 0, PortalCooldown: 0, AbsorptionAmount: 0.0f, FallDistance: 0.0f, InLove: 0, DeathTime: 0s, HandDropChances: [0.085f, 0.085f], CannotEnterHiveTicks: 0, PersistenceRequired: 0b, Age: 0, TicksSincePollination: 394, Anger: 0, Motion: [0.0d, -0.004550229403953999d, 0.0d], Health: 10.0f, HurtBy: "", HasNectar: 0b, LeftHanded: 0b, Air: 300s, OnGround: 0b, Rotation: [318.75836f, -16.643373f], HandItems: [{}, {}], ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], Fire: -1s, ArmorItems: [{}, {}, {}, {}], CropsGrownSincePollination: 0, CanPickUpLoot: 0b, HurtTime: 0s, HivePos: {X: 0, Y: 0, Z: 0}}
Hope this helps, and if I have time I will set up more thorough test cases and try to help isolate a cause.
It seems to me as if this happens when a bee is searching for new flowers or a new hive, and as a result flies high up into the sky. At some height above the ground, the pathfinding algorithm appears to fail, causing the bee to freeze.
When teleporting all bees that are up in the sky to the ground, they seem to start working properly again.
The fact that the bee doesn't play any flying animation while standing still is now covered in this ticket: MC-159518
I've changed the ticket up in order to include all of my new findings. If anyone has more information, please post a comment, that would be very appreciated!
Edit: I found out that this happens if the bee has not pollinated a flower for a while and tries to return to its home hive, but doesn't have a home hive yet. Included that in the ticket. Sorry for the updates everyone! But I believe I've found the exact cause now.
I have found really similar bug. Bees ( both with and without pollen) can fly below y = 0 and sit in the void.
I suggest making it impossible for bees to fly below y = 0 by editing bee PathNavigator or AI;
[media][media]https://bugs.mojang.com/browse/MC-159769?focusedCommentId=578283&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-578283
I've rewritten this ticket again in order to include all cases in which this occurs.

While this is most likely a valid bug (still have to repro for myself), no mobs use AI below y=0. Do not use a void world as a testing ground because this is an invalid test case.
The repro steps I provided in the description should work in any default world.
Cannot reproduce in 19w38b. Assuming fixed?
I just updated my main world to the most recent Snapshot (19w38b) and have found that this issue has not been resolved. Before I updated, this had never happened but now my bees keep freezing. I’ve had two freeze high in the air and one freeze under a tree. I did fix one by hitting it and getting it to follow me. But it’s strange how this would only begin occurring with the latest update.

Can confirm for 19w39a

I can confirm that this happens in 19w39a. I have managed to breed a lot of bees and at one point, the bee wanders too far from their hive that they'll either wander aimlessly or if high enough it just freezes mid-air.
[media]it still happens in 19w39a

Confirmed for 19w40a
aaaand 19w41
@unknown, 19w41a is already marked as affected.

I still cannot reproduce given the steps provided - a world save would be extremely helpful in bringing me closer to solving this. One note - AI stops functioning below y=0 and acts weird above y = 255. I see one example posted is between those values, but most of the examples given are about bees going above or below the world height limits, which is not really a valid use case / test case.
I've attached a world I used to reproduce this issue to this ticket. Also, I recorded a short video of this issue, which you can watch here: https://youtu.be/ZpfFTlzL7Co
As you can see, the bee is never above 255 or below 0, but the void world was just used as a case to demonstrate that this happens whenever a bee doesn't find its target for a while. This should work in a regular world without any flowers and without any bee hives as well.
Can confirm this happens below y = 255, this behavior tends to be triggered frequently after a bee leaves their home unexpectedly (Ex. taking the honey or honeycombs from the hives/nests), but this can still happen in both ways (Naturally without any provocation or due to the explanation I gave previously)
Basically instead of aim towards a flower they begin to fly very high till the point is impossible for them to track a flower due to the pathfinding limitations, that's why this bug gets reproduced in most cases by a bee without pollen, can confirm too this is not the case if a bee already has pollen + is far away from the home, they can track their home back from a decent amount of far blocks.
[media]

Thanks for the info and world save, that really helped in tracking this down!
Can you run
/data get entity @e[type=bee,distance=..5,limit=1]
while near the bee and post the result here?