Reset the IWorldGenerator seed for each mod, before calling. That should mean worldgen is consistent

and not dependent on mod ordering, or mod sideeffects.
This commit is contained in:
Christian 2013-08-19 14:56:01 -04:00
parent 6818c0f4da
commit 94462565a5

View file

@ -95,10 +95,11 @@ public class GameRegistry
Random fmlRandom = new Random(worldSeed);
long xSeed = fmlRandom.nextLong() >> 2 + 1L;
long zSeed = fmlRandom.nextLong() >> 2 + 1L;
fmlRandom.setSeed((xSeed * chunkX + zSeed * chunkZ) ^ worldSeed);
long chunkSeed = (xSeed * chunkX + zSeed * chunkZ) ^ worldSeed;
for (IWorldGenerator generator : worldGenerators)
{
fmlRandom.setSeed(chunkSeed);
generator.generate(fmlRandom, chunkX, chunkZ, world, chunkGenerator, chunkProvider);
}
}