int dim = world.provider.dimensionId;
ArrayList chunks = (ArrayList) chunksToGen.get(Integer.valueOf(dim));
if (chunks != null && chunks.size() > 0)
{
ChunkCoord c = (ChunkCoord) chunks.get(0);
long worldSeed = world.getSeed();
Random rand = new Random(worldSeed);
long xSeed = rand.nextLong() >> 2 + 1L;
long zSeed = rand.nextLong() >> 2 + 1L;
rand.setSeed(xSeed * c.chunkX + zSeed * c.chunkZ ^ worldSeed);