aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorRichard Hendricks <richardhendricks@pobox.com>2017-11-13 03:32:02 -0600
committerRichard Hendricks <richardhendricks@pobox.com>2017-11-24 00:48:02 -0600
commit5cc6156d221f92b0226152a705b1da17e5177866 (patch)
tree039f9cead0eb5eb2f39261ac70cfbf4ce0ac3e9e /src/main/java
parent376f7c63f6d7ea9df0b967e9dc1ecbd710370307 (diff)
downloadGT5-Unofficial-5cc6156d221f92b0226152a705b1da17e5177866.tar.gz
GT5-Unofficial-5cc6156d221f92b0226152a705b1da17e5177866.tar.bz2
GT5-Unofficial-5cc6156d221f92b0226152a705b1da17e5177866.zip
Cascading worldgen is being caused by something in other worldgen, possibly small ores or stones? Don't know for sure, need to investigate.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/api/world/GT_Worldgen.java2
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java77
-rw-r--r--src/main/java/gregtech/common/GT_Worldgenerator.java76
3 files changed, 98 insertions, 57 deletions
diff --git a/src/main/java/gregtech/api/world/GT_Worldgen.java b/src/main/java/gregtech/api/world/GT_Worldgen.java
index 2fdb637e87..fb202b5a82 100644
--- a/src/main/java/gregtech/api/world/GT_Worldgen.java
+++ b/src/main/java/gregtech/api/world/GT_Worldgen.java
@@ -35,7 +35,7 @@ public abstract class GT_Worldgen {
}
public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, int seedX, int seedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- return 0;
+ return 4; // This is for the empryOrevein
}
/**
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 11772e8fd6..a2b9c7e98e 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
@@ -96,6 +96,14 @@ public class GT_Worldgen_GT_Ore_Layer
}
public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, int aSeedX, int aSeedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
+ if( mWorldGenName.equals("NoOresInVein") ) {
+ if (debugOrevein) GT_Log.out.println(
+ " NoOresInVein, skipping"
+ );
+ // This is a special empty orevein
+ return ORE_PLACED;
+ }
+
//if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) || ((aWorld.provider.getDimensionName().equals("Moon")) && (this.mMoon)) || ((aWorld.provider.getDimensionName().equals("Mars")) && (this.mMars)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) {
if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) {
return WRONG_DIMENSION;
@@ -106,15 +114,15 @@ public class GT_Worldgen_GT_Ore_Layer
int[] placeCount=new int[4];
// Need to "reseed" RNG with values based on the orevein constants so that two oreveins at this same chunk don't end up trying the same sizes and offsets.
- aRandom.nextInt( this.mPrimaryMeta + this.mSecondaryMeta + this.mSporadicMeta + this.mBetweenMeta);
+ aRandom.nextInt( this.mPrimaryMeta + this.mSecondaryMeta + this.mSporadicMeta + this.mBetweenMeta + aChunkX + aChunkZ);
int tMinY = mMinY + aRandom.nextInt(mMaxY - mMinY - 5);
// Determine West/East ends of orevein
int wXVein = aSeedX - aRandom.nextInt(mSize); // West side
int eXVein = aSeedX + 16 + aRandom.nextInt(mSize);
// Limit Orevein to only blocks present in current chunk
- int wX = Math.max( wXVein, aChunkX);
- int eX = Math.min( eXVein, aChunkX + 16);
+ int wX = Math.max( wXVein, aChunkX + 1);
+ int eX = Math.min( eXVein, aChunkX + 15);
if (wX >= eX) { //No overlap between orevein and this chunk exists in X
/*
if (debugOrevein) {
@@ -129,8 +137,8 @@ public class GT_Worldgen_GT_Ore_Layer
int nZVein = aSeedZ - aRandom.nextInt(mSize);
int sZVein = aSeedZ + 16 + aRandom.nextInt(mSize);
- int nZ = Math.max(nZVein, aChunkZ);
- int sZ = Math.min(sZVein, aChunkZ+16);
+ int nZ = Math.max(nZVein, aChunkZ + 1);
+ int sZ = Math.min(sZVein, aChunkZ + 15);
if (nZ >= sZ) { //No overlap between orevein and this chunk exists in Z
/*
if (debugOrevein) {
@@ -141,22 +149,25 @@ public class GT_Worldgen_GT_Ore_Layer
*/
return NO_OVERLAP;
}
- // Need to "reseed" RNG with values based on the chunkX/Z location so that filled chunks don't repeat the same RNG values
- aRandom.nextInt( aChunkX + aChunkZ );
-
- // To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll 1 pass through the loop
+ if (debugOrevein) GT_Log.out.println(
+ "wX=" + wX +
+ " eX=" + eX +
+ " nZ=" + nZ +
+ " sZ=" + sZ
+ );
+ // To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll 1 pass through the loop
// Now we do bottom-level-first oregen, and work our way upwards.
int level = tMinY - 1; //Dunno why, but the first layer is actually played one below tMinY. Go figure.
for (int tX = wX; tX < eX; tX++) {
- int placeX = Math.max(1, Math.max(MathHelper.abs_int(wX - tX), MathHelper.abs_int(eX - tX)));
+ int placeX = Math.max(1, Math.max(MathHelper.abs_int(wX - tX), MathHelper.abs_int(eX - tX))/mDensity);
for (int tZ = nZ; tZ < sZ; tZ++) {
- int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZ - tZ), MathHelper.abs_int(nZ - tZ)));
- if ( ((aRandom.nextInt(placeZ/mDensity) == 0) || (aRandom.nextInt(placeX/mDensity) == 0)) && (this.mSecondaryMeta > 0) ) {
+ int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZ - tZ), MathHelper.abs_int(nZ - tZ))/mDensity);
+ if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta > 0) ) {
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) {
placeCount[1]++;
}
}
- else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ/mDensity) == 0) || (aRandom.nextInt(placeX/mDensity) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
+ else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
placeCount[3]++;
}
@@ -173,15 +184,15 @@ public class GT_Worldgen_GT_Ore_Layer
}
for (level = tMinY; level < (tMinY-1+3); level++) {
for (int tX = wX; tX < eX; tX++) {
- int placeX = Math.max(1, Math.max(MathHelper.abs_int(wX - tX), MathHelper.abs_int(eX - tX)));
+ int placeX = Math.max(1, Math.max(MathHelper.abs_int(wX - tX), MathHelper.abs_int(eX - tX))/mDensity);
for (int tZ = nZ; tZ < sZ; tZ++) {
- int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZ - tZ), MathHelper.abs_int(nZ - tZ)));
- if ( ((aRandom.nextInt(placeZ/mDensity) == 0) || (aRandom.nextInt(placeX/mDensity) == 0)) && (this.mSecondaryMeta > 0) ) {
+ int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZ - tZ), MathHelper.abs_int(nZ - tZ))/mDensity);
+ if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta > 0) ) {
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) {
placeCount[1]++;
}
}
- else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ/mDensity) == 0) || (aRandom.nextInt(placeX/mDensity) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
+ else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
placeCount[3]++;
}
@@ -191,15 +202,15 @@ public class GT_Worldgen_GT_Ore_Layer
// Low Middle layer is between + sporadic
// level should be = tMinY-1+3 from end of for loop
for (int tX = wX; tX < eX; tX++) {
- int placeX = Math.max(1, Math.max(MathHelper.abs_int(wX - tX), MathHelper.abs_int(eX - tX)));
+ int placeX = Math.max(1, Math.max(MathHelper.abs_int(wX - tX), MathHelper.abs_int(eX - tX))/mDensity);
for (int tZ = nZ; tZ < sZ; tZ++) {
- int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZ - tZ), MathHelper.abs_int(nZ - tZ)));
- if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ/mDensity) == 0) || (aRandom.nextInt(placeX/mDensity) == 0)) && (this.mBetweenMeta > 0) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate
+ int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZ - tZ), MathHelper.abs_int(nZ - tZ))/mDensity);
+ if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta > 0) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) {
placeCount[2]++;
}
}
- else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ/mDensity) == 0) || (aRandom.nextInt(placeX/mDensity) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
+ else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
placeCount[3]++;
}
@@ -208,20 +219,20 @@ public class GT_Worldgen_GT_Ore_Layer
// High Middle layer is between + primary + sporadic
level++; // Increment level to next layer
for (int tX = wX; tX < eX; tX++) {
- int placeX = Math.max(1, Math.max(MathHelper.abs_int(wX - tX), MathHelper.abs_int(eX - tX)));
+ int placeX = Math.max(1, Math.max(MathHelper.abs_int(wX - tX), MathHelper.abs_int(eX - tX))/mDensity);
for (int tZ = nZ; tZ < sZ; tZ++) {
- int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZ - tZ), MathHelper.abs_int(nZ - tZ)));
- if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ/mDensity) == 0) || (aRandom.nextInt(placeX/mDensity) == 0)) && (this.mBetweenMeta > 0) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate
+ int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZ - tZ), MathHelper.abs_int(nZ - tZ))/mDensity);
+ if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta > 0) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) {
placeCount[2]++;
}
}
- else if ( ((aRandom.nextInt(placeZ/mDensity) == 0) || (aRandom.nextInt(placeX/mDensity) == 0)) && (this.mPrimaryMeta > 0) ) {
+ else if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta > 0) ) {
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) {
placeCount[0]++;
}
}
- else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ/mDensity) == 0) || (aRandom.nextInt(placeX/mDensity) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
+ else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
placeCount[3]++;
}
@@ -231,15 +242,15 @@ public class GT_Worldgen_GT_Ore_Layer
level++; // Increment level to next layer
for( ; level < (tMinY + 6); level++){ // should do two layers
for (int tX = wX; tX < eX; tX++) {
- int placeX = Math.max(1, Math.max(MathHelper.abs_int(wX - tX), MathHelper.abs_int(eX - tX)));
+ int placeX = Math.max(1, Math.max(MathHelper.abs_int(wX - tX), MathHelper.abs_int(eX - tX))/mDensity);
for (int tZ = nZ; tZ < sZ; tZ++) {
- int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZ - tZ), MathHelper.abs_int(nZ - tZ)));
- if ( ((aRandom.nextInt(placeZ/mDensity) == 0) || (aRandom.nextInt(placeX/mDensity) == 0)) && (this.mPrimaryMeta > 0) ) {
+ int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZ - tZ), MathHelper.abs_int(nZ - tZ))/mDensity);
+ if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta > 0) ) {
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) {
placeCount[0]++;
}
}
- else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ/mDensity) == 0) || (aRandom.nextInt(placeX/mDensity) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
+ else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta > 0) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
if (GT_TileEntity_Ores.setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
placeCount[3]++;
}
@@ -251,8 +262,10 @@ public class GT_Worldgen_GT_Ore_Layer
GT_Log.out.println(
"Generated Orevein:" + this.mWorldGenName +
" Dimension=" + tDimensionName +
- " cX="+aChunkX+
- " cZ="+aChunkZ+
+ " mX="+aChunkX/16+
+ " mZ="+aChunkZ/16+
+ " oreseedX="+ aSeedX/16 +
+ " oreseedZ="+ aSeedZ/16 +
" cY="+tMinY+
" Den=" + this.mDensity +
" Sec="+placeCount[1]+
diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java
index 789abbc070..6383ab44db 100644
--- a/src/main/java/gregtech/common/GT_Worldgenerator.java
+++ b/src/main/java/gregtech/common/GT_Worldgenerator.java
@@ -47,7 +47,7 @@ implements IWorldGenerator {
public static List<Runnable> mList = new ArrayList();
public static HashSet<Long> ProcChunks = new HashSet<Long>();
// This is probably not going to work. Trying to create a fake orevein to put into hashtable when there will be no ores in a vein.
- public static GT_Worldgen_GT_Ore_Layer noOresInVein = new GT_Worldgen_GT_Ore_Layer( "NoOresInVein", false, 0, 100, 0, 0, 0, false, false, false, false, false, false, Materials._NULL, Materials._NULL, Materials._NULL, Materials._NULL);
+ public static GT_Worldgen_GT_Ore_Layer noOresInVein = new GT_Worldgen_GT_Ore_Layer( "NoOresInVein", false, 0, 255, 0, 255, 16, false, false, false, false, false, false, Materials.Aluminium, Materials.Aluminium, Materials.Aluminium, Materials.Aluminium);
public static Hashtable<Long, GT_Worldgen> validOreveins = new Hashtable(1024);
public boolean mIsGenerating = false;
public static final Object listLock = new Object();
@@ -141,12 +141,19 @@ implements IWorldGenerator {
}
public void worldGenFindVein( int oreseedX, int oreseedZ) {
- Long oreveinSeed = this.mWorld.getSeed() ^ ( (long)oreseedX << 32) | ( (long)oreseedZ & 0x00000000ffffffffL ); // Use an RNG that is identical every time it is called for this oreseed
+ long oreveinSeed = (long)this.mWorld.getSeed() ^ (( (long)oreseedX << 32) | ( (long)oreseedZ & 0x00000000ffffffffL )); // Use an RNG that is identical every time it is called for this oreseed
XSTR oreveinRNG = new XSTR( oreveinSeed );
int oreveinPercentageRoll = oreveinRNG.nextInt(100); // Roll the dice, see if we get an orevein here at all
int noOrePlacedCount=0;
String tDimensionName = "";
if (debugOrevein) { tDimensionName = this.mWorld.provider.getDimensionName(); }
+ if (debugOrevein) GT_Log.out.println(
+ " Finding oreveins for oreveinSeed="+ oreveinSeed +
+ " mX="+ this.mX +
+ " mZ="+ this.mZ +
+ " oreseedX="+ oreseedX +
+ " oreseedZ="+ oreseedZ
+ );
// Search for a valid orevein for this dimension
if( !validOreveins.containsKey(oreveinSeed) ) {
@@ -160,13 +167,17 @@ implements IWorldGenerator {
for (GT_Worldgen tWorldGen : GT_Worldgen_GT_Ore_Layer.sList) {
tRandomWeight -= ((GT_Worldgen_GT_Ore_Layer) tWorldGen).mWeight;
if (tRandomWeight <= 0) {
- try {
- oreveinRNG.setSeed(oreveinSeed); // reset seed for RNG to only be based on oreseed X/Z
- int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, oreveinRNG, this.mBiome, this.mDimensionType, this.mX*16, this.mZ*16, oreseedX*16, oreseedZ*16, this.mChunkGenerator, this.mChunkProvider);
+ try {
+ int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, new XSTR( oreveinSeed ), this.mBiome, this.mDimensionType, this.mX*16, this.mZ*16, oreseedX*16, oreseedZ*16, this.mChunkGenerator, this.mChunkProvider);
switch(placementResult) {
case GT_Worldgen_GT_Ore_Layer.ORE_PLACED:
if (debugOrevein) GT_Log.out.println(
- " Adding orevein to hash table. Orevein took " + (i-1) +
+ " Adding orevein to hash table. oreveinSeed=" + oreveinSeed +
+ " mX="+ this.mX +
+ " mZ="+ this.mZ +
+ " oreseedX="+ oreseedX +
+ " oreseedZ="+ oreseedZ +
+ " Orevein took " + (i-1) +
" attempts to find" +
" and " + placementAttempts +
" tries to place " +
@@ -184,6 +195,14 @@ implements IWorldGenerator {
}
break; // Try the next orevein
} catch (Throwable e) {
+ if (debugOrevein) GT_Log.out.println(
+ "Exception occurred on oreVein" + tWorldGen +
+ " oreveinSeed="+ oreveinSeed +
+ " mX="+ this.mX +
+ " mZ="+ this.mZ +
+ " oreseedX="+ oreseedX +
+ " oreseedZ="+ oreseedZ
+ );
e.printStackTrace(GT_Log.err);
}
}
@@ -193,22 +212,26 @@ implements IWorldGenerator {
if ((!oreveinFound) && (this.mX == oreseedX) && (this.mZ == oreseedZ)){
if (debugOrevein) GT_Log.out.println(
" Adding empty orevein to hash table. Could not find/place valid orevein" +
- " chunkX="+ this.mX*16 +
- " chunkZ="+ this.mZ*16 +
- " oreseedX="+ oreseedX*16 +
- " oreseedZ="+ oreseedZ*16 +
+ " oreveinSeed="+ oreveinSeed +
+ " mX="+ this.mX +
+ " mZ="+ this.mZ +
+ " oreseedX="+ oreseedX +
+ " oreseedZ="+ oreseedZ +
" tries at oremix=" + i +
" placementAttempts=" + placementAttempts +
- "in dimensionName=" + tDimensionName
+ " in dimensionName=" + tDimensionName
);
validOreveins.put(oreveinSeed, noOresInVein );
}
} else if(oreveinPercentageRoll >= oreveinPercentage) {
if (debugOrevein) GT_Log.out.println(
" Skipped orevein in this 3x3 chunk!" +
- " chunkX="+ this.mX +
- " chunkZ="+ this.mZ +
- " RNG=" + oreveinRNG +
+ " oreveinSeed="+ oreveinSeed +
+ " mX="+ this.mX +
+ " mZ="+ this.mZ +
+ " oreseedX=" + oreseedX +
+ " oreseedZ="+ oreseedZ +
+ " RNG=" + oreveinPercentageRoll +
" %=" + oreveinPercentage+
" dimensionName=" + tDimensionName
);
@@ -218,10 +241,12 @@ implements IWorldGenerator {
// oreseed is located in the previously processed table
if (debugOrevein) GT_Log.out.println(
" Valid orevein found in hash table" +
- " chunkX="+ this.mX*16 +
- " chunkZ="+ this.mZ*16 +
- " oreseedX="+ oreseedX*16 +
- " oreseedZ="+ oreseedZ*16 +
+ " oreveinSeed="+ oreveinSeed +
+ " validOreveins.size()=" + validOreveins.size() +
+ " mX="+ this.mX +
+ " mZ="+ this.mZ +
+ " oreseedX="+ oreseedX +
+ " oreseedZ="+ oreseedZ +
" in dimensionName=" + tDimensionName
);
GT_Worldgen tWorldGen = validOreveins.get(oreveinSeed);
@@ -234,10 +259,10 @@ implements IWorldGenerator {
long startTime = System.nanoTime();
// Determine bounding box on how far out to check for oreveins affecting this chunk
- int wXbox = this.mX - (oreveinMaxSize/4 );
- int eXbox = this.mX + (oreveinMaxSize/4 + 1); // Need to add 1 since it is compared using a <
- int nZbox = this.mZ - (oreveinMaxSize/4 );
- int sZbox = this.mZ + (oreveinMaxSize/4 + 1);
+ int wXbox = this.mX - (oreveinMaxSize/16 );
+ int eXbox = this.mX + (oreveinMaxSize/16 + 1); // Need to add 1 since it is compared using a <
+ int nZbox = this.mZ - (oreveinMaxSize/16 );
+ int sZbox = this.mZ + (oreveinMaxSize/16 + 1);
// Search for orevein seeds and add to the list;
for( int x = wXbox; x < eXbox; x++ ) {
@@ -251,12 +276,15 @@ implements IWorldGenerator {
// Now process each oreseed vs this requested chunk
for( ; seedList.size() != 0; ) {
+
worldGenFindVein( seedList.get(0).mX, seedList.get(0).mZ );
seedList.remove(0);
}
// Do leftover worldgen for this chunk (GT_Stones and GT_small_ores)
-
+
+/////RAH Disable these for now
+/*
try {
for (GT_Worldgen tWorldGen : GregTech_API.sWorldgenList) {
tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, this.mX*16, this.mZ*16, this.mChunkGenerator, this.mChunkProvider);
@@ -264,7 +292,7 @@ implements IWorldGenerator {
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
}
-
+*/
/*
if ((Math.abs(this.mX / 16) % 3 == 1) && (Math.abs(this.mZ / 16) % 3 == 1)) {
int oreveinRNG = this.mRandom.nextInt(100);