From 57ccbfc0c63595ae14c9281052c7dafa5c06b667 Mon Sep 17 00:00:00 2001 From: MauveCloud Date: Wed, 22 Mar 2017 13:23:42 -0700 Subject: [PATCH] Allow dimensions added by other mods (besides GalactiCraft) to inherit GT worldgen features from overworld --- src/main/java/gregtech/common/GT_Worldgenerator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java index 532c41f5..6ce733cf 100644 --- a/src/main/java/gregtech/common/GT_Worldgenerator.java +++ b/src/main/java/gregtech/common/GT_Worldgenerator.java @@ -44,7 +44,11 @@ public class GT_Worldgenerator } 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