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

Details

    • Bug
    • Status: Open
    • Resolution: Unresolved
    • 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
    • None
    • None
    • Confirmed
    • Performance, UI
    • Important

    Description

      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). 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              KennyTV Nassim Jahnke
              Votes:
              27 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                CHK: