Additional Context cloned from MC-303391:
From Me:
@OP and I were both tracking this problem:
If the Biome / Level in question does not have Skylight the same problem happens; such as if World Spawn is in the Nether; or the Level is set to not have Skylight access.
A quick fix would be to forceload the spawn chunk (legacy behavior); or Overwrite the World Spawn selector to make it equal to the correct world spawn.
From Bread:
More context, from searching in code i tracked down to PlayerSpawnFinder::findSpawn(ServerLevel, BlockPos)
the very first if condition checks if the biome has skylight, or if the server gamemode is not adventure and if that is true follows through using a method that will issue chunk loading tickets, but the secondary path instantly resolves the spawn location, and the chunks may not be loaded yet allowing this bug to happen
A quick fix would be to forceload the spawn chunk (legacy behavior); or Overwrite the World Spawn selector to make it equal to the correct world spawn.
Added Context; @OP and I were both tracking this problem:
If the Biome / Level in question does not have Skylight the same problem happens; such as if World Spawn is in the Nether; or the Level is set to not have Skylight access.
This Bug can be easily fixed by Mojang by simply adding a en_us.json entry named death.fell.accident.water – Maybe make it a funny message like Player failed to land gently in water
?
This missing lang file entry is highlighted in Joe Hills' YouTube video as of today, existing under 1.21.5
Obviously, based on various Player experiences; it's always a valid question how much of this is intended behavior or not...
So with my testing for going towards an hour creating worlds ... I assume that you can place this under 1.21.3/4 as well with my results.
The question would be if you guys feel that this is something you want to look into.
So after creating a whole bunch of worlds just by simply clicking on "New World" like 50 times; I'd say there were maybe 2 that would fit this criteria, and a few that were more cheeky like spawning on top of Jungle trees. Spawning on top of an Oak tree or a Spruce tree; or on a small edge of a small (low) cliff ain't so bad... but when you are around 200 blocks up ... It can be a problem. Will attach screen shots of the 3 questionable spawn locations using 1.21.4.
I'd say, your at around 25% top of tree world spawns, and maybe 5-10% sides of cliffs or mountains out of 50-100 new worlds. Out of those, there might be 2-3 questionable / dangerous world spawn locations. (And a few that were just bizarre, ha)
I believe the world spawning at 0, 0, 0 and suffocating in walls might have been a 1.20.4 bug.
I haven't needed to create lots of new worlds in recent snapshots; but I can go and create a bunch under 1.21.4 and seeing if I can get any additional seeds with "Problematic" world spawns.
Of course I've searched first, but apparently the other ticket I did not find first before entering this. 😛
It'll be awhile before I can try to reproduce it; so that's why I reported so someone else, who has more time on their hands can attempt it under Vanilla.
It was a recording from a Server Member, as I do not have time to personally test it under Vanilla conditions.
Hopefully a community member can test this; as I have disabled a few mods thus far.
Just to be clear about this problem report, the criteria would be if the world spawn location causes a situation where, you as the player, will die without any user input, or take a single step, and potentially die; or even spawn at very dangerous locations that makes no sense for the "I'm just starting to play the game" type of situation; such as on a single block, overlooking a steep alcove, with no other blocks below you; and you as the player, having no tools or blocks yet has literary no way to correct your situation.
The examples attached are good issues, and are adjacent to the problem, of course.
My thoughts are that the Player's world spawn should be on solid ground, with a clearance of around 10-25 blocks surrounding them of more solid ground of at least 5 blocks deep; and not being in a cave; or stuck INSIDE of a wall at 0 0 0, or spawning in mid air/ on Jungle tree's and instantly fall to your death.
I am adding another example of a brand New World setting the world spawn to 0, 0, 0 causing the player to get stuck in the ground and die upon initial world creation.
Using 1.20.4
Seed -3543847026175545133
The world where I had the problem, was a world where I was testing a MOD that I was working on, and has existed through most of the 1.20.5 snapshot cycle (Since at least like 24w04a or 10a), and it was being tested upon under 1.20.6 prior to this happening.
Also, I was not able to reproduce the issue in the same world with another shulker box.
The Shulker Box in question may have existed under the RC releases, or 1.20.5 prior, and it was different, because it was placed on the ground in between a few upgrades.
... Speaking of which, I should "probably" try to trace that exact procedure, and take F3+I on the block under 1.20.5-pre and 1.20.5-rc, and after under 1.20.6, before hitting 24w19b with it, and storing a copy in a chest for a "control" object.
The other player didn't offer specifics, but they said that they lost a shulker of Diamonds in their Survival world.
Also for context, I can't prove it, but I had another person say they had the same problem recently.
Nope, I went back to the same world and tried to reproduce and could not.
Strange and now I can't reproduce it. I do not understand why, because it did happen, and I'm not going crazy though, and no, the box was NOT on the ground.
Additional context:
The problem happens when the Chunk is not pre-loaded during the spawn attempt because it cannot resolve that the Spawn Location has solid ground using the heightmap calculations; since the Chunk is not yet loaded; so it sets the Y level to 0 then adds 1 .