From ac065ff5f76b6c512b346366107efde66e9e1c88 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 19 Aug 2013 14:56:01 -0400 Subject: [PATCH] Reset the IWorldGenerator seed for each mod, before calling. That should mean worldgen is consistent and not dependent on mod ordering, or mod sideeffects. --- common/cpw/mods/fml/common/registry/GameRegistry.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/cpw/mods/fml/common/registry/GameRegistry.java b/common/cpw/mods/fml/common/registry/GameRegistry.java index 9d8cd4922e..75c8f638c1 100644 --- a/common/cpw/mods/fml/common/registry/GameRegistry.java +++ b/common/cpw/mods/fml/common/registry/GameRegistry.java @@ -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); } }