Terrain Generator Question

Discussion in 'Plugin Development' started by Kierrow, Nov 15, 2011.

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

    Kierrow

    Hey,

    so I had this idea for my server, where the world would basically be generated off of a couple of images.
    This would mean that you could kind of design your own world.
    I've got the plugin environment set up so that it would load the images.
    One for the highmap, one for the biome, one for volatility and so on.
    But then I ran into the problem, that - and I know PhoenixTerrainMod (http://dev.bukkit.org/server-mods/terrain-control/) does this - I don't know how to affect biome generation.

    Does anybody know how to do this?
    I have looked through the CraftBukkit sources for answers, but I did not manage to find any by myself...
    And btw I'm using CraftBukkit 1.9 pre5 #19.

    Yours,
    -Kierrow
     
  2. Offline

    halley

    Biome is a mathematical function of X and Z and seed. The code for understanding biomes is on the server and also on the client. You can't say "this chunk is snowy." The server does not tell the client "this chunk is snowy." You can only say "this world has seed ABC" and the math goes from there on both server and client. If you walk to a given X and Z, and the biome function uses X and Z and seed, and from those calculates low temperature, and the server is currently in storm mode, you'll get snow.

    For hairy details about this kind of mathematical function, see this writeup on perlin noise generation. It's not discussing Minecraft, but it's close enough that you'll come to understand it.
     
  3. Offline

    Kierrow

    but didn't the server tell the client the temperature and moisture at least before 1.8?
     
  4. Offline

    jtherrien

    It didn't. One unavoidable problem with PTM was that during storms, it would appear to rain where there was snow and snow where there was grass, or rain in a desert. All weather-effects and grass shading is done client side. All PTM could do is just set what blocks were where, so snow might be in a location that the client thought was a desert. What I think you are asking though is is how PTM determined where to put snow when there was weather, even though the server and client disagreed on what precipitation should be falling. For that, I'm not sure.
     
  5. Offline

    Kierrow

    well thanks for clearing this up then.
    i'm sure i'll find another solution to this.
     
Thread Status:
Not open for further replies.

Share This Page