mojira.dev
MC-136549

Skylight / light updates FPS lag

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.

      • IF YOU DONT HAVE A GOOD PC, YOUR GAME WILL CRASH *** 

 

Code analysis

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

 

The reason for this is that in the method

net.minecraft.world.chunk.setBlockState(BlockPos, IBlockState),

In this method you have this piece of code: this.relightBlock(i, j + 1, k);

If you remove the '+ 1' the issue is fixed. (line: 657)

^ I'll attach a video with the '+ 1' and without the '+ 1'.

 

Related issues

Attachments

Comments

migrated
[media][media][media]
migrated

Sounds like MC-11571.

migrated

Duplicate of MC-11571, please resolve and copy my description there. thanks

migrated

(Unassigned)

Unconfirmed

Minecraft 1.13.1

Retrieved