The bug
When generating a buffet world that has the 'Cave' generation type and put a biome on it that has structures, they generate above the bedrock roof thus making them inaccessible without cheats.
Attachments
Comments
Affects 18w21a
The reason this happens is because the game searches from the top to the bottom of the world to find a surface to place the structure on, a way to fix this is to make it ignore bedrock as a valid surface only on cave buffet worlds.
Same problem with mineshaft, castles, end ship in different worlds with world generator "Buffer" with world type "Caves" and "Floating islands".
This has also been known to happen with bonus chests. See MC-135169
I just got another report of it yesterday on the minecraft discord
still an issue in pre-release 2
Some new structures generate through bedrock deleting it

I am not sure what the logical_height setting is on the dimension type, but it could be used to start checking for a surface block from that value down instead of searching from 256 down

The following spawns on top of the bedrock roof in cave worlds:
fortress
igloo
jungle_pyramid
mansion
ocean_ruin
pillager_outpost
ruined_portal
shipwreck
swamp_hut
village
There are exceptions:
buried_treasure - chest will spawn just below the bedrock ceiling
stronghold - does not spawn at all
All of this applies to both when minecraft:caves and mincraft:nether is used for world generation.
Confirmed in 1.16-pre5
Notes:
Desert temples appear to generate at an appropriate Y level
Ocean Monuments generate in the ocean (kind of. see attached)
Confirmed in 1.16-rc1.
The disappointing part of this bug is that prior to 20w21a, structures would mostly generate around the normal terrain Y level for that structure. However, when the new world gen features were introduced, it broke that.
The bonus chest is up there too. As of 1.16.3.
Can confirm in 21w05b.
I wish that this will not be fixed, since I need the villages when I am playing.
invalid cave types are no more

@unknown This report isn't invalid. Cave world types can still be accessed via datapacks.

So, this has been marked “won’t fix”, but I’m going to make suggestions for fixes anyway.
Maybe the best way to fix this would be some height arguments for structures, like a “min height” “max height” value to pick more acutely where it should be. Maybe it’s something where, when creating a structure, you can pick two generation types. One being whatever it does now where it just starts high and goes down to a valid spot, the second option being using the min and max that I proposed (you’d pick the type in the datapack).
Maybe logical height ties into this some how.
However, couldn’t bedrock just be made an invalid structure spawn location (maybe this could be in some tag so datapacks could change this if they want).
I may be speaking nonsense since I don’t really know much about this stuff, but I just recently started looking into making custom dimensions and this looks like it could be a problem down the line.
edit: what does the Nether do to stop structures from being on the bedrock roof? Is that hardcoded or can that just be done with other structures through datapacks?
An explanation as to why this won't be fixed would be nice. Was it solved in a different way? Was it fixed with with another ticket? Are we just out of luck?
Still an issue in 18w20a