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
Create a new world (superflat, cheats on)
Execute command: /fill ~20 ~200 ~-20 ~-20 ~200 ~20 stone
Teleport yourself up to the platform. (/tp @a ~ ~205 ~)
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)
Just place the piston so it pulls the block over the hole.
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
Linked issues
is duplicated by 18
Attachments
Comments 27
Please force a crash by pressing F3 + C for 10 seconds while ingame and attach the crash report here.
In vanilla, I made a piston that would extend and rectract on an uncovered block. The lag was horrendous. I got down to 0 fps before the F3+C worked. I can upload the world if you want me to.
change "fill ~20 ~200 ~-20 ~-20 ~200 ~20" to "/fill ~20 240 ~-20 ~-20 240 ~20"
and "/tp @a ~ ~205 ~" to "/tp @p ~ 250 ~"
If the stone platform is at y=200
and is 57 or more blocks across (square)
and all blocks under the platform is air
X=29 (Distance of Light spread from center) Y=200 (Height of platform)
Breaking the block in the middle will produce .5(X^2+1)Y+1 = 84200 (84k) skylight updates
X=15 (Sky Light level) Y=200 (Height of platform)
Replacing the block will produce Y((X^2+2)X^2/3)+X = 3405015 (3405k, 3.4million) skylight updates
Oh and redstone dust does NOT produce light updates (they cause block updates)
Repeaters used to in 1.5.2 but that got removed due to lag
Also, root.tick.keyboard lags when you break the block.