aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorRichard Hendricks <richardhendricks@pobox.com>2017-09-16 12:31:38 -0500
committerRichard Hendricks <richardhendricks@pobox.com>2017-10-16 20:41:34 -0500
commitf2acf6b6f2ea7ed7158857b0a86d8380488fccf8 (patch)
tree68767567d149ff4525aa20b6ea34e4acbd4b405b /src/main/java
parent65a7b7764ea5a5f67afc19d19070aa8e9cbbd7e6 (diff)
downloadGT5-Unofficial-f2acf6b6f2ea7ed7158857b0a86d8380488fccf8.tar.gz
GT5-Unofficial-f2acf6b6f2ea7ed7158857b0a86d8380488fccf8.tar.bz2
GT5-Unofficial-f2acf6b6f2ea7ed7158857b0a86d8380488fccf8.zip
Removed execCount, focus only on blocks actually placed.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
index 5fcfffad8b..17f35c2e54 100644
--- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
+++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
@@ -92,7 +92,6 @@ public class GT_Worldgen_GT_Ore_Layer
int cX = aChunkX - aRandom.nextInt(this.mSize);
int eX = aChunkX + 16 + aRandom.nextInt(this.mSize);
- int[] execCount=new int[4];
int[] placeCount=new int[4];
for (int tX = cX; tX <= eX; tX++) {
int cZ = aChunkZ - aRandom.nextInt(this.mSize);
@@ -103,7 +102,6 @@ public class GT_Worldgen_GT_Ore_Layer
if ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)) {
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, i, tZ, this.mSecondaryMeta, false))
placeCount[1]++;
- execCount[1]++;
}
}
}
@@ -117,14 +115,12 @@ public class GT_Worldgen_GT_Ore_Layer
if ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0)) {
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, i, tZ, this.mPrimaryMeta, false))
placeCount[0]++;
- execCount[0]++;
}
}
}
if ((this.mSporadicMeta > 0) && ((aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cZ - tZ), MathHelper.abs_int(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(MathHelper.abs_int(cX - tX), MathHelper.abs_int(eX - tX)) / this.mDensity)) == 0))) {
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, tMinY - 1 + aRandom.nextInt(7), tZ, this.mSporadicMeta, false))
placeCount[3]++;
- execCount[3]++;
}
}
}
@@ -134,10 +130,11 @@ public class GT_Worldgen_GT_Ore_Layer
" @ dim="+aDimensionType+
" chunkX="+aChunkX+
" chunkZ="+aChunkZ+
- " Secondary="+execCount[1]+","+placeCount[1]+" "+new ItemStack(GregTech_API.sBlockOres1,1,mSecondaryMeta).getDisplayName()+
- " Between="+execCount[2]+","+placeCount[2]+" "+new ItemStack(GregTech_API.sBlockOres1,1,mBetweenMeta).getDisplayName()+
- " Primary="+execCount[0]+","+placeCount[0]+" "+new ItemStack(GregTech_API.sBlockOres1,1,mPrimaryMeta).getDisplayName()+
- " Sporadic="+execCount[3]+","+placeCount[3]+" "+new ItemStack(GregTech_API.sBlockOres1,1,mSporadicMeta).getDisplayName()
+ " chunkY="+tMinY+
+ " Secondary="+placeCount[1]+" "+new ItemStack(GregTech_API.sBlockOres1,1,mSecondaryMeta).getDisplayName()+
+ " Between="+placeCount[2]+" "+new ItemStack(GregTech_API.sBlockOres1,1,mBetweenMeta).getDisplayName()+
+ " Primary="+placeCount[0]+" "+new ItemStack(GregTech_API.sBlockOres1,1,mPrimaryMeta).getDisplayName()+
+ " Sporadic="+placeCount[3]+" "+new ItemStack(GregTech_API.sBlockOres1,1,mSporadicMeta).getDisplayName()
);
}
// Didn't place anything, return false