Buried Treasure cannot generate if there's no suitable stone below its generate position in 1.18+.
Steps to reproduce:
Seed:892313478237648
/tp 73 -27 -599 (The water is 90 blocks deep here)
Then run the command
/locate structure buried_treasure/locate structure buried_treasureIt will say it's 0 blocks away.
Then dig down, you won't find any buried treasure.
Analysis:
Buried Treasure always generates 1 block higher than the highest suitable stone at its X and Z coordinates.
Suitable stone includes:
Stone, Sandstone. Diorite, Granite, Andesite.
But if there's no such stone at it's X and Z coordinates, it won't generate.
There's no these type of stone below Y=0, so it can't generate below Y=0.
(For proof, you can create a default superflat world or a only-deepslate superflat world, then run the command /place structure minecraft:buried_treasure ~ ~ ~ , and you will found it is "placed" but no buried treasure chest generated. Then create a superflat world with only suitable types of stone, run the command /place structure minecraft:buried_treasure ~ ~ ~ , and you will found the buried treasure chest is generated.)
Attachments
Comments 5
There's another seed cause this issue:
892318692194652 /tp 521 -41 617 or /tp 505 -27 633
There's nothing beneath where the chest generated, so the buried treasure cannot be replaced by anything.
Change the title to "Buried Treasure cannot generate if there's no suitable stone below its generate position".
The issue seems to be that the burried treasure was replaced with water due to the underwater cave beneath where the chest generated, rather than the specific y-level of where the chest generated: