mojira.dev
MC-206978

Unlocking any Advancements after launching Minecraft causes lagspike

Steps to reproduce:
Create a world
Acquire a piece of Cobblestone to unlock the Stone Age advancement. (Can also allow cheats on world creation and run /give @s minecraft:cobblestone)
Experience a clientside lagspike.

What I expected to happen:
Expected to not have a lagspike once I unlocked the Stone Age advancement.

I tested this on 1.16.3 and 1.16.3 doesn't have this issue, furthermore 20w48a seems to be affected by this issue as well. Might be an issue regarding initializing advancements for the first time since game launch because unlocking an Advancement, getting the lagspike then unlocking a different advancement or creating another world and unlocking the Stone Age Advancement again doesn't cause any lagspike. Have not tested this on a server.

Attached a video just now. Here I create a new world and open up the F3 menu to show my FPS at the top left. Then proceed to give myself a piece of cobblestone. Right as I get it, FPS goes down all the way down from 70 to 66 then 39.

Attachments

Comments 8

Looked a bit more into this issue and found out that giving yourself an item that doesn't necessarily unlock an Advancement but unlocks more recipes also causes this issue. For example, a rabbit hide, which unlocks the recipe for crafting leather using 4 rabbit hides.

So this is most likely caused by recipes and not Advancements.

Yes, i have the same issue. My fps will completely drop to 0 when it happens, and it also happens in 1.16.4 and the cave update snapshot, but it won't happen a second time in the same world. Pretty annoying if you are attempting a speedrun.

I can confirm. Probably the easiest way to reproduce is to run /advancement to grant all advancements at once

Found that some simple commands like /setworldpsawn also causes lagspike. The issue seems to be very general and not just about unlocking advancements or crafting recipes.

Testing the /setworldspawn command in 1.16.3 doesn't cause any lagspike assuming the chunk the new world spawn is inside in is loaded. However in 1.16.4, the command causes a lagspike even if the new world spawn is to be set inside loaded chunks. The same goes for giving yourself items that unlock new recipes and/or advancements.

The issue only happens once, even if you re create the world you experienced this specific lagspike, you won't get the same lagspike unless you quit out of the game entirely and launch it again.

So the temporary workaround would be to have a separate world just for triggering this lagspike then you can continue your usual gameplay without encountering this issue. Of course you would do this every time you launch the game.

I am unable to reproduce this in 20w49a.

This issue seems to be specific to some systems. I updated the environment to Windows 10 Minecraft: Java Edition 1.16.4 AMD Ryzen 7 3700X 8 core 5 out of 16 GB of memory allocated NVIDIA GeForce GTX 1050 Ti Java version 1.8.0_271 (64-bit)

If anyone is affected or isn't affected by this issue, I encourage you to tell your system specs so if there is a pattern we can narrow down the problem much easier.

Allocating 5 GB of memory for Minecraft instead of the default of 2 GB isn't a problem I don't think because I tried it with the default 2 GB of memory allocated on the version 20w49a and the issue continued but I decided to put it into the environment section anyway. Going to attach a video of it soon with the alt + F3 menu open on the latest snapshot.

I am unable to reproduce this in 1.17-pre4.

Orkun

(Unassigned)

Community Consensus

(Unassigned)

advancement

1.16.4, 20w48a, 20w49a

Retrieved