Skip to content

Commit

Permalink
Fixed crash with latest SereneSeasons version
Browse files Browse the repository at this point in the history
  • Loading branch information
supermassimo committed Oct 29, 2024
1 parent 27eb513 commit 2bd2cb8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ dependencies {
compileOnly(fg.deobf("mezz.jei:jei-$mcVersion-common-api:${property("jeiVersion")}"))
runtimeOnly(fg.deobf("mezz.jei:jei-$mcVersion-forge:${property("jeiVersion")}"))

compileOnly(fg.deobf("curse.maven:SereneSeasons-291874:${property("ssVersion")}"))
implementation(fg.deobf("curse.maven:glitchcore-955399:${property("gcVersion")}"))
implementation(fg.deobf("curse.maven:SereneSeasons-291874:${property("ssVersion")}"))

runtimeOnly(fg.deobf("vazkii.patchouli:Patchouli:${property("patchouliVersion")}"))

Expand Down
7 changes: 4 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
modName=DynamicTrees
modId=dynamictrees
modVersion=1.3.3
modVersion=1.3.4

group=com.ferreusveritas.dynamictrees

mcVersion=1.20.1
forgeVersion=47.1.3
forgeVersion=47.3.0
mappingsChannel=parchment
mappingsVersion=1.19.3-2023.03.12-1.20.1

jeiVersion=15.0.0.12
patchouliVersion=1.20.1-84-FORGE
suggestionProviderFixVersion=1.0.0
ccVersion=1.109.4
ssVersion=4761603
ssVersion=5790653
gcVersion=5787839
jadeVersion=4986594

versionType=release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import net.minecraft.world.level.biome.Biome;
import sereneseasons.api.season.Season.SubSeason;
import sereneseasons.api.season.SeasonHelper;
import sereneseasons.config.SeasonsConfig;
import sereneseasons.config.ServerConfig;
import sereneseasons.init.ModConfig;
import sereneseasons.season.SeasonHooks;

public class SereneSeasonsSeasonProvider implements SeasonProvider {
Expand All @@ -29,7 +28,7 @@ public void updateTick(Level level, long dayTime) {

@Override
public boolean shouldSnowMelt(Level level, BlockPos pos) {
if (SeasonsConfig.generateSnowAndIce.get() && seasonValue < com.ferreusveritas.dynamictrees.compat.season.SeasonHelper.WINTER) {
if (ModConfig.seasons.generateSnowAndIce && seasonValue < com.ferreusveritas.dynamictrees.compat.season.SeasonHelper.WINTER) {
Holder<Biome> biomeHolder = level.getBiome(pos);
// TODO 1.20: Reinstate Serene Seasons compat here, BiomeConfig class is gone
return /*BiomeConfig.enablesSeasonalEffects(biomeHolder) &&*/
Expand All @@ -41,7 +40,7 @@ public boolean shouldSnowMelt(Level level, BlockPos pos) {
public static void registerSereneSeasonsProvider (){
CompatHandler.registerSeasonManager(DynamicTrees.SERENE_SEASONS, () -> {
NormalSeasonManager seasonManager = new NormalSeasonManager(
world -> ServerConfig.isDimensionWhitelisted(world.dimension()) ?
world -> ModConfig.seasons.isDimensionWhitelisted(world.dimension()) ?
new Tuple<>(new SereneSeasonsSeasonProvider(), new ActiveSeasonGrowthCalculator()) :
new Tuple<>(new NullSeasonProvider(), new NullSeasonGrowthCalculator())
);
Expand Down

0 comments on commit 2bd2cb8

Please sign in to comment.