Thank you very much it worked.
But now i have another question...
I looked into the ChunkProvider and i noticed two methods to generate terrain :
1)
The first one is to create an array of bytes and send it to this method
public Chunk(World world, byte[] ids, byte[] metadata, int chunkX, int chunkZ)
Wich doesn't seem too complicated
2)
The second is (i think) to generate the terrain data after creating the chunk like this
// Generate extended block storage
for (int y=0; y<16; y++) {
chunk.getBlockStorageArray()[y] = new ExtendedBlockStorage(y << 4, true);
}
// Generate 16x16 square of grass blocks at y value of 63.
for (int x=0; x<16; x++) {
for (int z=0; z<16; z++) {
chunk.getBlockStorageArray()[3].setExtBlockID(x, 15/*y*/, z, Block.grass.blockID);
}
}
i don't really understand how it works but it does
Which one is the best to use?
Thanks again.