Use default minecraft terrain generator?

Discussion in 'Plugin Development' started by DrAgonmoray, Sep 23, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    Ok, so I'm wanting to make a terrain generator, for pretty specific uses.
    On some parts of the map, I want the map to be totally flat (and I can make flat maps.) However on a different part of the map, I want chunks to generate using minecraft's regular terrain generation. How can I do that?

    tl;dr: (or didn't understand)
    I want some chunks to generate using my custom terrain generator, and some chunks to generate using Minecraft's terrain generator.
  2. Offline


    Maybe include the default terrain gen. inside your terrain gen, so sometimes it will just pass the terrain gen straight to the default.
  3. Offline


    does not compute
  4. Offline


    I'd also like to know how to customize the default Minecraft generator.
  5. Offline


    I don't want to really customize it, but just make it work.
    Idea: @codename_B
  6. Offline


  7. Offline


    no, srsly
  8. Offline


    Ok, so you are happily generating your flat-grass when, your plugin decides to generate default terrain. It looks something like this:

    public genTerrain(args..., boolean default){
        if (default){
        } else {
    I may not have the names of the methods right, and args means all the arguments passed to the terrain gen. But I hope it computes this time :p
  9. Offline


    Does anyone know what the code is for the default generator.
  10. Offline


    Erm... How do you plan to decide where the flat terrain and the regular terrain gets generated?
  11. Offline


    In native coding it is called 'ChunkProvider', there are:
    - ChunkProviderHell (nether)
    - ChunkProviderSky (skylands)
    - ChunkProviderServer (normal)
    You probably need to call getChunkAt on an instance of one of those three. My guess is that, when setting a chunk generator, a custom provider implementing IChunkProvider is used. This means that the regular chunk generators are not available at that point. However, you could instantiate one of the above default providers in your chunk generator.

    haven't looked deeper into this than the above, may need more complicated coding.


    Perhaps possible to extend one of the above three, but not sure how you'd apply it on a world then. (through Bukkit)
Thread Status:
Not open for further replies.

Share This Page