mojira.dev
MC-166135

Bees inside a nest/hive don't grow up or get their breeding timer reset

The bug

Baby bees will not make any progress towards growing up, and adult bees will not get their breeding timer reset, when they're inside a nest or hive. This causes bees to take about a whole day to be able to breed, and baby bees can take hours to grow up. It not only makes this breeding/growth process take a ridiculously long time, but it also makes it more random and less consistent.

Linked issues

Comments 14

Suggested fix:

  • When a bee has finished working in a hive or nest, subtract a constant amount of time from the breeding cooldown or growth timer equal to the minimum time spent working. This takes into account the possibility of nest relocation.

This is an issue that I am experiencing as well

I am experiencing this also, or at least my baby bees aren't growing up.

This is happening for me in the release version of 1.15.

One thing that seems to help with growing and breeding cool down is preventing the bees from going back to their nests during the day by running around holding flowers in the main hand...they follow that instead of going back to their hive.

It may just be co-incidence.

I'm more concerned by the bees apparent ability to fly through trap doors after trying for a while.

This also affects 1.15.2

4 more comments

Not so hard to fix I would think.

When a bee is inside a nest it gets this thing called 'TicksInHive', that goes from 0 to 'MinOccupationTicks' (defaults to 2400). So when a bee is coming out of the nest there should bee an operation like:

if AgeOld > 0: AgeNow = max(0, AgeOld - TicksInHive);  # for breeding cooldown
else if AgeOld < 0: AgeNow = min(0, AgeOld + TicksInHive);  # for baby growth
# if AgeOld = 0 nothing happens
# make sure that if a baby bee gets Age 0 by this operation, it turns into adult

So you have a method called emptyAllLivingFromHive, that uses releaseAllOccupants, that uses releaseOccupant.

Also you have a method called tickOccupants, that uses releaseOccupant directly.

releaseAllOccupants and tickOccupants should pass the parameter ticksInHive to releaseOccupant, and let that last method do the Age adjustment.

Thinking about it, ticksInHive stops counting when reaches MinOccupationTicks (+1, because of a <=), so if bees stay longer than MinOccupationTicks inside the nest for any reason, they wouldn't grow the amount they should. To fix this, ticksInHive has to keep increasing regardless of whether it surpasses MinOccupationTicks.

 

This was not fixed, but broken in another way: MC-186335

 

gaspoweredpick

coschevi

Community Consensus

Important

Mob behaviour

1.15 Pre-release 1, 1.15 Pre-Release 2, 1.15.1, 1.15.2, 20w11a, 20w12a, 20w18a, 20w19a

20w22a

Retrieved