The bug
The bonus chest generates above water despite there being solid ground with space above it around the water area.
How to reproduce
Possibly outdated
Using seed -9068686719535872623
in a swamp buffet world, the chest appears above water, despite there being plenty of land nearby.
Last checked: 1.16.2
World type: Default
Seed: 4091996699329202483
Last checked: 1.20 Release Candidate 1
World type: Default
Seed: -8450249545086940980
Related issues
is duplicated by
relates to
Attachments
Comments


This could be more serious if the chest generates over a large lava lake
Can confirm for MC 1.12.1.

Is this still an issue with the new block tag "valid_spawn"?
EDIT:
After creating 12 different worlds, appears to be fixed. On a Buffet world type with only the ocean biome, the bonus chest spawned on a non-submerged island. So I think its apparition is managed by "valid_spawn" block tag. @kumasasa

Still fixed

Issue's been that after the bonus chest is placed on valid land, a lake carves itself out beneath it. It may be that in the current 1.13 generator, bonus chests are placed after lakes, which would solve the issue. Someone could check that if they were so inclined.
Tried to reproduce it for 1.13.1 but nothing.
Likely still present in 1.13.1, but seed -9068686719535872623
no longer demonstrates this issue. If anyone can reproduce in the current version please provide a new seed and coordinates.
Still an issue in 19w14a. Also, I'm not sure the seed helps because, as far as I've seen in the past, the bonus chest's location is not based on the seed. However, it shouldn't be too hard to replicate because I got this on 5 consecutive new worlds with random seeds. It's not that the chest generates above lakes in particular but it generates in floating in air without any torches around it (probably because there are no valid locations for them—however, they don't appear as entities on the ground either).
Affects 19w46a.
Now that MC-146623 is fixed, @unknown's comment is no longer valid regarding bonus chests floating in the air.
While normal worlds do have this bug, bonus chests in buffet worlds set to deep ocean is the fastest way to reproduce.
My suggestion for scenarios where bonus chests have no non-water block to generate on, generate a plank block beneath the chest and subtract one plank block that were going to be inside the bonus chest.
Affects 19w46b.
Title should be changed to "Bonus chests generate on top of water" to be more clear. The description should also change slightly.
Affects 1.15-pre1
Confirmed in 1.15.1
Seed: 4091996699329202483
[media]Confirmed in 20w14a
Seed: 2833266223617890175
Can confirm in 20w51a. This takes quite some time to reproduce as the chest spawns in random places regardless of using the same seed.
Can confirm in 21w05b. I've provided a screenshot of this issue occurring.
Seed: 2833266223617890175
Can confirm in 21w06a.
Seed for 21w06a: 5864409455779207650
Can confirm in 21w07a.
Can confirm in 21w16a using these seeds: 2833266223617890175.
This issue seems to be almost fixed - chests always generate on a surface, but they also consider water as a solid surface.
This just happened to me, I added my screenshot to this issue. see MC-231436
This is also still happening for me in the 1.18 snapshots.
Can confirm happening in 1.18 pre 6
seed: [-8450249545086940980]
[media]
Can confirm in 1.19.
Can confirm in 1.19.2.

Can confirm in 23w03a

Can confirm in 1.19.3 and 23w06a

Can confirm in 1.20 Release Candidate 1.
And can we update the outdated Steps To Reproduce, and replace with Isak Dahlen's seed from 23/Nov/2021:
-8450249545086940980
Can confirm 1.20.2
Seed: -8450249545086940980
Appears to be fixed in 1.20.6 with seed -8450249545086940980. !2024-05-10_15.17.57.png|width=330,height=175!