I'm creating a new mod for 1.12.2
I'm still learning so don't blame me.
I was generating a new structure in the world, but sometimes the structure is badly generated (is generated on hills as in the image)
How can I avoid this?
I understand that it takes as a reference 1 block of the entire structure and then generates the structure from it.