From 2bd2cb8bf419c143900235a0a0df261913c65b51 Mon Sep 17 00:00:00 2001 From: Max Hyper Date: Tue, 29 Oct 2024 18:03:20 -0300 Subject: [PATCH] Fixed crash with latest SereneSeasons version --- build.gradle.kts | 3 ++- gradle.properties | 7 ++++--- .../compat/season/SereneSeasonsSeasonProvider.java | 7 +++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index bec7261e8..e46f06d78 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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")}")) diff --git a/gradle.properties b/gradle.properties index 8b79d5d56..85f7d1e18 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,11 @@ 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 @@ -13,7 +13,8 @@ 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 diff --git a/src/main/java/com/ferreusveritas/dynamictrees/compat/season/SereneSeasonsSeasonProvider.java b/src/main/java/com/ferreusveritas/dynamictrees/compat/season/SereneSeasonsSeasonProvider.java index 69f38ec67..aa2045787 100644 --- a/src/main/java/com/ferreusveritas/dynamictrees/compat/season/SereneSeasonsSeasonProvider.java +++ b/src/main/java/com/ferreusveritas/dynamictrees/compat/season/SereneSeasonsSeasonProvider.java @@ -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 { @@ -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 biomeHolder = level.getBiome(pos); // TODO 1.20: Reinstate Serene Seasons compat here, BiomeConfig class is gone return /*BiomeConfig.enablesSeasonalEffects(biomeHolder) &&*/ @@ -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()) );