mojira.dev
MC-236858

Seeds that spawn you in the middle of the ocean cause lag

If you spawn in the middle of the ocean, the game will lag significantly more than spawning on land. Below is a jfr report made right after first entering a world using the seed -627081940333231321.

Steps to reproduce: 

  1. Restart Minecraft

  2. Create a new world with the seed -627081940333231321 (which spawns you in the middle of the ocean)

  3. Notice that the game is a bit slower than usual

Linked issues

Attachments

Comments 6

I think this is a combination of MC-236682 & MC-236828 correct me if I'm wrong though

Spawning in the middle of the ocean via MC-142883 didn't used to cause significant performance issues, and this isn't MC-236682 either because the performance drops can happen right after you launch Minecraft.

I have a seed that spawns you in the middle of a Deep Ocean with the nearest land about 400 blocks away.

Seed: -3985998861042604783

I can confirm that when I first generated the world it seemed slow to load. I'm guessing this is because the game was searching for a 'safe' biome to place the world spawn and was finding none. Eventually it gives up and drops you in the middle of the ocean in chunk 0,0. Not an ideal start location.

In 1.17 this issue was dealt with by adding small island sub-biomes in the deep oceans (forests or plains) for the player to spawn on, but currently it looks like those don't generate in the 1.18 snapshots, so it ends up searching for an appropriate start biome for a while and then fails.

 

Is this still a concern in the latest snapshots?

Hi, yes, this issue is still present in 21w44a. The easiest method of reproducing this would be to create a superflat world with the "Water World" preset and take note of how the game runs noticeably slower than usual. The "Water World" preset is guaranteed to spawn you in the middle of the ocean thus making reproduction much more efficient.

Below I've attached two JFR reports, two performance profiles, and two videos that demonstrate the difference in behavior when creating and first loading into a superflat "Water World" and a superflat "Desert World". Hopefully this helps in determining what the cause of this issue is. 🙂

[media]

 

[media][media]

 

[media][media]

 

[media]

gaspoweredpick

Fry

Confirmed

Important

Performance

21w37a, 21w38a, 21w39a, 21w40a, 21w44a

1.18 Pre-release 2

Retrieved