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

Huge lighting updates lag the game.


    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 18w43a
    • Minecraft 1.4.7, Snapshot 13w10b, Minecraft 1.5, Minecraft 1.8, Minecraft 1.8.1-pre2, Minecraft 1.8.1, Minecraft 1.8.2-pre4, Minecraft 1.8.8, Minecraft 15w44b, Minecraft 15w46a, Minecraft 1.8.9, Minecraft 15w51b, Minecraft 1.9.2, Minecraft 1.9.4, Minecraft 1.10.2, Minecraft 1.11.2, Minecraft 1.12 Pre-Release 6, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2, Minecraft 18w05a, Minecraft 18w09a, Minecraft 1.13, Minecraft 18w30b, Minecraft 1.13.1, Minecraft 1.13.2-pre1, Minecraft 1.13.2-pre2, Minecraft 1.13.2
    • Confirmed
    • Survival

       The bug

      This bug causes alot of light updates, dropping your FPS to 0 and most likely crashing your game.

      This has been used for around a year now on several servers, this causes players to crash their game.

      How to reproduce

      1. Create a new world (superflat, cheats on)
      2. Execute command: /fill ~20 ~200 ~-20 ~-20 ~200 ~20 stone
      3. Teleport yourself up to the platform. (/tp @a ~ ~205 ~)
      4. Place 2 observers facing into each other, make a hole 1 block away from the observer. (See screenshot for setup. the observers is to make a repeating redstone clock)
      5. Just place the piston so it pulls the block over the hole.
      6. Prepare yourself to see your FPS drop to 0.

      Code analysis

      The following is based on a decompiled version of Minecraft 1.12 using MCP940.

      In the method net.minecraft.world.chunk.setBlockState() you have this~~

      if (j >= i1)
      this.relightBlock(i, j + 1, k);

      which relight blocks, but this is causing the massive FPS drops. What this does is, if j (posY) is bigger then i1, it will relight the block on the X, Y + 1, Z the player is.

      If you remove the '+ 1' this issue will be fixed. idk why though.

      if (j >= i1) 
      this.relightBlock(i, j, k); 


      When making a Creative world with bedrock at the bottom, air for most, and bedrock at the top, when you break the bedrock the game lags for about 7 seconds.

      Example superflat preset: 3;minecraft:bedrock,250*minecraft:air,minecraft:bedrock;1;

      I made a program that will take the "Something's taking too long!" messages and put it in a list. In the attached list, you can see that root.tick.level.connection is taking a VERY long time.

      I hope this gets fixed soon, because it can be a huge exploit on servers.

      ^ original report


        1. 2018-08-29_04.15.51.png
          181 kB
        2. 2018-08-29_04.18.00.png
          540 kB
        3. crash-2013-03-11_17.26.29-client.txt
          3 kB
        4. Debug-test-15w51b.zip
          799 kB
        5. decoded.log
          6 kB
        6. LightBug.zip
          134 kB
        7. MC-136549.mp4
          7.61 MB
        8. screenshot-1.png
          265 kB

            fry [Mojang] Georgii Gavrichev
            Oval Oval
            48 Vote for this issue
            26 Start watching this issue