-
Bug
-
Resolution: Fixed
-
20w22a
-
Confirmed
-
Mob behaviour
-
Important
When a bee exits a hive/nest, its new age is calculated something like:
new_age = old_age + TicksInHive * 20;
if (new_age > 0){new_age = 0;}
That makes bees grow 20 times faster than it should when are babies, and always set adult bees age (breeding cooldown) to 0.
video: https://www.youtube.com/watch?v=73KonEmlZ9M
20w22a code:
It seems that ageUp() input has to be some sort of time in seconds rather than ticks to work properly, but just that doesn't solve the bug for adult bees.
My fix proposal:
Almost forgot: ticksInHive stops counting when reaches MinOccupationTicks (+1, because of a <= or something), so if bees stay longer than MinOccupationTicks inside the nest for any reason (night, rain), they wouldn't grow the amount they should. To fix this, ticksInHive has to keep increasing regardless of whether it surpasses MinOccupationTicks, or just stop it when equals the bee's Age (-Age when its a baby/negative age).
Edit: seems it has been fixed already, great I'm a bit worried with my suggestion about ticksInHive stop counting when equals the bee's Age. When the Age value is less than MinOccupationTicks this can lead to bees getting stuck inside its hive, because ticksInHive not reaching MinOccupationTicks. The real limit for ticksInHive should be:
Math.max(MinOccupationTicks,Math.abs(old_Age))
(its weird having an InLove timer and an Age timer when both are the same thing, positive Ages and negative Ages. Just forget about InLove timer)
- relates to
-
MC-166135 Bees inside a nest/hive don't grow up or get their breeding timer reset
- Resolved