Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-249059

Loading terrain screen cannot close before 2 seconds have passed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 22w46a
    • 1.18.2, 22w15a, 22w16b, 22w18a, 22w19a, 1.19 Pre-release 1, 1.19 Pre-release 3, 1.19 Pre-release 4, 1.19, 1.19.1 Release Candidate 1, 1.19.1 Pre-release 4, 1.19.2
    • None
    • Confirmed
    • Performance, UI
    • Important

      The bug

      When joining a server or changing dimensions, the loading terrain screen will be no shorter than 2 seconds as per the first condition in the ReceivingLevelScreen tick, even if the world is already loaded with chunks sent and the one the client is in rendered.

      public void tick() {
          boolean var0 = this.oneTickSkipped || System.currentTimeMillis() > this.createdAt + 2000L;
          if (var0 && this.minecraft != null && this.minecraft.player != null) {
              // ...
              if (current chunk rendered) {
                 this.onClose();
              }
              if (has received setdefaultspawnpacket) {
                  this.oneTickSkipped = true;
              }
          } 

      with no other place where the oneTickSkipped field is set, so the onClose call is only reached if at least 2 seconds have passed since opening the screen.

      Just ripping the check out brings back visually falling through the ground on Vanilla servers on changing dimensions (not joining?), but imo just hard waiting 2 seconds is a rather disruptive way of hiding the problem. The underlying problem of that one seems to be the client predictively starting to fall before receiving chunk data while the loading screen is still open (only after that the server starts ticking an actual fall and puts the client at the proper position again). 

            Unassigned Unassigned
            KennyTV Nassim Jahnke
            Votes:
            29 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: