Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-98361

Villagers stop working and sleeping in worlds a few years old

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.18.0.22 Beta, 1.18.0
    • 1.16.20, 1.16.40 Hotfix, 1.16.200, 1.17.2 Hotfix, 1.17.40
    • None
    • Confirmed
    • Multiple
    • 424456

      Update by GoldenHelmet

      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.

      See:

      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.

      See: IntegerOverrunErrorBugReport.mcworld

            Onehoop Matt Smith
            Votes:
            18 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: