remove unimplemented world generator modes

specifically: BIOME_ONLY, BIOME_ONLY_SIMULATE_HEIGHT, and FULL
This commit is contained in:
James Seibel
2023-08-18 15:55:32 -05:00
parent 56c8441daf
commit ef21987817
3 changed files with 33 additions and 94 deletions
@@ -21,11 +21,8 @@ package com.seibel.distanthorizons.api.enums.worldGeneration;
/**
* PRE_EXISTING_ONLY <br>
* BIOME_ONLY <br>
* BIOME_ONLY_SIMULATE_HEIGHT <br>
* SURFACE <br>
* FEATURES <br>
* FULL <br><br>
* FEATURES <br><br>
*
* In order of fastest to slowest.
*
@@ -44,100 +41,46 @@ public enum EDhApiDistantGeneratorMode
/** Don't generate any new terrain, just generate LODs for already generated chunks. */
PRE_EXISTING_ONLY((byte) 1),
/**
/*
* Not currently implemented <br><br>
*
* Only generate the biomes and use biome
* grass/foliage color, water color, or ice color
* to generate the color. <br>
* Doesn't generate height, everything is shown at sea level. <br>
* Multithreaded - Fastest (2-5 ms)
* Doesn't generate height, everything is shown at sea level.
*/
BIOME_ONLY((byte) 2),
//BIOME_ONLY((byte) 2),
/**
/*
* Not currently implemented <br><br>
*
* Same as BIOME_ONLY, except instead
* of always using sea level as the LOD height
* different biome types (mountain, ocean, forest, etc.)
* use predetermined heights to simulate having height data.
*/
BIOME_ONLY_SIMULATE_HEIGHT((byte) 3),
//BIOME_ONLY_SIMULATE_HEIGHT((byte) 3),
/**
* Generate the world surface,
* this does NOT include caves, trees,
* or structures. <br>
* Multithreaded - Faster (10-20 ms)
* or structures.
*/
SURFACE((byte) 4),
/**
* Generate including structures.
* NOTE: This may cause world generation bugs or instability,
* since some features can cause concurrentModification exceptions. <br>
* Multithreaded - Fast (15-20 ms)
* since some features can cause concurrentModification exceptions.
*/
FEATURES((byte) 5),
/**
* Ask the server to generate/load each chunk.
* This is the most compatible, but causes server/simulation lag.
* This will also show player made structures if you
* are adding the mod on a pre-existing world. <br>
* Single-threaded - Slow (15-50 ms, with spikes up to 200 ms)
*/
FULL((byte) 6);
FEATURES((byte) 5);
public static final EDhApiDistantGeneratorMode RENDERABLE = EDhApiDistantGeneratorMode.BIOME_ONLY;
/** The higher the number the more complete the generation is. */
public final byte complexity;
EDhApiDistantGeneratorMode(byte complexity) { this.complexity = complexity; }
/** returns null if out of range */
public static EDhApiDistantGeneratorMode previous(EDhApiDistantGeneratorMode mode)
{
switch (mode)
{
case FULL:
return EDhApiDistantGeneratorMode.FEATURES;
case FEATURES:
return EDhApiDistantGeneratorMode.SURFACE;
case SURFACE:
return EDhApiDistantGeneratorMode.BIOME_ONLY_SIMULATE_HEIGHT;
case BIOME_ONLY_SIMULATE_HEIGHT:
return EDhApiDistantGeneratorMode.BIOME_ONLY;
case BIOME_ONLY:
return EDhApiDistantGeneratorMode.PRE_EXISTING_ONLY;
case PRE_EXISTING_ONLY:
default:
return null;
}
}
/** returns null if out of range */
public static EDhApiDistantGeneratorMode next(EDhApiDistantGeneratorMode mode)
{
switch (mode)
{
case FEATURES:
return EDhApiDistantGeneratorMode.FULL;
case SURFACE:
return EDhApiDistantGeneratorMode.FEATURES;
case BIOME_ONLY_SIMULATE_HEIGHT:
return EDhApiDistantGeneratorMode.SURFACE;
case BIOME_ONLY:
return EDhApiDistantGeneratorMode.BIOME_ONLY_SIMULATE_HEIGHT;
case PRE_EXISTING_ONLY:
return EDhApiDistantGeneratorMode.BIOME_ONLY;
case FULL:
default:
return null;
}
}
}
@@ -622,29 +622,28 @@ public class Config
+ EDhApiDistantGeneratorMode.PRE_EXISTING_ONLY + " \n"
+ "Only create LOD data for already generated chunks. \n"
+ "\n"
+ EDhApiDistantGeneratorMode.BIOME_ONLY + " \n"
+ "Only generate the biomes and use the biome's \n"
+ "grass color, water color, or snow color. \n"
+ "Doesn't generate height, everything is shown at sea level. \n"
+ "- Fastest \n"
+ "\n"
+ EDhApiDistantGeneratorMode.BIOME_ONLY_SIMULATE_HEIGHT + " \n"
+ "Same as " + EDhApiDistantGeneratorMode.BIOME_ONLY + ", except instead \n"
+ "of always using sea level as the LOD height \n"
+ "different biome types (mountain, ocean, forest, etc.) \n"
+ "use predetermined heights to simulate having height data. \n"
+ "- Fastest \n"
//not currently implemented
//+ EDhApiDistantGeneratorMode.BIOME_ONLY + " \n"
//+ "Only generate the biomes and use the biome's \n"
//+ "grass color, water color, or snow color. \n"
//+ "Doesn't generate height, everything is shown at sea level. \n"
//+ "- Fastest \n"
//+ "\n"
//+ EDhApiDistantGeneratorMode.BIOME_ONLY_SIMULATE_HEIGHT + " \n"
//+ "Same as " + EDhApiDistantGeneratorMode.BIOME_ONLY + ", except instead \n"
//+ "of always using sea level as the LOD height \n"
//+ "different biome types (mountain, ocean, forest, etc.) \n"
//+ "use predetermined heights to simulate having height data. \n"
//+ "- Fastest \n"
+ "\n"
+ EDhApiDistantGeneratorMode.SURFACE + " \n"
+ "Generate the world surface, \n"
+ "this does NOT include trees, \n"
+ "or structures. \n"
+ "- Faster \n"
+ "\n"
+ EDhApiDistantGeneratorMode.FEATURES + " \n"
+ "Generate everything except structures. \n"
+ "WARNING: This may cause world generator bugs or instability when paired with certain world generator mods. \n"
+ "- Fast \n"
+ "")
/*
// FULL isn't currently implemented
@@ -112,20 +112,17 @@ public class BatchGenerator implements IDhApiWorldGenerator
EDhApiWorldGenerationStep targetStep = null;
switch (generatorMode)
{
case PRE_EXISTING_ONLY:
targetStep = EDhApiWorldGenerationStep.EMPTY; // NOTE: Only load in existing chunks. No new chunk generation
break;
case BIOME_ONLY:
targetStep = EDhApiWorldGenerationStep.BIOMES; // NOTE: No blocks. Require fake height in LodBuilder
break;
case BIOME_ONLY_SIMULATE_HEIGHT:
targetStep = EDhApiWorldGenerationStep.NOISE; // NOTE: Stone only. Require fake surface
case PRE_EXISTING_ONLY: // Only load in existing chunks. Note: this requires the biome generation step in order for biomes to be properly initialized.
//case BIOME_ONLY: // No blocks. Require fake height in LodBuilder
targetStep = EDhApiWorldGenerationStep.BIOMES;
break;
//case BIOME_ONLY_SIMULATE_HEIGHT:
// targetStep = EDhApiWorldGenerationStep.NOISE; // Stone only. Requires a fake surface
// break;
case SURFACE:
targetStep = EDhApiWorldGenerationStep.SURFACE; // Carvers or Surface???
targetStep = EDhApiWorldGenerationStep.SURFACE;
break;
case FEATURES:
case FULL:
targetStep = EDhApiWorldGenerationStep.FEATURES;
break;
}