Allow dimensions added by other mods (besides GalactiCraft) to inherit GT worldgen features from overworld

This commit is contained in:
MauveCloud 2017-03-22 13:23:42 -07:00
parent 48461498f1
commit 57ccbfc0c6

View file

@ -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