Nether generation

Discussion in 'Plugin Development' started by zipron, Jun 14, 2012.

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

    zipron

    I was testing some nether issues the other day (most lagg comes from lighting bugs) and I was did this test where I copied the overworld region data to the netherworld DIM-1 data. (that makes the normal world but than in a nether enviroment)

    So a few things that surprised me:
    - no lagg, oh well this prooves that the lagg issues is ralted with the nether generation, (which is mojangs bad)
    - strangely enough, normal mobs were spawning (in the nether) That is because with the anvil format, biome data is saved per chunk.
    (I'm btw sure it's nether, I flew a bit and nether chunks started generating, also sky was red and all)

    So a thought occured to me for just a fun plugin: making a generator (or copying the existing one) to generate normal overworld in the nether (not just changing the biome type of chunks to hell!) would seem pretty fun for a hardcore styled map or something.

    so is that possible, and if so, which classes should I use? problem I have atm with the world generators is that it sometimes break, so maybe there is a very clean way to generate overworld chunks for the DIM-1 folder.

    Zip
     
  2. Offline

    ZeusAllMighty11

    I was actually having a go at this. Trying to get the top 128 blocks to be regular world (ocean, desert, taiga, flatlands, etc) and the bottom half to be nether stuff. Problem is, you can't split a chunk in half in the Y axis. Chunks are something like 16x16x256
     
  3. Offline

    zipron

    Oh I see what you're up to. Major problem is that biome data is stored per chunk, not per layer I think. But isn't it possible to split in in the Y axis? I only made a simple flatlands generator, don't know how to implement the real world generator, take a look at this:
    http://jd.bukkit.org/apidocs/org/bu...r.html#generateBlockSections(org.bukkit.World, java.util.Random, int, int, org.bukkit.generator.ChunkGenerator.BiomeGrid)

    suppose you use that one, but I was able to make a simple check loop:
    if y == 0 { bedrock }
    if y < 63 && y > 0 { stone }
    if y < 65 && y > 63 { dirt }
    if y == 65 { grass }

    this was very basic, but that way you could check on the y axis no? Or do I get the problem wrong?

    your idea would be epic though: a combined generator with nether, overworld and the end all in one world, which is possible with the 256 height limit.
     
  4. Offline

    ZeusAllMighty11


    the main problem is, that you can't define a certain biome such as HELLWORLD by splitting the Y axis. Terrain generation can easily be split as you please, really, as long as you know the math equation stuffz.

    But like I'm trying to say...erm, let me try a picture.

    XXXX
    XXXX
    XXXX
    XXXX
    BBBB

    X = anything above bedrock
    B = bedrock

    Biome == Flatlands, let's say


    You can't do this:


    XXXX regular biome
    XXXX
    NNNN nether biome
    NNNN
    BBBBB

    X = Anything not in nether
    N = Nether stuff
    B = Bedorkc
     
  5. Offline

    zipron

    Yea I know that, but wouldn't this be a solution:
    - normal biome generation for all chunks, this means overworld mobs can spawn
    - on the spawn event, you check the height level of the spawn, if it's in the neter layer, you cancel it
    - in stead of using biomes to spawn mobs, you can OR let your generator place mobspawners in the nether part, OR create an own system which controls nether spawns (called if the spawn event is cancelled because of too low layer, in stead of spawning a normal mob, you let a ghast or pigzombie spawn)
    - also water placement/ice melting/dispenser water (1.3) should be blocked below a certain level.

    I don't know if you concidered this, or if it's even possible, but it seems to me that it should work if you get the generator code working (I'm not familiar with it, so I have no idea if that is possible). But that way you create a fake nether biome within an overworld biome.

    zip
     
Thread Status:
Not open for further replies.

Share This Page