Allow dimensions added by other mods (besides GalactiCraft) to inherit GT worldgen features from overworld
This commit is contained in:
parent
48461498f1
commit
57ccbfc0c6
1 changed files with 5 additions and 1 deletions
|
@ -44,7 +44,11 @@ public class GT_Worldgenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
|
public synchronized void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
|
||||||
new WorldGenContainer(new XSTR(aRandom.nextInt()), aX * 16, aZ * 16, aWorld.provider.dimensionId, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName).run();
|
int tempDimensionId = aWorld.provider.dimensionId;
|
||||||
|
if (tempDimensionId != -1 && tempDimensionId != 1 && !aChunkGenerator.getClass().getName().contains("galacticraft")) {
|
||||||
|
tempDimensionId = 0;
|
||||||
|
}
|
||||||
|
new WorldGenContainer(new XSTR(aRandom.nextInt()), aX * 16, aZ * 16, tempDimensionId, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName).run();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class WorldGenContainer
|
public static class WorldGenContainer
|
||||||
|
|
Loading…
Reference in a new issue