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
Go up to a bugged Villager, and do a F3 + I and paste the output to a Text File, then upload it here.
See: https://bugs.mojang.com/browse/MC-269191
Maybe it could be that the " EmptyItemInVillagerTradeFix " Was not applied when upgrading your world ?
Some context: I believe this is happening since Shulker Bullets are unique as having the "No Clip" tag set, and the behavior isn't exactly defined to deflect a no clip projectile... Even though the Breeze is coded to deflect everything except it's own projectile and a player thrown Wind Charge; this includes Dragon Spit, Wither Skulls, and Shulker Bullets ... Which behave very oddly when directed at the Breeze, and seem to defy physics.
It seems to use a semi-random Yaw, and sets the velocity to a flat * -(0.5), in other words, halves and negates all incoming velocity.
If you want a laugh, and a head scratcher, go ahead and try it.
Slowly moving Dragon Spit and Wither Skulls to the stars, anyone? It's only Shulker Bullets that behave slightly different, and I heard jokes / rumors about Llama spit...
Ah, I was wondering where these items with (NBT+) Lore Tag were coming from under Vanilla. I was aware of the Ctrl+Pick Block, but I was trying to figure out which items do this.
Looks good using the "EmptyItemInVillagerTradeFix" and it works ideally moving forward;
But I also wanted to mention that the "matchesBuyItems() under "TradeOffer" was the main culprit, where the
"!this.secondBuyItem.isPresent()" logic should have been inverted and tested for this.secondBuyItem.get().match(ItemStack.EMPTY) as well, because reading in the
"Optional<TradedItem>this.secondBuyItem" does not check for minecraft:air, it only checks for the presence of data, which lead to this bug since 1.20.4 and below writes minecraft:air to any "Empty" trade slots.
👍
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 .