From 05b361cf7f29f1cd24d69bcea8630f3ae470b182 Mon Sep 17 00:00:00 2001 From: Richard Hendricks Date: Mon, 15 Jan 2018 01:58:00 -0600 Subject: Checking in working version for #2302. Need to verify against full modpack, and document how to evaluate oregen bias. --- .../java/gregtech/common/GT_Worldgenerator.java | 58 ++++++++++++++++++++-- 1 file changed, 53 insertions(+), 5 deletions(-) (limited to 'src/main/java/gregtech/common/GT_Worldgenerator.java') diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java index ddc78b031a..547415ec84 100644 --- a/src/main/java/gregtech/common/GT_Worldgenerator.java +++ b/src/main/java/gregtech/common/GT_Worldgenerator.java @@ -108,7 +108,13 @@ implements IWorldGenerator { public final IChunkProvider mChunkGenerator; public final IChunkProvider mChunkProvider; public final String mBiome; + // Used for outputting orevein weights and bins + // static int test=0; + + // Local class to track which orevein seeds must be checked when doing chunkified worldgen + + class NearbySeeds { public int mX; public int mZ; @@ -131,6 +137,12 @@ implements IWorldGenerator { this.mBiome = aBiome; } + + // How to evaluate oregen distribution + // + + + public void worldGenFindVein( int oreseedX, int oreseedZ) { // Explanation of oreveinseed implementation. // (long)this.mWorld.getSeed()<<16) Deep Dark does two oregen passes, one with getSeed set to +1 the original world seed. This pushes that +1 off the low bits of oreseedZ, so that the hashes are far apart for the two passes. @@ -159,6 +171,22 @@ implements IWorldGenerator { int placementAttempts = 0; boolean oreveinFound = false; int i; + + // Used for outputting orevein weights and bins + /* + if( test==0 ) + { + test = 1; + GT_Log.out.println( + "sWeight = " + GT_Worldgen_GT_Ore_Layer.sWeight + ); + for (GT_Worldgen_GT_Ore_Layer tWorldGen : GT_Worldgen_GT_Ore_Layer.sList) { + GT_Log.out.println( + ( tWorldGen).mWorldGenName + " mWeight = " + ( tWorldGen).mWeight + " mSize = " + (tWorldGen).mSize + ); + } + } + */ for( i = 0; (i < oreveinAttempts) && (!oreveinFound) && (placementAttempts