rutgerkok / WorldGeneratorApi

Minecraft Spigot plugin that enables other plugins to customize world generation
MIT License
96 stars 9 forks source link

Add examples on how to generate large custom structures and caves #18

Open bo3tools opened 4 years ago

bo3tools commented 4 years ago

Describe the feature request I've seen it's possible to selectively disable generation of vanilla features but there are no examples on how a cave or village can be generated from scratch. I think expanding the wiki with these tutorials will be immediately useful as there's little to no information regarding the implementation of these features in a plugin.

The article might start with showing how to generate a static fixed-size structure that can span across multiple chunks and then explain how to put a structure which size can vary (a village).

I've looked at deobfuscated cave generation code in older versions of the game and reimplemented it for a personal project with adjustable parameters so I might try to add a wiki page on that, however my implementation worked with a single chunk area instead of an offset 2x2 chunk area, but I suppose you just treat the middle area as your generation area and the procedure is the same.

rutgerkok commented 4 years ago

This would be a book chapter on its own...

If your implementation stays perfectly within the chunk boundary (not a single block on a lower x or z than the minimum), then you can directly use it. The offset area is just there to allow structures to extend at most 8 blocks outside the population area into any direction.