Hey there, I want to change the way worlds are generated (think alternate caves, sky islands, alternate trees, new ground blocks etc.)
My first guess was the IWorldGenerator Interface and I made this dumb test class:
public class TestWorldGen implements IWorldGenerator {
@Override
public void generate(Random random, int chunkX, int chunkZ, World world,
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
if(world.provider.isSurfaceWorld()) {
int x = chunkX*16;
int z = chunkZ*16;
for(int i =0; i!=16;i++) {
for(int j =0; j!=16;j++) {
world.setBlock((x+i), 80, (z+j), Block.tnt.blockID);
}
}
}
}
}
Though this crashes the game when it starts generating the map and all the examples I found used it just for simple things like putting a little bit of custom ore here and there.
I also looked at the BetterWorldGeneration source code to find any hints how they do it, but I found nothing.
So I guess this must be a completly wrong approach for what I'm trying to do.
Any hints what I have to use instead?