diff --git a/src/main/java/CustomOreGen/Server/WorldConfig.java b/src/main/java/CustomOreGen/Server/WorldConfig.java index 49d346c0..34696982 100644 --- a/src/main/java/CustomOreGen/Server/WorldConfig.java +++ b/src/main/java/CustomOreGen/Server/WorldConfig.java @@ -50,9 +50,6 @@ public class WorldConfig public boolean debuggingMode; public boolean vanillaOreGen; public boolean custom; - public double rootHeightFactor; - public double heightVarFactor; - public double rootHeightVarFactor; private Map oreDistributions; private Map configOptions; private Map loadedOptions; @@ -93,9 +90,6 @@ private WorldConfig(File globalConfigDir, WorldInfo worldInfo, File worldBaseDir this.deferredPopulationRange = 0; this.debuggingMode = false; this.vanillaOreGen = false; - this.rootHeightFactor = 17; - this.heightVarFactor = 0; - this.rootHeightVarFactor = 0; this.oreDistributions = new LinkedHashMap(); this.configOptions = new CIStringMap(new LinkedHashMap()); this.loadedOptions = new CIStringMap(new LinkedHashMap()); @@ -193,7 +187,7 @@ private WorldConfig(File globalConfigDir, WorldInfo worldInfo, File worldBaseDir File[] optionsFileList = new File[3]; this.buildFileList(CustomOreGenBase.OPTIONS_FILENAME, optionsFileList, false); File optionsFile = optionsFileList[2]; - ConfigOption vangen, rootHeightOption, heightVarOption, rootHeightVarOption; + ConfigOption vangen; for (int defpopOption = configFileDepth; defpopOption < optionsFileList.length; ++defpopOption) { @@ -260,23 +254,6 @@ private WorldConfig(File globalConfigDir, WorldInfo worldInfo, File worldBaseDir CustomOreGenBase.log.warn("Choice Option \'" + vangen + "\' not found in config file - defaulting to \'" + this.vanillaOreGen + "\'."); } - rootHeightOption = (ConfigOption)this.configOptions.get("rootHeightFactor"); - if (rootHeightOption != null && rootHeightOption instanceof NumericOption) - { - this.rootHeightFactor = (Double)rootHeightOption.getValue(); - } - - heightVarOption = (ConfigOption)this.configOptions.get("heightVarFactor"); - if (heightVarOption != null && heightVarOption instanceof NumericOption) - { - this.heightVarFactor = (Double)heightVarOption.getValue(); - } - - rootHeightVarOption = (ConfigOption)this.configOptions.get("rootHeightVarFactor"); - if (rootHeightVarOption != null && rootHeightVarOption instanceof NumericOption) - { - this.rootHeightVarFactor = (Double)rootHeightVarOption.getValue(); - } } } diff --git a/src/main/java/CustomOreGen/Util/BiomeHeightScale.java b/src/main/java/CustomOreGen/Util/BiomeHeightScale.java index 3d2c7f9c..4f9d97ec 100644 --- a/src/main/java/CustomOreGen/Util/BiomeHeightScale.java +++ b/src/main/java/CustomOreGen/Util/BiomeHeightScale.java @@ -1,7 +1,5 @@ package CustomOreGen.Util; -import CustomOreGen.Server.ServerState; -import CustomOreGen.Server.WorldConfig; import net.minecraft.world.World; import net.minecraft.world.WorldType; import net.minecraft.world.biome.BiomeGenBase; @@ -14,19 +12,14 @@ public int getHeight(World world, int x, int z) { if (biome == null) { return new WorldHeightScale().getHeight(world, x, z); } - return this.calcBlockHeight(world, biome.rootHeight, biome.heightVariation); + return this.calcBlockHeight(world, biome.rootHeight); } - private int calcBlockHeight(World world, float rootHeight, float heightVariation) { - WorldConfig config = ServerState.getWorldConfig(world); + private int calcBlockHeight(World world, float rootHeight) { if (world.provider.terrainType == WorldType.AMPLIFIED && rootHeight > 0) { rootHeight = 1.0F + rootHeight * 2.0F; } - return (int)( - world.provider.getAverageGroundLevel() + - rootHeight * config.rootHeightFactor + - heightVariation * config.heightVarFactor + - rootHeight * heightVariation * config.rootHeightVarFactor); + return (int)(world.provider.getAverageGroundLevel() + rootHeight * 17); } @Override diff --git a/src/main/resources/config/CustomOreGen_Config_Default.xml b/src/main/resources/config/CustomOreGen_Config_Default.xml index c052d37a..dd448305 100644 --- a/src/main/resources/config/CustomOreGen_Config_Default.xml +++ b/src/main/resources/config/CustomOreGen_Config_Default.xml @@ -119,73 +119,6 @@ - - - Multiplier for rootHeight during biome height scaling - - - This is a "magic" option - it has meaning outside of - this file in the COG engine itelf. You can change the - value, but do not remove the option itself. - - Biome height scaling needs to estimate the average - height of a biome. This is non-trivial, because - terrain generation is complex and varies across biomes - and dimensions/worlds. There are two explicit - parameters: root height and height variation. The - offset from the dimension ground level is a linear - combination of those, as well as their - interaction. - - This option represents the factor for the root height. - - hidden - Root Height Factor - 0 - 128 - - - - - Multiplier for heightVariation during biome height scaling - - - This is a "magic" option - it has meaning outside of - this file in the COG engine itelf. You can change the - value, but do not remove the option itself. - - See the coment for 'rootHeightFactor'. This option - represents the factor for the height variation. - - hidden - Height Variation Factor - 0 - 128 - - - - - Multiplier for the product of the rootHeight and - heightVariation during biome height scaling - - - This is a "magic" option - it has meaning outside of - this file in the COG engine itelf. You can change the - value, but do not remove the option itself. - - See the coment for 'rootHeightFactor'. This option - represents the factor for the product (interaction) of - the root height and height variation. - - hidden - Root Height * Variation Factor - 0 - 128 - - Default wireframe state for distributions.