Started by
tazzan
on
Topic category: Help with Minecraft modding (Java Edition)
I have a couple of structures in a mod I'm developing, and every time without fail, it seems that they generate over ledges or on the sides of steep hills which make them look completely out of place. The image below shows one of these structures on the edge of a mountain, which is almost the exact opposite of what I want to happen. The structure block is generating on a solid block, yet the rest of the structure is not. The only thing I'm worried about is that by throttling the structure's generation too much it could make an already uncommon structure almost impossible to find, so I'm looking for a solution that strikes the right balance but I have no idea how to execute it.
Check y-1 blocks to be solid
@woodcreatures thought it's not exactly what you said, your statement made me think of a seemingly simple solution
I could check if y=1 of the middle of the structure is solid and if not then don't generate, making it so that at least most of the structure would generate on solid ground with few code to check
I know this is an older thread but I'll post my advice for future users:
You can tinker with structure placement via procedures, but an easier java-free method is to create a jigsaw structure. You'll create your normal structure, and then also create a jigsaw structure that attaches to the bottom of it. It can be a basement or extension, or it can just be a column of dirt and stone. Below is an example of a castle I made that generates seamlessly onto the side of a hill by spawning in the top part, and then the lower section below it.