diff options
author | Blood-Asp <bloodasphendrik@gmail.com> | 2016-08-10 22:41:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-10 22:41:36 +0200 |
commit | e6ecf4f2989eed1caedab4e0b01a13ddfd1be0b2 (patch) | |
tree | e22fb6ebb060dc92433e7061eee3037d758ef4b5 /src/main/java/gregtech/common/GT_Worldgenerator.java | |
parent | b3bd42ba8cd4a785230be7f5a1693b4dc2375b7e (diff) | |
parent | 4ee250357e7ce20d45a64c47e6e38658957c189c (diff) | |
download | GT5-Unofficial-e6ecf4f2989eed1caedab4e0b01a13ddfd1be0b2.tar.gz GT5-Unofficial-e6ecf4f2989eed1caedab4e0b01a13ddfd1be0b2.tar.bz2 GT5-Unofficial-e6ecf4f2989eed1caedab4e0b01a13ddfd1be0b2.zip |
Merge pull request #597 from Muramasa-/GCOres
GC Ore Support
Diffstat (limited to 'src/main/java/gregtech/common/GT_Worldgenerator.java')
-rw-r--r-- | src/main/java/gregtech/common/GT_Worldgenerator.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java index 2d421097fc..84e3ad9687 100644 --- a/src/main/java/gregtech/common/GT_Worldgenerator.java +++ b/src/main/java/gregtech/common/GT_Worldgenerator.java @@ -124,8 +124,9 @@ public class GT_Worldgenerator }
//Asteroid Worldgen
int tDimensionType = this.mWorld.provider.dimensionId;
+ String tDimensionName = this.mWorld.provider.getDimensionName();
Random aRandom = new Random();
- if (((tDimensionType == 1) && endAsteroids && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0))) || ((tDimensionType == -30) && gcAsteroids && ((mGCAsteroidProbability <= 1) || (aRandom.nextInt(mGCAsteroidProbability) == 0)))) {
+ if (((tDimensionType == 1) && endAsteroids && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0))) || ((tDimensionName.equals("Asteroids")) && gcAsteroids && ((mGCAsteroidProbability <= 1) || (aRandom.nextInt(mGCAsteroidProbability) == 0)))) {
short primaryMeta = 0;
short secondaryMeta = 0;
@@ -160,7 +161,7 @@ public class GT_Worldgenerator int tZ = mZ + aRandom.nextInt(16);
if (tDimensionType == 1) {
mSize = aRandom.nextInt((int) (endMaxSize - endMinSize));
- } else if (tDimensionType == -30) {
+ } else if (tDimensionName.equals("Asteroids")) {
mSize = aRandom.nextInt((int) (gcMaxSize - gcMinSize));
}
if ((mWorld.getBlock(tX, tY, tZ).isAir(mWorld, tX, tY, tZ))) {
@@ -205,7 +206,7 @@ public class GT_Worldgenerator } else {
if (tDimensionType == -1) {
mWorld.setBlock(eX, eY, eZ, Blocks.end_stone, 0, 0);
- } else if (tDimensionType == -30) {
+ } 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);
|