Replace all WorldGenStep Enums with the API version
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.seibel.lod.core.dataObjects.fullData;
|
||||
|
||||
import com.seibel.lod.core.dataObjects.transformers.FullToColumnTransformer;
|
||||
import com.seibel.lod.core.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.lod.core.wrapperInterfaces.IWrapperFactory;
|
||||
import com.seibel.lod.core.wrapperInterfaces.block.IBlockStateWrapper;
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
package com.seibel.lod.core.enums.worldGeneration;
|
||||
|
||||
/**
|
||||
* EMPTY, <br>
|
||||
* STRUCTURE_START, <br>
|
||||
* STRUCTURE_REFERENCE, <br>
|
||||
* BIOMES, <br>
|
||||
* NOISE, <br>
|
||||
* SURFACE, <br>
|
||||
* CARVERS, <br>
|
||||
* LIQUID_CARVERS, <br>
|
||||
* FEATURES, <br>
|
||||
* LIGHT, <br>
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2022-7-25
|
||||
*/
|
||||
public enum EWorldGenerationStep
|
||||
{
|
||||
EMPTY,
|
||||
STRUCTURE_START,
|
||||
STRUCTURE_REFERENCE,
|
||||
BIOMES,
|
||||
NOISE,
|
||||
SURFACE,
|
||||
CARVERS,
|
||||
LIQUID_CARVERS,
|
||||
FEATURES,
|
||||
LIGHT,
|
||||
}
|
||||
@@ -20,6 +20,7 @@
|
||||
package com.seibel.lod.core.generation;
|
||||
|
||||
import com.seibel.lod.api.enums.worldGeneration.EDhApiWorldGenThreadMode;
|
||||
import com.seibel.lod.api.enums.worldGeneration.EDhApiWorldGenerationStep;
|
||||
import com.seibel.lod.api.interfaces.override.worldGenerator.IDhApiWorldGenerator;
|
||||
import com.seibel.lod.core.interfaces.dependencyInjection.IOverrideInjector;
|
||||
import com.seibel.lod.core.level.IDhLevel;
|
||||
@@ -31,8 +32,7 @@ import com.seibel.lod.core.util.BitShiftUtil;
|
||||
import com.seibel.lod.core.util.LodUtil;
|
||||
import com.seibel.lod.core.wrapperInterfaces.IWrapperFactory;
|
||||
import com.seibel.lod.core.wrapperInterfaces.chunk.IChunkWrapper;
|
||||
import com.seibel.lod.core.wrapperInterfaces.worldGeneration.AbstractBatchGenerationEnvionmentWrapper;
|
||||
import com.seibel.lod.core.wrapperInterfaces.worldGeneration.AbstractBatchGenerationEnvionmentWrapper.EGenerationStep;
|
||||
import com.seibel.lod.core.wrapperInterfaces.worldGeneration.AbstractBatchGenerationEnvironmentWrapper;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
@@ -47,7 +47,7 @@ public class BatchGenerator implements IDhApiWorldGenerator
|
||||
private static final IWrapperFactory FACTORY = SingletonInjector.INSTANCE.get(IWrapperFactory.class);
|
||||
private static final Logger LOGGER = DhLoggerBuilder.getLogger();
|
||||
|
||||
public AbstractBatchGenerationEnvionmentWrapper generationGroup;
|
||||
public AbstractBatchGenerationEnvironmentWrapper generationGroup;
|
||||
public IDhLevel targetDhLevel;
|
||||
|
||||
|
||||
@@ -98,24 +98,24 @@ public class BatchGenerator implements IDhApiWorldGenerator
|
||||
@Override
|
||||
public CompletableFuture<Void> generateChunks(int chunkPosMinX, int chunkPosMinZ, byte granularity, byte targetDataDetail, EDhApiDistantGeneratorMode generatorMode, Consumer<Object[]> resultConsumer)
|
||||
{
|
||||
EGenerationStep targetStep = null;
|
||||
EDhApiWorldGenerationStep targetStep = null;
|
||||
switch (generatorMode)
|
||||
{
|
||||
case PRE_EXISTING_ONLY:
|
||||
targetStep = EGenerationStep.Empty; // NOTE: Only load in existing chunks. No new chunk generation
|
||||
targetStep = EDhApiWorldGenerationStep.EMPTY; // NOTE: Only load in existing chunks. No new chunk generation
|
||||
break;
|
||||
case BIOME_ONLY:
|
||||
targetStep = EGenerationStep.Biomes; // NOTE: No blocks. Require fake height in LodBuilder
|
||||
targetStep = EDhApiWorldGenerationStep.BIOMES; // NOTE: No blocks. Require fake height in LodBuilder
|
||||
break;
|
||||
case BIOME_ONLY_SIMULATE_HEIGHT:
|
||||
targetStep = EGenerationStep.Noise; // NOTE: Stone only. Require fake surface
|
||||
targetStep = EDhApiWorldGenerationStep.NOISE; // NOTE: Stone only. Require fake surface
|
||||
break;
|
||||
case SURFACE:
|
||||
targetStep = EGenerationStep.Surface; // Carvers or Surface???
|
||||
targetStep = EDhApiWorldGenerationStep.SURFACE; // Carvers or Surface???
|
||||
break;
|
||||
case FEATURES:
|
||||
case FULL:
|
||||
targetStep = EGenerationStep.Features;
|
||||
targetStep = EDhApiWorldGenerationStep.FEATURES;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.seibel.lod.core.interfaces.dependencyInjection.IBindable;
|
||||
import com.seibel.lod.core.wrapperInterfaces.block.IBlockStateWrapper;
|
||||
import com.seibel.lod.core.wrapperInterfaces.chunk.IChunkWrapper;
|
||||
import com.seibel.lod.core.wrapperInterfaces.world.IBiomeWrapper;
|
||||
import com.seibel.lod.core.wrapperInterfaces.worldGeneration.AbstractBatchGenerationEnvionmentWrapper;
|
||||
import com.seibel.lod.core.wrapperInterfaces.worldGeneration.AbstractBatchGenerationEnvironmentWrapper;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.io.IOException;
|
||||
*/
|
||||
public interface IWrapperFactory extends IBindable
|
||||
{
|
||||
AbstractBatchGenerationEnvionmentWrapper createBatchGenerator(IDhLevel targetLevel);
|
||||
AbstractBatchGenerationEnvironmentWrapper createBatchGenerator(IDhLevel targetLevel);
|
||||
IBiomeWrapper deserializeBiomeWrapper(String str) throws IOException;
|
||||
IBlockStateWrapper deserializeBlockStateWrapper(String str) throws IOException;
|
||||
IBlockStateWrapper getAirBlockStateWrapper();
|
||||
|
||||
+9
-13
@@ -19,29 +19,25 @@
|
||||
|
||||
package com.seibel.lod.core.wrapperInterfaces.worldGeneration;
|
||||
|
||||
import com.seibel.lod.api.enums.worldGeneration.EDhApiWorldGenerationStep;
|
||||
import com.seibel.lod.core.level.IDhLevel;
|
||||
import com.seibel.lod.core.wrapperInterfaces.chunk.IChunkWrapper;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public abstract class AbstractBatchGenerationEnvionmentWrapper
|
||||
public abstract class AbstractBatchGenerationEnvironmentWrapper
|
||||
{
|
||||
public enum EGenerationStep
|
||||
{
|
||||
Empty, StructureStart, StructureReference, Biomes, Noise, Surface, Carvers, LiquidCarvers, Features, Light,
|
||||
}
|
||||
|
||||
public AbstractBatchGenerationEnvionmentWrapper(IDhLevel level) { }
|
||||
|
||||
public AbstractBatchGenerationEnvironmentWrapper(IDhLevel level) { }
|
||||
|
||||
public abstract void resizeThreadPool(int newThreadCount);
|
||||
|
||||
|
||||
public abstract void updateAllFutures();
|
||||
|
||||
|
||||
public abstract int getEventCount();
|
||||
|
||||
|
||||
public abstract void stop(boolean blocking);
|
||||
|
||||
public abstract CompletableFuture<Void> generateChunks(int minX, int minZ, int genSize, EGenerationStep targetStep, double runTimeRatio, Consumer<IChunkWrapper> resultConsumer);
|
||||
|
||||
public abstract CompletableFuture<Void> generateChunks(int minX, int minZ, int genSize, EDhApiWorldGenerationStep targetStep, double runTimeRatio, Consumer<IChunkWrapper> resultConsumer);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user