diff --git a/src/main/java/biomesoplenty/api/biome/BOPBiome.java b/src/main/java/biomesoplenty/api/biome/BOPBiome.java index 7ad91f654..7cc17f9c8 100644 --- a/src/main/java/biomesoplenty/api/biome/BOPBiome.java +++ b/src/main/java/biomesoplenty/api/biome/BOPBiome.java @@ -30,6 +30,10 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome private GenerationManager generationManager = new GenerationManager(); private Map weightMap = new HashMap(); + // defaults + public int skyColor = -1; // -1 indicates the default skyColor by temperature will be used + public boolean hasBiomeEssence = true; + public BOPBiome() { super(-1, false); @@ -55,7 +59,12 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome this.maxHeight = conf.getFloat("variation", this.maxHeight); this.temperature = conf.getFloat("temperature", this.temperature); this.rainfall = conf.getFloat("rainfall", this.rainfall); + this.color = conf.getInt("color",this.color); this.waterColorMultiplier = conf.getInt("waterColorMultiplier", this.waterColorMultiplier); + this.enableRain = conf.getBool("enableRain", this.enableRain); + this.enableSnow = conf.getBool("enableSnow", this.enableSnow); + this.skyColor = conf.getInt("skyColor", this.skyColor); + this.hasBiomeEssence = conf.getBool("hasBiomeEssence", this.hasBiomeEssence); // Allow weights to be overridden IConfigObj confWeights = conf.getObject("weights"); @@ -201,6 +210,12 @@ public class BOPBiome extends BiomeGenBase implements IExtendedBiome // whether or not a biome essence item corresponding to this biome should be able to drop from biome blocks public boolean hasBiomeEssence() { - return true; + return this.hasBiomeEssence; + } + + @Override + public int getSkyColorByTemp(float temperature) + { + return (this.skyColor == -1) ? super.getSkyColorByTemp(temperature) : this.skyColor; } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java index b68e16f6a..4a200482f 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java @@ -13,7 +13,6 @@ import net.minecraftforge.common.BiomeManager.BiomeType; import biomesoplenty.api.biome.BOPBiome; import biomesoplenty.api.biome.generation.GeneratorStage; import biomesoplenty.api.block.BOPBlocks; -import biomesoplenty.common.config.MiscConfigurationHandler; import biomesoplenty.common.world.feature.GeneratorOreSingle; public class BiomeGenCrag extends BOPBiome @@ -34,16 +33,9 @@ public class BiomeGenCrag extends BOPBiome this.topBlock = BOPBlocks.crag_rock.getDefaultState(); this.fillerBlock = BOPBlocks.crag_rock.getDefaultState(); this.waterColorMultiplier = 944693; + this.skyColor = 4944498; this.addGenerator("emeralds", GeneratorStage.SAND, new GeneratorOreSingle(Blocks.emerald_ore.getDefaultState(), 12, 4, 32)); } - @Override - public int getSkyColorByTemp(float temperature) - { - if (MiscConfigurationHandler.skyColors) - return 4944498; - - return super.getSkyColorByTemp(temperature); - } } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOriginValley.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOriginValley.java index 83dcec39b..d04b80f49 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOriginValley.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOriginValley.java @@ -19,7 +19,6 @@ import biomesoplenty.common.block.BlockBOPFlower; import biomesoplenty.common.block.BlockBOPGrass; import biomesoplenty.common.block.BlockBOPLeaves; import biomesoplenty.common.block.BlockBOPGrass.BOPGrassType; -import biomesoplenty.common.config.MiscConfigurationHandler; import biomesoplenty.common.enums.BOPFlowers; import biomesoplenty.common.enums.BOPTrees; import biomesoplenty.common.world.feature.GeneratorFlora; @@ -34,6 +33,7 @@ public class BiomeGenOriginValley extends BOPBiome this.setHeight(biomeHeight); this.setColor(10341485); this.setTemperatureRainfall(0.7F, 0.8F); + this.skyColor = 8441086; this.addWeight(BiomeType.WARM, 1); @@ -60,12 +60,4 @@ public class BiomeGenOriginValley extends BOPBiome return 3866368; } - @Override - public int getSkyColorByTemp(float temperature) - { - if (MiscConfigurationHandler.skyColors) - return 8441086; - - return super.getSkyColorByTemp(temperature); - } } diff --git a/src/main/java/biomesoplenty/common/config/MiscConfigurationHandler.java b/src/main/java/biomesoplenty/common/config/MiscConfigurationHandler.java index 5ac52aa43..de08fa6a2 100644 --- a/src/main/java/biomesoplenty/common/config/MiscConfigurationHandler.java +++ b/src/main/java/biomesoplenty/common/config/MiscConfigurationHandler.java @@ -16,9 +16,6 @@ import net.minecraftforge.common.config.Configuration; public class MiscConfigurationHandler { public static Configuration config; - - //TODO: Remove this in favour of making it configurable per biome - public static boolean skyColors; public static boolean useBoPWorldTypeDefault; public static boolean overrideTitlePanorama; @@ -30,8 +27,6 @@ public class MiscConfigurationHandler try { config.load(); - - skyColors = config.getBoolean("Enable Sky Colors", "Enhancements", true, "Use the built-in sky colours defined for various biomes."); //TODO: Make this default to true once all biomes have been implemented useBoPWorldTypeDefault = config.getBoolean("Default to BoP World Type", "GUI Settings", false, "Use the Biomes O' Plenty World Type by default when selecting a world.");