The bug
When creating a (flat) world with min_y greater than 0, the player spawns inside blocks (at the lower layers of the world), rather than on the surface.
How to reproduce
Select Singleplayer → Create New World → More World Options... → Import Settings
Import the
file
Select Create New World
→ ❌ The player is spawned inside the ground, rather than on the surface of the world
I've done a code analysis for one of my issues (MC-217802) using the mojang obfusication maps:
This hardcoding of getMinBuildHeight() and getHeight() results in this bug