Jump to content

[1.8] Structure Generation


MingWong

Recommended Posts

Hello I have structures successfully generating in my world however I don't know how to make them spawn 'naturally' .

For example this is how they look:

 

How can I make them integrate into the world and look natural? I done this by getting a MC Edit schematic file and just making the structure spawn randomly, which is why it does this, but I am not sure how to fix it :(

Link to comment
Share on other sites

You need site-selection and boundary matching strategies (and then lots of intelligent code) to blend rigid prefab into variable terrain. You might gain some insight by reading vanilla village generation code (and gain sympathy for writing a road-laying algorithm that almost works in hilly terrain). Also look through vanilla biomes for terrain generation, especially in transition zones.

 

Consider breaking your structure into modular units that may be placed at different heights, reducing the amount of cutting and filling for each. Alternatively, you may have your structure "perch" on top of the highest (or nearly highest) surface block it covers, and then fill from there (if you like mountain-top forts).

 

Enforce a minimum elevation to keep your ground floor above ocean water. Remember to use water rather than air as "empty space" below sea-level. Envision a transition zone around your structure/campus, and then design a method that fills in rings of blocks to smooth the height transition from structure to surrounding terrain... and you might even detect if you're impinging upon an open lava pool (so your castle doesn't immediately fill with lava and/or burn to the ground, fall over and then sink into a swamp).

 

There are quite a few structure-generation threads buried in this forum. If the site-search isn't helpful, then Google is your friend (Google does a better job of prioritizing discussion above voluminous crash logs).

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.