diff --git a/CHANGELOG.MD b/CHANGELOG.MD index f596a59..e07cfd4 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,3 +1,7 @@ +# 1.3.143 +* Added support for Serene Seasons + * All relevant settings in the parameters of each biome + # 1.3.142 **Attention: for the correct operation of biome temperatures on planets, go to: `Enviromine menu - Custom Editor - Profile settings - default_settings.cfg - Config - Generate Defaults - true`** diff --git a/README.md b/README.md index 4bb8ca1..f9d80ca 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,32 @@ -## EnviroMine ~~for Galaxy Odyssey~~ continuation +## EnviroMine continuation #### based on [EnviroMine for Galaxy Odyssey](https://gitgud.io/AstroTibs/enviromine-for-galaxy-odyssey) by [AstroTibs](https://gitgud.io/AstroTibs) +## IMPORTANT: +**For most things in this mod to work correctly, do the following: `Enviromine menu - Custom Editor - Profile settings - default_settings.cfg - Config - Generate Defaults - true`** + +**Please note, this is a very long process! may take up to 30 minutes of real time if you are using a large modpack** ## Physics for blocks is disabled by default! -#### To use it, go to: `Enviromine menu -> Custom editor -> Profile settings -> default_settings.cfg -> general -> Enable Physics -> true`, -#### then go to: `Profile settings -> default_settings.cfg -> Config -> Generate Blank Configs` and `Generate Defaults -> true` (both) -#### Please note, this is a very long process! may take up to 30 minutes of real time if you are using a large modpack +**To use it, go to: `Enviromine menu -> Custom editor -> Profile settings -> default_settings.cfg -> general -> Enable Physics -> true`,** ## Differences from the Galaxy Odyssey version: -#### 1) more sanity debuffs (due to the fact that sanity in the original enviromine does almost nothing dangerous (+, from 1.3.134 version, if your sanity is less than or equal to 5 (but greater than 0) you will die from a heart attack after 1 minute, but if your sanity is 0, then you will die after 30 seconds, and, if more than 30 seconds have passed and your sanity has JUST dropped to 0, you will die instantly(configurable + you can disable death, but instead, some debuffs will become of a higher level)) +1) more sanity debuffs (due to the fact that sanity in the original enviromine does almost nothing dangerous (+, if your sanity is less than or equal to 5 you will die from a heart attack after 1 minute (configurable + you can disable death, but instead, some debuffs will become of a higher level)) -### 2) Compatibility with Hbm's Nuclear Tech filters/masks/protective helmets +2) Compatibility with Hbm's Nuclear Tech filters/masks/protective helmets -### 3) Updated build script, thanks to GTNH! +3) Updated build script, thanks to GTNH! -### 4) Fixed a bug where the sound of the gas mask was played even when the game was paused +4) Fixed a bug where the sound of the gas mask was played even when the game was paused -### 5) Added a bunch of configs +5) Added a bunch of configs -### 6) Completely rewritten biome temperature system +6) Completely rewritten biome temperature system -### 7) Completely rewritte armor temperature system +7) Completely rewritte armor temperature system -### 8) Added compat with Hbm's NTM Space (fork) +8) Added compat with Hbm's NTM Space (fork) # Credits: diff --git a/build.gradle b/build.gradle index d1bf9ad..13beb5b 100644 --- a/build.gradle +++ b/build.gradle @@ -3,4 +3,4 @@ plugins { id 'com.gtnewhorizons.gtnhconvention' } -version = "1.3.142" +version = "1.3.143" diff --git a/src/main/java/enviromine/core/EM_Settings.java b/src/main/java/enviromine/core/EM_Settings.java index 6a9cc36..f962d2b 100644 --- a/src/main/java/enviromine/core/EM_Settings.java +++ b/src/main/java/enviromine/core/EM_Settings.java @@ -32,7 +32,7 @@ public class EM_Settings public static File worldDir = null; //Mod Data - public static final String VERSION = "1.3.142" + " kotmatross edition"; + public static final String VERSION = "1.3.143" + " kotmatross edition"; public static final String MOD_ID = "enviromine"; public static final String MOD_NAME = "EnviroMine"; public static final String MOD_NAME_COLORIZED = EnumChatFormatting.AQUA + MOD_NAME + EnumChatFormatting.RESET; diff --git a/src/main/java/enviromine/core/EnviroMine.java b/src/main/java/enviromine/core/EnviroMine.java index 3775604..79365e5 100644 --- a/src/main/java/enviromine/core/EnviroMine.java +++ b/src/main/java/enviromine/core/EnviroMine.java @@ -73,6 +73,10 @@ public static boolean isTCLoaded() { return Loader.isModLoaded("Thaumcraft"); } + public static boolean isSereneSeasonsLoaded() { + return Loader.isModLoaded("sereneseasons"); + } + //public static EM_WorldData theWorldEM; @EventHandler diff --git a/src/main/java/enviromine/handlers/EM_StatusManager.java b/src/main/java/enviromine/handlers/EM_StatusManager.java index b43d63b..4f91fa7 100644 --- a/src/main/java/enviromine/handlers/EM_StatusManager.java +++ b/src/main/java/enviromine/handlers/EM_StatusManager.java @@ -58,6 +58,8 @@ import net.minecraftforge.common.EnumPlantType; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; +import sereneseasons.api.season.Season; +import sereneseasons.api.season.SeasonHelper; import java.lang.reflect.Method; import java.util.HashMap; @@ -508,6 +510,21 @@ public static float[] getSurroundingData(EntityLivingBase entityLiving, int cube float biome_DUSK_TEMPERATURE_TERRAFORMED = 4F; float biome_NIGHT_TEMPERATURE_TERRAFORMED = 8F; + + float biome_EARLY_SPRING_TEMPERATURE_DECREASE = 5.0F; + float biome_MID_SPRING_TEMPERATURE_DECREASE = -2.0F; + float biome_LATE_SPRING_TEMPERATURE_DECREASE = -1.0F; + float biome_EARLY_SUMMER_TEMPERATURE_DECREASE = -1.0F; + float biome_MID_SUMMER_TEMPERATURE_DECREASE = -3.0F; + float biome_LATE_SUMMER_TEMPERATURE_DECREASE = -1.0F; + float biome_EARLY_AUTUMN_TEMPERATURE_DECREASE = 6.0F; + float biome_MID_AUTUMN_TEMPERATURE_DECREASE = 8.0F; + float biome_LATE_AUTUMN_TEMPERATURE_DECREASE = 10.0F; + float biome_EARLY_WINTER_TEMPERATURE_DECREASE = 12.0F; + float biome_MID_WINTER_TEMPERATURE_DECREASE = 16.0F; + float biome_LATE_WINTER_TEMPERATURE_DECREASE = 10.0F; + + if (biome != null) { BiomeProperties biomeOverride = null; if (BiomeProperties.base.hasProperty(biome)) { @@ -527,6 +544,19 @@ public static float[] getSurroundingData(EntityLivingBase entityLiving, int cube biome_DAY_TEMPERATURE_TERRAFORMED = biomeOverride.DAY_TEMPERATURE_TERRAFORMED; biome_DUSK_TEMPERATURE_TERRAFORMED = biomeOverride.DUSK_TEMPERATURE_TERRAFORMED; biome_NIGHT_TEMPERATURE_TERRAFORMED = biomeOverride.NIGHT_TEMPERATURE_TERRAFORMED; + + biome_EARLY_SPRING_TEMPERATURE_DECREASE = biomeOverride.EARLY_SPRING_TEMPERATURE_DECREASE; + biome_MID_SPRING_TEMPERATURE_DECREASE = biomeOverride.MID_SPRING_TEMPERATURE_DECREASE; + biome_LATE_SPRING_TEMPERATURE_DECREASE = biomeOverride.LATE_SPRING_TEMPERATURE_DECREASE; + biome_EARLY_SUMMER_TEMPERATURE_DECREASE = biomeOverride.EARLY_SUMMER_TEMPERATURE_DECREASE; + biome_MID_SUMMER_TEMPERATURE_DECREASE = biomeOverride.MID_SUMMER_TEMPERATURE_DECREASE; + biome_LATE_SUMMER_TEMPERATURE_DECREASE = biomeOverride.LATE_SUMMER_TEMPERATURE_DECREASE; + biome_EARLY_AUTUMN_TEMPERATURE_DECREASE = biomeOverride.EARLY_AUTUMN_TEMPERATURE_DECREASE; + biome_MID_AUTUMN_TEMPERATURE_DECREASE = biomeOverride.MID_AUTUMN_TEMPERATURE_DECREASE; + biome_LATE_AUTUMN_TEMPERATURE_DECREASE = biomeOverride.LATE_AUTUMN_TEMPERATURE_DECREASE; + biome_EARLY_WINTER_TEMPERATURE_DECREASE = biomeOverride.EARLY_WINTER_TEMPERATURE_DECREASE; + biome_MID_WINTER_TEMPERATURE_DECREASE = biomeOverride.MID_WINTER_TEMPERATURE_DECREASE; + biome_LATE_WINTER_TEMPERATURE_DECREASE = biomeOverride.LATE_WINTER_TEMPERATURE_DECREASE; } } @@ -552,23 +582,46 @@ public static float[] getSurroundingData(EntityLivingBase entityLiving, int cube temperatureChange = calculateTemperatureChange(currentTime % 24000L, biome_DAWN_TEMPERATURE, biome_DAY_TEMPERATURE, biome_DUSK_TEMPERATURE, biome_NIGHT_TEMPERATURE); } - biomeTemperature -= temperatureChange; if (biome.rainfall <= 0F || isDesertBiome) { biomeTemperature -= temperatureChange * DesertBiomeTemperatureMultiplier; + } else { + biomeTemperature -= temperatureChange; } - if(EnviroMine.isHbmSpaceLoaded()) { + if(EnviroMine.isSereneSeasonsLoaded()) { + Season.SubSeason currentSubSeason = SeasonHelper.getSeasonState(entityLiving.worldObj).getSubSeason(); + if(currentSubSeason != null) { + switch (currentSubSeason) { + case EARLY_SPRING -> biomeTemperature -= biome_EARLY_SPRING_TEMPERATURE_DECREASE; + case MID_SPRING -> biomeTemperature -= biome_MID_SPRING_TEMPERATURE_DECREASE; + case LATE_SPRING -> biomeTemperature -= biome_LATE_SPRING_TEMPERATURE_DECREASE; + + case EARLY_SUMMER -> biomeTemperature -= biome_EARLY_SUMMER_TEMPERATURE_DECREASE; + case MID_SUMMER -> biomeTemperature -= biome_MID_SUMMER_TEMPERATURE_DECREASE; + case LATE_SUMMER -> biomeTemperature -= biome_LATE_SUMMER_TEMPERATURE_DECREASE; + + case EARLY_AUTUMN -> biomeTemperature -= biome_EARLY_AUTUMN_TEMPERATURE_DECREASE; + case MID_AUTUMN -> biomeTemperature -= biome_MID_AUTUMN_TEMPERATURE_DECREASE; + case LATE_AUTUMN -> biomeTemperature -= biome_LATE_AUTUMN_TEMPERATURE_DECREASE; + + case EARLY_WINTER -> biomeTemperature -= biome_EARLY_WINTER_TEMPERATURE_DECREASE; + case MID_WINTER -> biomeTemperature -= biome_MID_WINTER_TEMPERATURE_DECREASE; + case LATE_WINTER -> biomeTemperature -= biome_LATE_WINTER_TEMPERATURE_DECREASE; + } + } + } - ThreeInts pos = new ThreeInts((int)entityLiving.posX, (int)(entityLiving.posY + entityLiving.getEyeHeight()), (int)entityLiving.posZ); - //List nearbyBlobs = ChunkAtmosphereManager.proxy.getBlobsWithinRadius(entityLiving.worldObj, pos, 3); - //I still don't understand why there are other access modifiers besides public? - List nearbyBlobs = getBlobsWithinRadius(ChunkAtmosphereManager.proxy, entityLiving.worldObj, pos, 256); - //List blobs = ChunkAtmosphereManager.proxy.getBlobs(entityLiving.worldObj, (int)entityLiving.posX, (int)((float)entityLiving.posY + entityLiving.getEyeHeight()), (int)entityLiving.posZ); - for(AtmosphereBlob blob : nearbyBlobs) { - if(blob.hasFluid(Fluids.AIR, 0.19) || blob.hasFluid(Fluids.OXYGEN, 0.09)) { + if(EnviroMine.isHbmSpaceLoaded()) { + if(entityLiving.ticksExisted % 20 == 0) { + ThreeInts pos = new ThreeInts((int) entityLiving.posX, (int) (entityLiving.posY), (int) entityLiving.posZ); + //I still don't understand why there are other access modifiers besides public? + List nearbyBlobs = getBlobsWithinRadius(ChunkAtmosphereManager.proxy, entityLiving.worldObj, pos, 256); + for (AtmosphereBlob blob : nearbyBlobs) { + if (blob.hasFluid(Fluids.AIR, 0.19) || blob.hasFluid(Fluids.OXYGEN, 0.09)) { biomeTemperature = 24; //TODO HARDCODED } } + } } } diff --git a/src/main/java/enviromine/trackers/properties/BiomeProperties.java b/src/main/java/enviromine/trackers/properties/BiomeProperties.java index bbf4e39..354ce25 100644 --- a/src/main/java/enviromine/trackers/properties/BiomeProperties.java +++ b/src/main/java/enviromine/trackers/properties/BiomeProperties.java @@ -58,16 +58,27 @@ public class BiomeProperties implements SerialisableProperty, PropertyBase public float TemperatureThunderDecrease; public boolean TemperatureRainBool; public boolean TemperatureThunderBool; - public float TemperatureShadeDecrease; - public float ambientTemp_TERRAFORMED; public float DAWN_TEMPERATURE_TERRAFORMED; public float DAY_TEMPERATURE_TERRAFORMED; public float DUSK_TEMPERATURE_TERRAFORMED; public float NIGHT_TEMPERATURE_TERRAFORMED; + public float EARLY_SPRING_TEMPERATURE_DECREASE; + public float EARLY_SUMMER_TEMPERATURE_DECREASE; + public float EARLY_WINTER_TEMPERATURE_DECREASE; + public float EARLY_AUTUMN_TEMPERATURE_DECREASE; + public float MID_SPRING_TEMPERATURE_DECREASE; + public float MID_SUMMER_TEMPERATURE_DECREASE; + public float MID_WINTER_TEMPERATURE_DECREASE; + public float MID_AUTUMN_TEMPERATURE_DECREASE; + public float LATE_SPRING_TEMPERATURE_DECREASE; + public float LATE_SUMMER_TEMPERATURE_DECREASE; + public float LATE_WINTER_TEMPERATURE_DECREASE; + public float LATE_AUTUMN_TEMPERATURE_DECREASE; + public BiomeProperties(NBTTagCompound tags) { this.ReadFromNBT(tags); @@ -110,7 +121,20 @@ public BiomeProperties ( float DAWN_TEMPERATURE_TERRAFORMED, float DAY_TEMPERATURE_TERRAFORMED, float DUSK_TEMPERATURE_TERRAFORMED, - float NIGHT_TEMPERATURE_TERRAFORMED + float NIGHT_TEMPERATURE_TERRAFORMED, + + float EARLY_SPRING_TEMPERATURE_DECREASE, + float EARLY_SUMMER_TEMPERATURE_DECREASE, + float EARLY_WINTER_TEMPERATURE_DECREASE, + float EARLY_AUTUMN_TEMPERATURE_DECREASE, + float MID_SPRING_TEMPERATURE_DECREASE, + float MID_SUMMER_TEMPERATURE_DECREASE, + float MID_WINTER_TEMPERATURE_DECREASE, + float MID_AUTUMN_TEMPERATURE_DECREASE, + float LATE_SPRING_TEMPERATURE_DECREASE, + float LATE_SUMMER_TEMPERATURE_DECREASE, + float LATE_WINTER_TEMPERATURE_DECREASE, + float LATE_AUTUMN_TEMPERATURE_DECREASE ) { this.id = id; this.biomeOveride = biomeOveride; @@ -140,6 +164,19 @@ public BiomeProperties ( this.DAY_TEMPERATURE_TERRAFORMED = DAY_TEMPERATURE_TERRAFORMED; this.DUSK_TEMPERATURE_TERRAFORMED = DUSK_TEMPERATURE_TERRAFORMED; this.NIGHT_TEMPERATURE_TERRAFORMED = NIGHT_TEMPERATURE_TERRAFORMED; + + this.EARLY_SPRING_TEMPERATURE_DECREASE = EARLY_SPRING_TEMPERATURE_DECREASE; + this.EARLY_SUMMER_TEMPERATURE_DECREASE = EARLY_SUMMER_TEMPERATURE_DECREASE; + this.EARLY_WINTER_TEMPERATURE_DECREASE = EARLY_WINTER_TEMPERATURE_DECREASE; + this.EARLY_AUTUMN_TEMPERATURE_DECREASE = EARLY_AUTUMN_TEMPERATURE_DECREASE; + this.MID_SPRING_TEMPERATURE_DECREASE = MID_SPRING_TEMPERATURE_DECREASE; + this.MID_SUMMER_TEMPERATURE_DECREASE = MID_SUMMER_TEMPERATURE_DECREASE; + this.MID_WINTER_TEMPERATURE_DECREASE = MID_WINTER_TEMPERATURE_DECREASE; + this.MID_AUTUMN_TEMPERATURE_DECREASE = MID_AUTUMN_TEMPERATURE_DECREASE; + this.LATE_SPRING_TEMPERATURE_DECREASE = LATE_SPRING_TEMPERATURE_DECREASE; + this.LATE_SUMMER_TEMPERATURE_DECREASE = LATE_SUMMER_TEMPERATURE_DECREASE; + this.LATE_WINTER_TEMPERATURE_DECREASE = LATE_WINTER_TEMPERATURE_DECREASE; + this.LATE_AUTUMN_TEMPERATURE_DECREASE = LATE_AUTUMN_TEMPERATURE_DECREASE; } /** * hasProperty(BiomeGenBase biome)

@@ -213,6 +250,20 @@ public NBTTagCompound WriteToNBT() tags.setFloat("DUSK_TEMPERATURE_TERRAFORMED", this.DUSK_TEMPERATURE_TERRAFORMED); tags.setFloat("NIGHT_TEMPERATURE_TERRAFORMED", this.NIGHT_TEMPERATURE_TERRAFORMED); + + tags.setFloat("EARLY_SPRING_TEMPERATURE_DECREASE", this.EARLY_SPRING_TEMPERATURE_DECREASE); + tags.setFloat("EARLY_SUMMER_TEMPERATURE_DECREASE", this.EARLY_SUMMER_TEMPERATURE_DECREASE); + tags.setFloat("EARLY_WINTER_TEMPERATURE_DECREASE", this.EARLY_WINTER_TEMPERATURE_DECREASE); + tags.setFloat("EARLY_AUTUMN_TEMPERATURE_DECREASE", this.EARLY_AUTUMN_TEMPERATURE_DECREASE); + tags.setFloat("MID_SPRING_TEMPERATURE_DECREASE", this.MID_SPRING_TEMPERATURE_DECREASE); + tags.setFloat("MID_SUMMER_TEMPERATURE_DECREASE", this.MID_SUMMER_TEMPERATURE_DECREASE); + tags.setFloat("MID_WINTER_TEMPERATURE_DECREASE", this.MID_WINTER_TEMPERATURE_DECREASE); + tags.setFloat("MID_AUTUMN_TEMPERATURE_DECREASE", this.MID_AUTUMN_TEMPERATURE_DECREASE); + tags.setFloat("LATE_SPRING_TEMPERATURE_DECREASE", this.LATE_SPRING_TEMPERATURE_DECREASE); + tags.setFloat("LATE_SUMMER_TEMPERATURE_DECREASE", this.LATE_SUMMER_TEMPERATURE_DECREASE); + tags.setFloat("LATE_WINTER_TEMPERATURE_DECREASE", this.LATE_WINTER_TEMPERATURE_DECREASE); + tags.setFloat("LATE_AUTUMN_TEMPERATURE_DECREASE", this.LATE_AUTUMN_TEMPERATURE_DECREASE); + return tags; } @@ -245,6 +296,20 @@ public void ReadFromNBT(NBTTagCompound tags) this.DAY_TEMPERATURE_TERRAFORMED = tags.getFloat("DAY_TEMPERATURE_TERRAFORMED"); this.DUSK_TEMPERATURE_TERRAFORMED = tags.getFloat("DUSK_TEMPERATURE_TERRAFORMED"); this.NIGHT_TEMPERATURE_TERRAFORMED = tags.getFloat("NIGHT_TEMPERATURE_TERRAFORMED"); + + this.EARLY_SPRING_TEMPERATURE_DECREASE = tags.getFloat("EARLY_SPRING_TEMPERATURE_DECREASE"); + this.EARLY_SUMMER_TEMPERATURE_DECREASE = tags.getFloat("EARLY_SUMMER_TEMPERATURE_DECREASE"); + this.EARLY_WINTER_TEMPERATURE_DECREASE = tags.getFloat("EARLY_WINTER_TEMPERATURE_DECREASE"); + this.EARLY_AUTUMN_TEMPERATURE_DECREASE = tags.getFloat("EARLY_AUTUMN_TEMPERATURE_DECREASE"); + + this.MID_SPRING_TEMPERATURE_DECREASE = tags.getFloat("MID_SPRING_TEMPERATURE_DECREASE"); + this.MID_SUMMER_TEMPERATURE_DECREASE = tags.getFloat("MID_SUMMER_TEMPERATURE_DECREASE"); + this.MID_WINTER_TEMPERATURE_DECREASE = tags.getFloat("MID_WINTER_TEMPERATURE_DECREASE"); + this.MID_AUTUMN_TEMPERATURE_DECREASE = tags.getFloat("MID_AUTUMN_TEMPERATURE_DECREASE"); + this.LATE_SPRING_TEMPERATURE_DECREASE = tags.getFloat("LATE_SPRING_TEMPERATURE_DECREASE"); + this.LATE_SUMMER_TEMPERATURE_DECREASE = tags.getFloat("LATE_SUMMER_TEMPERATURE_DECREASE"); + this.LATE_WINTER_TEMPERATURE_DECREASE = tags.getFloat("LATE_WINTER_TEMPERATURE_DECREASE"); + this.LATE_AUTUMN_TEMPERATURE_DECREASE = tags.getFloat("LATE_AUTUMN_TEMPERATURE_DECREASE"); } @Override @@ -275,23 +340,36 @@ public void LoadProperty(Configuration config, String category) boolean isDesertBiome = config.get(category, BOName[8], false).getBoolean(false); float DesertBiomeTemperatureMultiplier = (float)config.get(category, BOName[9], 1.0).getDouble(1.0); - float DAWN_TEMPERATURE = (float)config.get(category, BOName[10], 4.0).getDouble(4.0); - float DAY_TEMPERATURE = (float)config.get(category, BOName[11], 0.0).getDouble(0.0); - float DUSK_TEMPERATURE = (float)config.get(category, BOName[12], 4.0).getDouble(4.0); + float DAWN_TEMPERATURE = (float)config.get(category, BOName[10], 4.0).getDouble(4.0); + float DAY_TEMPERATURE = (float)config.get(category, BOName[11], 0.0).getDouble(0.0); + float DUSK_TEMPERATURE = (float)config.get(category, BOName[12], 4.0).getDouble(4.0); float NIGHT_TEMPERATURE = (float)config.get(category, BOName[13], 8.0).getDouble(8.0); float TemperatureRainDecrease = (float)config.get(category, BOName[14], 6.0).getDouble(6.0); float TemperatureThunderDecrease = (float)config.get(category, BOName[15], 8.0).getDouble(8.0); - boolean TemperatureRainBool = config.get(category, BOName[16], false).getBoolean(false); - boolean TemperatureThunderBool = config.get(category, BOName[17], false).getBoolean(false); + boolean TemperatureRainBool = config.get(category, BOName[16], true).getBoolean(true); + boolean TemperatureThunderBool = config.get(category, BOName[17], true).getBoolean(true); float TemperatureShadeDecrease = (float)config.get(category, BOName[18], 2.5).getDouble(2.5); - float ambientTemp_TERRAFORMED = (float)config.get(category, BOName[19], 25.0).getDouble(25.0); - float DAWN_TEMPERATURE_TERRAFORMED = (float)config.get(category, BOName[20], 4.0).getDouble(4.0); - float DAY_TEMPERATURE_TERRAFORMED = (float)config.get(category, BOName[21], 0.0).getDouble(0.0); - float DUSK_TEMPERATURE_TERRAFORMED = (float)config.get(category, BOName[22], 4.0).getDouble(4.0); - float NIGHT_TEMPERATURE_TERRAFORMED = (float)config.get(category, BOName[23], 8.0).getDouble(8.0); + float ambientTemp_TERRAFORMED = (float)config.get(category, BOName[19], 25.0).getDouble(25.0); + float DAWN_TEMPERATURE_TERRAFORMED = (float)config.get(category, BOName[20], 4.0).getDouble(4.0); + float DAY_TEMPERATURE_TERRAFORMED = (float)config.get(category, BOName[21], 0.0).getDouble(0.0); + float DUSK_TEMPERATURE_TERRAFORMED = (float)config.get(category, BOName[22], 4.0).getDouble(4.0); + float NIGHT_TEMPERATURE_TERRAFORMED = (float)config.get(category, BOName[23], 8.0).getDouble(8.0); + + float EARLY_SPRING_TEMPERATURE_DECREASE = (float)config.get(category, BOName[24], 5.0).getDouble(5.0); + float EARLY_SUMMER_TEMPERATURE_DECREASE = (float)config.get(category, BOName[25], -1.0).getDouble(-1.0); + float EARLY_WINTER_TEMPERATURE_DECREASE = (float)config.get(category, BOName[26], 12.0).getDouble(12.0); + float EARLY_AUTUMN_TEMPERATURE_DECREASE = (float)config.get(category, BOName[27], 6.0).getDouble(6.0); + float MID_SPRING_TEMPERATURE_DECREASE = (float)config.get(category, BOName[28], -2.0).getDouble(-2.0); + float MID_SUMMER_TEMPERATURE_DECREASE = (float)config.get(category, BOName[29], -3.0).getDouble(-3.0); + float MID_WINTER_TEMPERATURE_DECREASE = (float)config.get(category, BOName[30], 15.0).getDouble(15.0); + float MID_AUTUMN_TEMPERATURE_DECREASE = (float)config.get(category, BOName[31], 8.0).getDouble(8.0); + float LATE_SPRING_TEMPERATURE_DECREASE = (float)config.get(category, BOName[32], -1.0).getDouble(-1.0); + float LATE_SUMMER_TEMPERATURE_DECREASE = (float)config.get(category, BOName[33], -1.0).getDouble(-1.0); + float LATE_WINTER_TEMPERATURE_DECREASE = (float)config.get(category, BOName[34], 10.0).getDouble(10.0); + float LATE_AUTUMN_TEMPERATURE_DECREASE = (float)config.get(category, BOName[35], 10.0).getDouble(10.0); BiomeProperties entry = new BiomeProperties ( id, @@ -318,7 +396,19 @@ public void LoadProperty(Configuration config, String category) DAWN_TEMPERATURE_TERRAFORMED, DAY_TEMPERATURE_TERRAFORMED, DUSK_TEMPERATURE_TERRAFORMED, - NIGHT_TEMPERATURE_TERRAFORMED + NIGHT_TEMPERATURE_TERRAFORMED, + EARLY_SPRING_TEMPERATURE_DECREASE, + EARLY_SUMMER_TEMPERATURE_DECREASE, + EARLY_WINTER_TEMPERATURE_DECREASE, + EARLY_AUTUMN_TEMPERATURE_DECREASE, + MID_SPRING_TEMPERATURE_DECREASE, + MID_SUMMER_TEMPERATURE_DECREASE, + MID_WINTER_TEMPERATURE_DECREASE, + MID_AUTUMN_TEMPERATURE_DECREASE, + LATE_SPRING_TEMPERATURE_DECREASE, + LATE_SUMMER_TEMPERATURE_DECREASE, + LATE_WINTER_TEMPERATURE_DECREASE, + LATE_AUTUMN_TEMPERATURE_DECREASE ); if(EM_Settings.biomeProperties.containsKey(id) && !EM_ConfigHandler.loadedConfigs.contains(filename)) @@ -358,7 +448,21 @@ public void SaveProperty(Configuration config, String category) config.get(category, BOName[21], this.DAY_TEMPERATURE_TERRAFORMED, "Biome temperature will decrease by this amount at day if the planet is terraformed").getDouble(this.DAY_TEMPERATURE_TERRAFORMED); config.get(category, BOName[22], this.DUSK_TEMPERATURE_TERRAFORMED, "Biome temperature will decrease by this amount at dusk if the planet is terraformed").getDouble(this.DUSK_TEMPERATURE_TERRAFORMED); config.get(category, BOName[23], this.NIGHT_TEMPERATURE_TERRAFORMED, "Biome temperature will decrease by this amount at midnight if the planet is terraformed").getDouble(this.NIGHT_TEMPERATURE_TERRAFORMED); - } + + config.get(category, BOName[24], this.EARLY_SPRING_TEMPERATURE_DECREASE, "Biome temperature will decrease by this amount at early spring").getDouble(this.EARLY_SPRING_TEMPERATURE_DECREASE); + config.get(category, BOName[25], this.EARLY_SUMMER_TEMPERATURE_DECREASE, "Biome temperature will decrease by this amount at early summer").getDouble(this.EARLY_SUMMER_TEMPERATURE_DECREASE); + config.get(category, BOName[26], this.EARLY_WINTER_TEMPERATURE_DECREASE, "Biome temperature will decrease by this amount at early winter").getDouble(this.EARLY_WINTER_TEMPERATURE_DECREASE); + config.get(category, BOName[27], this.EARLY_AUTUMN_TEMPERATURE_DECREASE, "Biome temperature will decrease by this amount at early autumn").getDouble(this.EARLY_AUTUMN_TEMPERATURE_DECREASE); + config.get(category, BOName[28], this.MID_SPRING_TEMPERATURE_DECREASE, "Biome temperature will decrease by this amount at mid spring").getDouble(this.MID_SPRING_TEMPERATURE_DECREASE); + config.get(category, BOName[29], this.MID_SUMMER_TEMPERATURE_DECREASE, "Biome temperature will decrease by this amount at mid summer").getDouble(this.MID_SUMMER_TEMPERATURE_DECREASE); + config.get(category, BOName[30], this.MID_WINTER_TEMPERATURE_DECREASE, "Biome temperature will decrease by this amount at mid winter").getDouble(this.MID_WINTER_TEMPERATURE_DECREASE); + config.get(category, BOName[31], this.MID_AUTUMN_TEMPERATURE_DECREASE, "Biome temperature will decrease by this amount at mid autumn").getDouble(this.MID_AUTUMN_TEMPERATURE_DECREASE); + config.get(category, BOName[32], this.LATE_SPRING_TEMPERATURE_DECREASE, "Biome temperature will decrease by this amount at late spring").getDouble(this.LATE_SPRING_TEMPERATURE_DECREASE); + config.get(category, BOName[33], this.LATE_SUMMER_TEMPERATURE_DECREASE, "Biome temperature will decrease by this amount at late summer").getDouble(this.LATE_SUMMER_TEMPERATURE_DECREASE); + config.get(category, BOName[34], this.LATE_WINTER_TEMPERATURE_DECREASE, "Biome temperature will decrease by this amount at late winter").getDouble(this.LATE_WINTER_TEMPERATURE_DECREASE); + config.get(category, BOName[35], this.LATE_AUTUMN_TEMPERATURE_DECREASE, "Biome temperature will decrease by this amount at late autumn").getDouble(this.LATE_AUTUMN_TEMPERATURE_DECREASE); + + } @Override public void GenDefaults() @@ -422,8 +526,8 @@ public void generateEmpty(Configuration config, Object obj) double TemperatureRainDecrease = typeList.contains(Type.WATER) ? 8D : typeList.contains(Type.JUNGLE)? 2D : 6D; double TemperatureThunderDecrease = typeList.contains(Type.WATER) ? 10D : typeList.contains(Type.JUNGLE)? 4D : 8D; - boolean TemperatureRainBool = typeList.contains(Type.WATER) || typeList.contains(Type.WET) || typeList.contains(Type.JUNGLE) || (typeList.contains(Type.FOREST) && typeList.contains(Type.WET)) || (typeList.contains(Type.FOREST) && !typeList.contains(Type.COLD)) || (typeList.contains(Type.PLAINS) && !typeList.contains(Type.HOT)); - boolean TemperatureThunderBool = typeList.contains(Type.WATER) || typeList.contains(Type.WET) || typeList.contains(Type.JUNGLE) || (typeList.contains(Type.FOREST) && typeList.contains(Type.WET)) || (typeList.contains(Type.FOREST) && !typeList.contains(Type.COLD)); + //boolean TemperatureRainBool = typeList.contains(Type.WATER) || typeList.contains(Type.WET) || typeList.contains(Type.JUNGLE) || (typeList.contains(Type.FOREST) && typeList.contains(Type.WET)) || (typeList.contains(Type.FOREST) && !typeList.contains(Type.COLD)) || (typeList.contains(Type.PLAINS) && !typeList.contains(Type.HOT)); + //boolean TemperatureThunderBool = typeList.contains(Type.WATER) || typeList.contains(Type.WET) || typeList.contains(Type.JUNGLE) || (typeList.contains(Type.FOREST) && typeList.contains(Type.WET)) || (typeList.contains(Type.FOREST) && !typeList.contains(Type.COLD)); double TemperatureShadeDecrease = /*typeList.contains(Type.WATER) ? 12D : typeList.contains(Type.JUNGLE)? 10D :*/ 2.5D; String biomeWater = EnviroUtils.getBiomeWater(biome); @@ -440,6 +544,92 @@ public void generateEmpty(Configuration config, Object obj) double DUSK_TEMPERATURE_TERRAFORMED; double NIGHT_TEMPERATURE_TERRAFORMED; + + double EARLY_SPRING_TEMPERATURE_DECREASE = + (typeList.contains(Type.HOT) && typeList.contains(Type.SANDY)) ? -3.0 : //DESERT (-8 (DEFAULT+8)) + typeList.contains(Type.JUNGLE) ? 0.0 : //JUNGLE (-5 (DEFAULT+5)) + typeList.contains(Type.HOT) ? 3.0 : //ELSE HOT (SAVANNA) (-2 (DEFAULT+2C)) + typeList.contains(Type.CONIFEROUS) ? 7.0 : //TAIGA (+2 (DEFAULT-2C)) + 5.0; //DEFAULT (0) + + double MID_SPRING_TEMPERATURE_DECREASE = + (typeList.contains(Type.HOT) && typeList.contains(Type.SANDY)) ? -10.0 : // DESERT (-8 (DEFAULT+8)) + typeList.contains(Type.JUNGLE) ? -7.0 : // JUNGLE (-5 (DEFAULT+5)) + typeList.contains(Type.HOT) ? -4.0 : // ELSE HOT (SAVANNA) (-2 (DEFAULT+2)) + typeList.contains(Type.CONIFEROUS) ? 0.0 : // TAIGA (+2 (DEFAULT-2)) + -2.0; // DEFAULT (0) + + double LATE_SPRING_TEMPERATURE_DECREASE = + (typeList.contains(Type.HOT) && typeList.contains(Type.SANDY)) ? -9.0 : // DESERT (-8 (DEFAULT+8)) + typeList.contains(Type.JUNGLE) ? -6.0 : // JUNGLE (-5 (DEFAULT+5)) + typeList.contains(Type.HOT) ? -3.0 : // ELSE HOT (SAVANNA) (-2 (DEFAULT+2)) + typeList.contains(Type.CONIFEROUS) ? 1.0 : // TAIGA (+2 (DEFAULT-2)) + -1.0; // DEFAULT (0) + + double EARLY_SUMMER_TEMPERATURE_DECREASE = + (typeList.contains(Type.HOT) && typeList.contains(Type.SANDY)) ? -9.0 : // DESERT (-8 (DEFAULT+8)) + typeList.contains(Type.JUNGLE) ? -6.0 : // JUNGLE (-5 (DEFAULT+5)) + typeList.contains(Type.HOT) ? -3.0 : // ELSE HOT (SAVANNA) (-2 (DEFAULT+2)) + typeList.contains(Type.CONIFEROUS) ? 1.0 : // TAIGA (+2 (DEFAULT-2)) + -1.0; // DEFAULT (0) + + double MID_SUMMER_TEMPERATURE_DECREASE = + (typeList.contains(Type.HOT) && typeList.contains(Type.SANDY)) ? -11.0 : // DESERT (-8 (DEFAULT+8)) + typeList.contains(Type.JUNGLE) ? -8.0 : // JUNGLE (-5 (DEFAULT+5)) + typeList.contains(Type.HOT) ? -5.0 : // ELSE HOT (SAVANNA) (-2 (DEFAULT+2)) + typeList.contains(Type.CONIFEROUS) ? -1.0 : // TAIGA (+2 (DEFAULT-2)) + -3.0; // DEFAULT (0) + + double LATE_SUMMER_TEMPERATURE_DECREASE = + (typeList.contains(Type.HOT) && typeList.contains(Type.SANDY)) ? -9.0 : // DESERT (-8 (DEFAULT+8)) + typeList.contains(Type.JUNGLE) ? -6.0 : // JUNGLE (-5 (DEFAULT+5)) + typeList.contains(Type.HOT) ? -3.0 : // ELSE HOT (SAVANNA) (-2 (DEFAULT+2)) + typeList.contains(Type.CONIFEROUS) ? 1.0 : // TAIGA (+2 (DEFAULT-2)) + -1.0; // DEFAULT (0) + + double EARLY_AUTUMN_TEMPERATURE_DECREASE = + (typeList.contains(Type.HOT) && typeList.contains(Type.SANDY)) ? -2.0 : // DESERT (-8 (DEFAULT+8)) + typeList.contains(Type.JUNGLE) ? 1.0 : // JUNGLE (-5 (DEFAULT+5)) + typeList.contains(Type.HOT) ? 4.0 : // ELSE HOT (SAVANNA) (-2 (DEFAULT+2)) + typeList.contains(Type.CONIFEROUS) ? 8.0 : // TAIGA (+2 (DEFAULT-2)) + 6.0; // DEFAULT (0) + + double MID_AUTUMN_TEMPERATURE_DECREASE = + (typeList.contains(Type.HOT) && typeList.contains(Type.SANDY)) ? 0.0 : // DESERT (-8 (DEFAULT+8)) + typeList.contains(Type.JUNGLE) ? 3.0 : // JUNGLE (-5 (DEFAULT+5)) + typeList.contains(Type.HOT) ? 6.0 : // ELSE HOT (SAVANNA) (-2 (DEFAULT+2)) + typeList.contains(Type.CONIFEROUS) ? 10.0 : // TAIGA (+2 (DEFAULT-2)) + 8.0; // DEFAULT (0) + + double LATE_AUTUMN_TEMPERATURE_DECREASE = + (typeList.contains(Type.HOT) && typeList.contains(Type.SANDY)) ? -2.0 : // DESERT (-8 (DEFAULT+8)) + typeList.contains(Type.JUNGLE) ? 5.0 : // JUNGLE (-5 (DEFAULT+5)) + typeList.contains(Type.HOT) ? 8.0 : // ELSE HOT (SAVANNA) (-2 (DEFAULT+2)) + typeList.contains(Type.CONIFEROUS) ? 12.0 : // TAIGA (+2 (DEFAULT-2)) + 10.0; // DEFAULT (0) + + double EARLY_WINTER_TEMPERATURE_DECREASE = + (typeList.contains(Type.HOT) && typeList.contains(Type.SANDY)) ? 4.0 : // DESERT (-8 (DEFAULT+8)) + typeList.contains(Type.JUNGLE) ? 7.0 : // JUNGLE (-5 (DEFAULT+5)) + typeList.contains(Type.HOT) ? 10.0 : // ELSE HOT (SAVANNA) (-2 (DEFAULT+2)) + typeList.contains(Type.CONIFEROUS) ? 14.0 : // TAIGA (+2 (DEFAULT-2)) + 12.0; // DEFAULT (0) + + double MID_WINTER_TEMPERATURE_DECREASE = + (typeList.contains(Type.HOT) && typeList.contains(Type.SANDY)) ? 8.0 : // DESERT (-8 (DEFAULT+8)) + typeList.contains(Type.JUNGLE) ? 11.0 : // JUNGLE (-5 (DEFAULT+5)) + typeList.contains(Type.HOT) ? 14.0 : // ELSE HOT (SAVANNA) (-2 (DEFAULT+2))) + typeList.contains(Type.CONIFEROUS) ? 18.0 : // TAIGA (+2 (DEFAULT-2)) + 16.0; // DEFAULT (0) + + double LATE_WINTER_TEMPERATURE_DECREASE = + (typeList.contains(Type.HOT) && typeList.contains(Type.SANDY)) ? 2.0 : // DESERT (-8 (DEFAULT+8)) + typeList.contains(Type.JUNGLE) ? 5.0 : // JUNGLE (-5 (DEFAULT+5)) + typeList.contains(Type.HOT) ? 8.0 : // ELSE HOT (SAVANNA) (-2 (DEFAULT+2)) + typeList.contains(Type.CONIFEROUS) ? 12.0 : // TAIGA (+2 (DEFAULT-2)) + 10.0; // DEFAULT (0) + + if(EnviroMine.isHbmSpaceLoaded()) { if (biome instanceof BiomeGenBaseMoho) { DAWN_TEMPERATURE = 75D; @@ -616,7 +806,8 @@ else if(biome instanceof BiomeGenBaseDuna) { NIGHT_TEMPERATURE_TERRAFORMED = 8D; ambientTemp_TERRAFORMED = EnviroUtils.getBiomeTemp(biome); } - } else { + } + else { DAWN_TEMPERATURE = 4D; DAY_TEMPERATURE = 0D; DUSK_TEMPERATURE = 4D; @@ -660,6 +851,19 @@ else if(biome instanceof BiomeGenBaseDuna) { config.get(catName, BOName[21], DAY_TEMPERATURE_TERRAFORMED).getDouble(DAY_TEMPERATURE_TERRAFORMED); config.get(catName, BOName[22], DUSK_TEMPERATURE_TERRAFORMED).getDouble(DUSK_TEMPERATURE_TERRAFORMED); config.get(catName, BOName[23], NIGHT_TEMPERATURE_TERRAFORMED).getDouble(NIGHT_TEMPERATURE_TERRAFORMED); + + config.get(catName, BOName[24], EARLY_SPRING_TEMPERATURE_DECREASE).getDouble(EARLY_SPRING_TEMPERATURE_DECREASE); + config.get(catName, BOName[25], EARLY_SUMMER_TEMPERATURE_DECREASE).getDouble(EARLY_SUMMER_TEMPERATURE_DECREASE); + config.get(catName, BOName[26], EARLY_WINTER_TEMPERATURE_DECREASE).getDouble(EARLY_WINTER_TEMPERATURE_DECREASE); + config.get(catName, BOName[27], EARLY_AUTUMN_TEMPERATURE_DECREASE).getDouble(EARLY_AUTUMN_TEMPERATURE_DECREASE); + config.get(catName, BOName[28], MID_SPRING_TEMPERATURE_DECREASE).getDouble(MID_SPRING_TEMPERATURE_DECREASE); + config.get(catName, BOName[29], MID_SUMMER_TEMPERATURE_DECREASE).getDouble(MID_SUMMER_TEMPERATURE_DECREASE); + config.get(catName, BOName[30], MID_WINTER_TEMPERATURE_DECREASE).getDouble(MID_WINTER_TEMPERATURE_DECREASE); + config.get(catName, BOName[31], MID_AUTUMN_TEMPERATURE_DECREASE).getDouble(MID_AUTUMN_TEMPERATURE_DECREASE); + config.get(catName, BOName[32], LATE_SPRING_TEMPERATURE_DECREASE).getDouble(LATE_SPRING_TEMPERATURE_DECREASE); + config.get(catName, BOName[33], LATE_SUMMER_TEMPERATURE_DECREASE).getDouble(LATE_SUMMER_TEMPERATURE_DECREASE); + config.get(catName, BOName[34], LATE_WINTER_TEMPERATURE_DECREASE).getDouble(LATE_WINTER_TEMPERATURE_DECREASE); + config.get(catName, BOName[35], LATE_AUTUMN_TEMPERATURE_DECREASE).getDouble(LATE_AUTUMN_TEMPERATURE_DECREASE); } @Override @@ -675,7 +879,7 @@ public void customLoad() static { - BOName = new String[24]; + BOName = new String[36]; BOName[0] = "01.Biome ID"; BOName[1] = "02.Allow Config Override"; BOName[2] = "03.Water Quality"; @@ -695,10 +899,22 @@ public void customLoad() BOName[16] = "17.Should biome temperature decrease when rain?"; BOName[17] = "18.Should biome temperature decrease when thunder?"; BOName[18] = "19.Biome temperature shadow decrease"; - BOName[19] = "20.Ambient Temperature terraformed"; - BOName[20] = "21.Dawn biome temperature decrease terraformed"; - BOName[21] = "22.Day biome temperature decrease terraformed"; - BOName[22] = "23.Dusk biome temperature decrease terraformed"; - BOName[23] = "24.Night biome temperature decrease terraformed"; + BOName[19] = "20.[HBM] Ambient Temperature terraformed"; + BOName[20] = "21.[HBM] Dawn biome temperature decrease terraformed"; + BOName[21] = "22.[HBM] Day biome temperature decrease terraformed"; + BOName[22] = "23.[HBM] Dusk biome temperature decrease terraformed"; + BOName[23] = "24.[HBM] Night biome temperature decrease terraformed"; + BOName[24] = "25.[Serene Seasons] Early spring biome temperature decrease"; + BOName[25] = "26.[Serene Seasons] Early summer biome temperature decrease"; + BOName[26] = "27.[Serene Seasons] Early winter biome temperature decrease"; + BOName[27] = "28.[Serene Seasons] Early autumn biome temperature decrease"; + BOName[28] = "29.[Serene Seasons] Mid spring biome temperature decrease"; + BOName[29] = "30.[Serene Seasons] Mid summer biome temperature decrease"; + BOName[30] = "31.[Serene Seasons] Mid winter biome temperature decrease"; + BOName[31] = "32.[Serene Seasons] Mid autumn biome temperature decrease"; + BOName[32] = "33.[Serene Seasons] Late spring biome temperature decrease"; + BOName[33] = "34.[Serene Seasons] Late summer biome temperature decrease"; + BOName[34] = "35.[Serene Seasons] Late winter biome temperature decrease"; + BOName[35] = "36.[Serene Seasons] Late autumn biome temperature decrease"; } }