Skip to content

Commit

Permalink
Adjust seasonal temperature for tropical biomes during mid wet/dry se…
Browse files Browse the repository at this point in the history
…ason
  • Loading branch information
Forstride committed Dec 30, 2023
1 parent b347c1d commit ed0f31a
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions forge/src/main/java/toughasnails/init/ModCompatibility.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,28 @@ private static TemperatureLevel seasonModifier(Level level, BlockPos pos, Temper
if (pos.getY() <= ModConfig.temperature.environmentalModifierAltitude && !level.canSeeSky(pos))
return current;

//Check if biome uses seasonal effects
// Check if biome uses seasonal effects
if (biome.is(ModTags.Biomes.BLACKLISTED_BIOMES))
return current;

// Don't adjust the season if tropical seasons are in use
Season.TropicalSeason tropicalSeason = SeasonHelper.getSeasonState(level).getTropicalSeason();

// Adjust for mid dry/wet season
if (biome.is(ModTags.Biomes.TROPICAL_BIOMES))
{
switch (tropicalSeason)
{
case MID_DRY:
current = current.increment(1);
break;

case MID_WET:
current = current.decrement(1);
break;
}

return current;
}

Season season = SeasonHelper.getSeasonState(level).getSeason();

Expand Down

0 comments on commit ed0f31a

Please sign in to comment.