2

Make My Custom Structure Spawn Underground?

qjz9zk 6/17/23 1:04 am
640
6/8/2024 7:28 pm
I'm looking for a way to make my custom structure spawn underground at varied, random heights, like the abandoned mineshaft structure. I also want it stay on/below the surface (like mineshafts also). Unfortunately there doesn't seem to be a way to use heightmap with a random offset to always start structures off underground.

There are heightmaps, but all heightmaps are terrain level and if used, ignore any height value provided.

Similarly, using the height shapes, like trapezoid or triangular, there's no way to limit the shape to the terrain height.

It seems like all underground structures are hardcoded, so the ability to spawn structures underground doesn't exist yet. Am I wrong?
Posted by
qjz9zk
Level 1 : New Miner
0

  Have something to say?

JoinSign in

2

Kefaku
06/20/2023 10:48 am
Level 45 : Master Nerd
history
If you use a heightmap as start, the "start_height" should work as an offset, instead of as an absolute value.
While the heightmap is fixed, "start_height" can have a uniform range or weighted list to generate random values.

I guess, you already tried that, since you said "if used, ignore any height value provided". It should definitely work and I can confirm when I tested ~1week (?) ago in 1.19.4 it worked. Maybe you used very small values and terrain adaption messed it up?
2
qjz9zk
06/08/2024 7:28 pm
Level 1 : New Miner
Thanks for your input. I don't know why it didn't work before (its' been too long, I don't think I even have that project anymore), but it seems to work fine in the versions I use now with the custom structures I use now, so thank you!
1

Welcome