Started by
zerunox
on
Topic category: Help with Minecraft modding (Java Edition)
I am working on a custom biome for 1.20.1 and i am trying to add unique trees and decorations, i am using structures to generate these. However they all keep spawning one block below, rather than spawning on top of the grass, they spawn inside of the grass. I have made a mod for 1.12 and it had the offset feature, but that seems to be missing now. If the offset structure thing is still there, where? or how do i get my trees to stop spawning in the ground
also the trees keep spawning in water and lakes as well
Ok, so for this you can do two things.
For the one where it is spawning a block below.
You can use the /give @s Minecraft:structure void command. and that is basically a block that gets replaced by the terrain around it. (it's basically an air block)
Or, you can use the structure feature mod element and do conditions checking if the y -1 under the structure is
1. (optional) a specified block. (grass, sand, etc.)
2. If the block is solid. (I can send screenshots if you need. but it might take a bit.)