diff --git a/common/src/main/java/com/seibel/lod/common/Config.java b/common/src/main/java/com/seibel/lod/common/Config.java index 76fb71978..e60430260 100644 --- a/common/src/main/java/com/seibel/lod/common/Config.java +++ b/common/src/main/java/com/seibel/lod/common/Config.java @@ -30,7 +30,7 @@ import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.I /** * This handles any configuration the user has access to. * @author coolGi2007 - * @version 12-02-2021 + * @version 12-12-2021 */ public class Config extends ConfigGui { diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/DependencySetup.java b/common/src/main/java/com/seibel/lod/common/wrappers/DependencySetup.java index 4ef979c8f..0570ff653 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/DependencySetup.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/DependencySetup.java @@ -7,6 +7,7 @@ import com.seibel.lod.common.wrappers.minecraft.MinecraftWrapper; import com.seibel.lod.core.handlers.IReflectionHandler; import com.seibel.lod.core.handlers.ReflectionHandler; import com.seibel.lod.core.util.SingletonHandler; +import com.seibel.lod.core.wrapperInterfaces.IVersionConstants; import com.seibel.lod.core.wrapperInterfaces.IWrapperFactory; import com.seibel.lod.core.wrapperInterfaces.block.IBlockColorSingletonWrapper; import com.seibel.lod.core.wrapperInterfaces.minecraft.IMinecraftRenderWrapper; @@ -29,6 +30,7 @@ public class DependencySetup { SingletonHandler.bind(IMinecraftWrapper.class, MinecraftWrapper.INSTANCE); SingletonHandler.bind(IMinecraftRenderWrapper.class, MinecraftRenderWrapper.INSTANCE); SingletonHandler.bind(IReflectionHandler.class, ReflectionHandler.createSingleton(MinecraftWrapper.INSTANCE.getOptions().getClass().getDeclaredFields(), MinecraftWrapper.INSTANCE.getOptions())); + SingletonHandler.bind(IVersionConstants.class, VersionConstants.INSTANCE); } SingletonHandler.bind(IWrapperFactory.class, WrapperFactory.INSTANCE); } diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/VersionConstants.java b/common/src/main/java/com/seibel/lod/common/wrappers/VersionConstants.java new file mode 100644 index 000000000..99dbd20bb --- /dev/null +++ b/common/src/main/java/com/seibel/lod/common/wrappers/VersionConstants.java @@ -0,0 +1,39 @@ +package com.seibel.lod.common.wrappers; + +import com.seibel.lod.core.enums.config.DistanceGenerationMode; +import com.seibel.lod.core.wrapperInterfaces.IVersionConstants; + +/** + * @author James Seibel + * @version 12-11-2021 + */ +public class VersionConstants implements IVersionConstants { + public static final VersionConstants INSTANCE = new VersionConstants(); + + + private VersionConstants() { + + } + + + @Override + public int getMinimumWorldHeight() { + return 0; + } + + @Override + public boolean isWorldGeneratorSingleThreaded(DistanceGenerationMode distanceGenerationMode) { + switch (distanceGenerationMode) { + default: + case NONE: + case BIOME_ONLY: + case BIOME_ONLY_SIMULATE_HEIGHT: + case SURFACE: + case FEATURES: + return false; + + case FULL: + return true; + } + } +} \ No newline at end of file diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/WrapperFactory.java b/common/src/main/java/com/seibel/lod/common/wrappers/WrapperFactory.java index 7050be8a4..24d6ce2a8 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/WrapperFactory.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/WrapperFactory.java @@ -85,7 +85,4 @@ public class WrapperFactory implements IWrapperFactory { return new WorldGeneratorWrapper(newLodBuilder, newLodDimension, worldWrapper); } - - @Override - public boolean isWorldGeneratorSingleThreaded() {return true;} } diff --git a/core b/core index aa9e49b3e..92b6a9695 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit aa9e49b3e7f0a012396301b432daa95a69eefb5b +Subproject commit 92b6a9695da49287226f56b2706f88e24302f477