From 376f7c63f6d7ea9df0b967e9dc1ecbd710370307 Mon Sep 17 00:00:00 2001 From: Richard Hendricks Date: Sun, 12 Nov 2017 21:27:13 -0600 Subject: First pass at chunkifying oreveins --- src/main/java/gregtech/api/enums/GT_Values.java | 12 ++++++++++-- src/main/java/gregtech/api/world/GT_Worldgen.java | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api') diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index d6fae23b01..d4b98fd291 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -122,10 +122,18 @@ public class GT_Values { */ public static int oreveinPercentage; /** - * Control number of attempts to find a valid orevein. Lower numbers is slightly faster chunkgen, but more empty chunks with thin stone height. + * Control number of attempts to find a valid orevein. Generally this maximum limit isn't hit, selecting a vein is cheap */ public static int oreveinAttempts; /** + * Control number of attempts to place a valid orevein. If a vein wasn't placed due to height restrictions, completely in the water, etc, another attempt is tried. + */ + public static int oreveinMaxPlacementAttempts; + /** + * How wide to look for oreveins that affect a requested chunk. Trying to use oreveins larger than this will not work correctly. Increasing the size will cause additional worldgenerator lag. + */ + public static int oreveinMaxSize; + /** * Not really Constants, but they set using the Config and therefore should be constant (those are for the Debug Mode) */ public static boolean D1 = false, D2 = false; @@ -149,4 +157,4 @@ public class GT_Values { * If you have to give something a World Parameter but there is no World... (Dummy World) */ public static World DW; -} \ No newline at end of file +} diff --git a/src/main/java/gregtech/api/world/GT_Worldgen.java b/src/main/java/gregtech/api/world/GT_Worldgen.java index e464c475f1..2fdb637e87 100644 --- a/src/main/java/gregtech/api/world/GT_Worldgen.java +++ b/src/main/java/gregtech/api/world/GT_Worldgen.java @@ -34,6 +34,10 @@ public abstract class GT_Worldgen { return false; } + 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; + } + /** * @param aWorld The World Object * @param aRandom The Random Generator to use -- cgit From 5cc6156d221f92b0226152a705b1da17e5177866 Mon Sep 17 00:00:00 2001 From: Richard Hendricks Date: Mon, 13 Nov 2017 03:32:02 -0600 Subject: Cascading worldgen is being caused by something in other worldgen, possibly small ores or stones? Don't know for sure, need to investigate. --- src/main/java/gregtech/api/world/GT_Worldgen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api') 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 } /** -- cgit From e15136ba1a3cf7cc110dedb776428b97ece94faa Mon Sep 17 00:00:00 2001 From: Richard Hendricks Date: Wed, 15 Nov 2017 01:35:17 -0600 Subject: Feature complete. Ready for testing in multiple dimensions. --- src/main/java/gregtech/api/enums/GT_Values.java | 6 +++++- src/main/java/gregtech/api/world/GT_Worldgen.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api') diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index d4b98fd291..a9af1bb266 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -153,7 +153,11 @@ public class GT_Values { * Debug parameter for small ore generation. */ public static boolean debugSmallOres = false; - /** + /** + * Debug parameter for stones generation. + */ + public static boolean debugStones = false; + /** * If you have to give something a World Parameter but there is no World... (Dummy World) */ public static World DW; diff --git a/src/main/java/gregtech/api/world/GT_Worldgen.java b/src/main/java/gregtech/api/world/GT_Worldgen.java index fb202b5a82..0b73ac7331 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 4; // This is for the empryOrevein + return 4; // This is for the empty Orevein } /** -- cgit From 8ddd0b37555b5e106c0ae228fe4dbea18889ceed Mon Sep 17 00:00:00 2001 From: Richard Hendricks Date: Thu, 16 Nov 2017 23:15:30 -0600 Subject: Remove tabs, replace with spaces --- src/main/java/gregtech/api/enums/GT_Values.java | 76 ++++++++++++------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'src/main/java/gregtech/api') diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index a9af1bb266..b2408affe5 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -117,47 +117,47 @@ public class GT_Values { * For Internal Usage (Network) */ public static IGT_NetworkHandler NW; - /** - * Control percentage of filled 3x3 chunks. Lower number means less oreveins spawn - */ - public static int oreveinPercentage; - /** - * Control number of attempts to find a valid orevein. Generally this maximum limit isn't hit, selecting a vein is cheap - */ - public static int oreveinAttempts; - /** - * Control number of attempts to place a valid orevein. If a vein wasn't placed due to height restrictions, completely in the water, etc, another attempt is tried. - */ - public static int oreveinMaxPlacementAttempts; - /** - * How wide to look for oreveins that affect a requested chunk. Trying to use oreveins larger than this will not work correctly. Increasing the size will cause additional worldgenerator lag. - */ - public static int oreveinMaxSize; - /** + /** + * Control percentage of filled 3x3 chunks. Lower number means less oreveins spawn + */ + public static int oreveinPercentage; + /** + * Control number of attempts to find a valid orevein. Generally this maximum limit isn't hit, selecting a vein is cheap + */ + public static int oreveinAttempts; + /** + * Control number of attempts to place a valid orevein. If a vein wasn't placed due to height restrictions, completely in the water, etc, another attempt is tried. + */ + public static int oreveinMaxPlacementAttempts; + /** + * How wide to look for oreveins that affect a requested chunk. Trying to use oreveins larger than this will not work correctly. Increasing the size will cause additional worldgenerator lag. + */ + public static int oreveinMaxSize; + /** * Not really Constants, but they set using the Config and therefore should be constant (those are for the Debug Mode) */ public static boolean D1 = false, D2 = false; - /** - * Debug parameter for cleanroom testing. - */ - public static boolean debugCleanroom = false; - /** - * Debug parameter for world generation. Tracks chunks added/removed from run queue. - */ - public static boolean debugWorldGen = false; - /** - * Debug parameter for orevein generation. - */ - public static boolean debugOrevein = false; - /** - * Debug parameter for small ore generation. - */ - public static boolean debugSmallOres = false; - /** - * Debug parameter for stones generation. - */ - public static boolean debugStones = false; - /** + /** + * Debug parameter for cleanroom testing. + */ + public static boolean debugCleanroom = false; + /** + * Debug parameter for world generation. Tracks chunks added/removed from run queue. + */ + public static boolean debugWorldGen = false; + /** + * Debug parameter for orevein generation. + */ + public static boolean debugOrevein = false; + /** + * Debug parameter for small ore generation. + */ + public static boolean debugSmallOres = false; + /** + * Debug parameter for stones generation. + */ + public static boolean debugStones = false; + /** * If you have to give something a World Parameter but there is no World... (Dummy World) */ public static World DW; -- cgit From 11ffc12143d6faa3ff8b877c30c6545431243d76 Mon Sep 17 00:00:00 2001 From: Richard Hendricks Date: Mon, 20 Nov 2017 18:41:20 -0600 Subject: Removed oreveinSize to use a hardcoded value for now, until we can do per-dimension setup. Other minor fixes --- src/main/java/gregtech/api/enums/GT_Values.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api') diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index b2408affe5..94d268fd58 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -131,8 +131,9 @@ public class GT_Values { public static int oreveinMaxPlacementAttempts; /** * How wide to look for oreveins that affect a requested chunk. Trying to use oreveins larger than this will not work correctly. Increasing the size will cause additional worldgenerator lag. + * Disabled for now, using 64 in Deep Dark, 32 elsewhere */ - public static int oreveinMaxSize; + // public static int oreveinMaxSize; /** * Not really Constants, but they set using the Config and therefore should be constant (those are for the Debug Mode) */ -- cgit