-
Bug
-
Resolution: Fixed
-
1.16.20, 1.16.40 Hotfix, 1.16.200, 1.17.2 Hotfix, 1.17.40
-
None
-
Confirmed
-
Multiple
-
424456
Based on this report and duplicate report MCPE-86843, villagers display the following problems when a world's Time exceeds 2^31, or 89,478 game-days. This would be equivalent to just under 3.5 real-world years of runtime if players never slept in-game; 1.75 years of runtime if they slept every night. Some 1-player sleep systems may cause this issue to occur sooner than it would otherwise.
- Will not sleep
- Will not wake up naturally (they can be woken by the player, but will try to sleep again)
- Will not refresh trades
- May not spawn iron golems
Original summary
Integer Overrun Error causes villagers not to restock.
When the Time goes over 2147471640 (approximate, probably 2,147,483,648=2^31), it becomes negative.
Once the time is negative, advancing days is applied inconsistently to other times and timers. In particular, villagers do not restock. Villagers would still not restock after breaking and re-placing their workstations, which is what led me to discover this bug.
This can be fixed by setting the time to 0 if it is negative.
This occurred on a realm, so I reproduced it using command blocks for this bug report.
- is duplicated by
-
MCPE-77479 Villagers will not sleep or use their work stations
- Resolved
-
MCPE-86843 Villagers either don't sleep or don't wake up
- Resolved
-
MCPE-110678 villagers not restocking deals
- Resolved
-
REALMS-1841 (Many) villagers ignoring bell chime, profession blocks, night time, and beds.
- Resolved
-
REALMS-3775 Villagers stopped sleeping and restocking
- Resolved
-
REALMS-5324 Villagers refuse to work and sleep
- Resolved
- relates to
-
BDS-16707 Time still passes with no players connected
- Resolved
-
MCPE-103197 "/time add" command returns "the number you entered is too small"
- Resolved