aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/GT_Worldgenerator.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common/GT_Worldgenerator.java')
-rw-r--r--src/main/java/gregtech/common/GT_Worldgenerator.java23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java
index 84e3ad9687..872cc0d8a7 100644
--- a/src/main/java/gregtech/common/GT_Worldgenerator.java
+++ b/src/main/java/gregtech/common/GT_Worldgenerator.java
@@ -3,6 +3,7 @@ package gregtech.common;
import cpw.mods.fml.common.IWorldGenerator;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
+import gregtech.api.objects.XSTR;
import gregtech.api.util.GT_Log;
import gregtech.api.world.GT_Worldgen;
import gregtech.common.blocks.GT_TileEntity_Ores;
@@ -47,10 +48,11 @@ public class GT_Worldgenerator
}
public void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- this.mList.add(new WorldGenContainer(new Random(aRandom.nextInt()), aX * 16, aZ * 16, ((aChunkGenerator instanceof ChunkProviderEnd)) || (aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8) == BiomeGenBase.sky) ? 1 : ((aChunkGenerator instanceof ChunkProviderHell)) || (aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8) == BiomeGenBase.hell) ? -1 : 0, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName));
+ this.mList.add(new WorldGenContainer(new XSTR(aRandom.nextInt()), aX * 16, aZ * 16, ((aChunkGenerator instanceof ChunkProviderEnd)) || (aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8) == BiomeGenBase.sky) ? 1 : ((aChunkGenerator instanceof ChunkProviderHell)) || (aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8) == BiomeGenBase.hell) ? -1 : 0, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName));
if (!this.mIsGenerating) {
this.mIsGenerating = true;
- for (int i = 0; i < this.mList.size(); i++) {
+ int mList_sS=this.mList.size();
+ for (int i = 0; i < mList_sS; i++) {
((Runnable) this.mList.get(i)).run();
}
this.mList.clear();
@@ -107,16 +109,11 @@ public class GT_Worldgenerator
int j = 0;
for (int tZ = this.mZ - 16; j < 3; tZ += 16) {
String tBiome = this.mWorld.getBiomeGenForCoords(tX + 8, tZ + 8).biomeName;
- if (tBiome == null) {
- tBiome = BiomeGenBase.plains.biomeName;
- }
- for (GT_Worldgen tWorldGen : GregTech_API.sWorldgenList) {
- try {
+ try {
+ for (GT_Worldgen tWorldGen : GregTech_API.sWorldgenList) {
tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, tX, tZ, this.mChunkGenerator, this.mChunkProvider);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
j++;
}
i++;
@@ -209,9 +206,9 @@ public class GT_Worldgenerator
} else if (tDimensionName.equals("Asteroids")) {
//int asteroidType = aRandom.nextInt(20);
//if (asteroidType == 19) { //Rare Asteroid?
- //mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3);
+ //mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3);
//} else {
- mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3);
+ mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3);
//}
}
}
@@ -233,4 +230,4 @@ public class GT_Worldgenerator
}
}
}
-}
+} \ No newline at end of file