diff --git a/core b/core index c1375f7a1..acc5e7af9 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit c1375f7a10eb2b17e1c46cfef18ad9db92bfbe59 +Subproject commit acc5e7af9896b60d00ce90914576edeff69491d5 diff --git a/src/main/java/com/seibel/lod/forge/ForgeConfig.java b/src/main/java/com/seibel/lod/forge/ForgeConfig.java index a38d15666..6bdd0ff1e 100644 --- a/src/main/java/com/seibel/lod/forge/ForgeConfig.java +++ b/src/main/java/com/seibel/lod/forge/ForgeConfig.java @@ -51,6 +51,7 @@ import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.I import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IGraphics.IFogQuality; import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IGraphics.IQuality; import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton.IClient.IWorldGenerator; +import com.seibel.lod.forge.wrappers.VersionConstants; import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -61,7 +62,7 @@ import net.minecraftforge.fml.config.ModConfig; * This handles any configuration the user has access to. * @author Leonardo Amato * @author James Seibel - * @version 12-1-2021 + * @version 12-11-2021 */ @Mod.EventBusSubscriber public class ForgeConfig @@ -270,7 +271,7 @@ public class ForgeConfig distanceGenerationMode = builder .comment("\n\n" - + IWorldGenerator.DISTANCE_GENERATION_MODE_DESC) + + IWorldGenerator.getDistanceGenerationModeDesc(VersionConstants.INSTANCE)) .defineEnum("Distance Generation Mode", IWorldGenerator.DISTANCE_GENERATION_MODE_DEFAULT); allowUnstableFeatureGeneration = builder diff --git a/src/main/java/com/seibel/lod/forge/wrappers/ForgeDependencySetup.java b/src/main/java/com/seibel/lod/forge/wrappers/ForgeDependencySetup.java index 678163b9d..9d22d63a4 100644 --- a/src/main/java/com/seibel/lod/forge/wrappers/ForgeDependencySetup.java +++ b/src/main/java/com/seibel/lod/forge/wrappers/ForgeDependencySetup.java @@ -3,6 +3,7 @@ package com.seibel.lod.forge.wrappers; 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.config.ILodConfigWrapperSingleton; @@ -20,7 +21,7 @@ import com.seibel.lod.forge.wrappers.minecraft.MinecraftWrapper; * are loaded. * * @author James Seibel - * @version 11-20-2021 + * @version 12-11-2021 */ public class ForgeDependencySetup { @@ -31,6 +32,7 @@ public class ForgeDependencySetup SingletonHandler.bind(IMinecraftWrapper.class, MinecraftWrapper.INSTANCE); SingletonHandler.bind(IMinecraftRenderWrapper.class, MinecraftRenderWrapper.INSTANCE); SingletonHandler.bind(IWrapperFactory.class, WrapperFactory.INSTANCE); + SingletonHandler.bind(IVersionConstants.class, VersionConstants.INSTANCE); SingletonHandler.bind(IReflectionHandler.class, ReflectionHandler.createSingleton(MinecraftWrapper.INSTANCE.getOptions().getClass().getDeclaredFields(), MinecraftWrapper.INSTANCE.getOptions())); } diff --git a/src/main/java/com/seibel/lod/forge/wrappers/VersionConstants.java b/src/main/java/com/seibel/lod/forge/wrappers/VersionConstants.java new file mode 100644 index 000000000..7c50ae61d --- /dev/null +++ b/src/main/java/com/seibel/lod/forge/wrappers/VersionConstants.java @@ -0,0 +1,46 @@ +package com.seibel.lod.forge.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; + } + } + +}