From c85b557a9424fbbcef248dccb490201dcd8450e4 Mon Sep 17 00:00:00 2001 From: Treetrain1 Date: Sun, 9 Jun 2024 04:32:18 -0500 Subject: [PATCH 1/7] Update to latest deps --- gradle.properties | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2db17775d..508bd4b5a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,8 +14,8 @@ # Get new versions at https://fabricmc.net/develop and https://lambdaurora.dev/tools/import_quilt.html minecraft_version=1.20.6 quilt_mappings=1.20.5+build.1 - parchment_mappings=1.20.4:2024.04.14 - loader_version=0.15.10 + parchment_mappings=1.20.6:2024.06.02 + loader_version=0.15.11 min_loader_version=0.15.10 # Mod Properties @@ -25,15 +25,15 @@ archives_base_name = FrozenLib # Dependencies - fabric_api_version=0.97.8+1.20.6 - fabric_kotlin_version=1.10.19+kotlin.1.9.23 + fabric_api_version=0.100.0+1.20.6 + fabric_kotlin_version=1.11.0+kotlin.2.0.0 toml4j_version=0.7.2 jankson_version=1.2.3 - xjs_data_version=0.5 + xjs_data_version=0.6 xjs_compat_version=0.8 - fresult_version=3.0 + fresult_version=3.1 # External Mods - modmenu_version=10.0.0-alpha.3 + modmenu_version=10.0.0-beta.1 cloth_config_version=14.0.126 terrablender_version=1.20.2-3.2.0.14 From 5afb017f3c9e454bae092021d0fd884155cd59d6 Mon Sep 17 00:00:00 2001 From: Treetrain1 Date: Sun, 9 Jun 2024 05:25:53 -0500 Subject: [PATCH 2/7] Kotlin 2.0 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 126a13e8c..7f521cfaf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -30,7 +30,7 @@ plugins { idea `java-library` java - kotlin("jvm") version("1.9.23") + kotlin("jvm") version("2.0.0") } val minecraft_version: String by project From 26e4be88bae1d233b9af32a55d92e3cbc61cad42 Mon Sep 17 00:00:00 2001 From: Treetrain1 Date: Sun, 9 Jun 2024 05:26:51 -0500 Subject: [PATCH 3/7] Use Loom 1.6 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7f521cfaf..c8e75b157 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,7 +20,7 @@ buildscript { } plugins { - id("fabric-loom") version("+") + id("fabric-loom") version("1.6.+") id("org.ajoberstar.grgit") version("+") id("org.quiltmc.gradle.licenser") version("+") id("com.modrinth.minotaur") version("+") From b387223dcdd53e3252731d4213f271406758df64 Mon Sep 17 00:00:00 2001 From: Treetrain1 Date: Sun, 9 Jun 2024 05:35:43 -0500 Subject: [PATCH 4/7] Use K1 Compiler (K2 is bugged) --- build.gradle.kts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index c8e75b157..d61cb66a8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ import groovy.xml.XmlSlurper import org.codehaus.groovy.runtime.ResourceGroovyMethods import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.kohsuke.github.GHReleaseBuilder import org.kohsuke.github.GitHub @@ -345,7 +346,10 @@ tasks { } withType(KotlinCompile::class) { - compilerOptions.jvmTarget = JvmTarget.JVM_21 + compilerOptions { + jvmTarget = JvmTarget.JVM_21 + languageVersion.set(KotlinVersion.KOTLIN_1_9) + } } withType(Test::class) { From 230bd1a24525e6f6dedb7e7c6d4c616407e76b7c Mon Sep 17 00:00:00 2001 From: Treetrain1 Date: Sun, 9 Jun 2024 05:36:16 -0500 Subject: [PATCH 5/7] also set api to K 1.9 --- build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle.kts b/build.gradle.kts index d61cb66a8..903b9b47b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -349,6 +349,7 @@ tasks { compilerOptions { jvmTarget = JvmTarget.JVM_21 languageVersion.set(KotlinVersion.KOTLIN_1_9) + apiVersion.set(KotlinVersion.KOTLIN_1_9) } } From e6c56bcf0ef2652532c1c69c0fdb81711cb32950 Mon Sep 17 00:00:00 2001 From: AViewFromTheTop <87103914+AViewFromTheTop@users.noreply.github.com> Date: Wed, 12 Jun 2024 16:33:27 -0400 Subject: [PATCH 6/7] test possible fix --- src/main/java/net/frozenblock/lib/FrozenMain.java | 8 ++++++++ .../lib/config/api/registry/ConfigRegistry.java | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/frozenblock/lib/FrozenMain.java b/src/main/java/net/frozenblock/lib/FrozenMain.java index c0a0d26fb..41bae6779 100644 --- a/src/main/java/net/frozenblock/lib/FrozenMain.java +++ b/src/main/java/net/frozenblock/lib/FrozenMain.java @@ -21,6 +21,8 @@ import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents; import net.fabricmc.fabric.api.event.lifecycle.v1.ServerWorldEvents; import net.fabricmc.loader.api.ModContainer; +import net.frozenblock.lib.config.api.instance.Config; +import net.frozenblock.lib.config.api.registry.ConfigRegistry; import net.frozenblock.lib.config.frozenlib_config.FrozenLibConfig; import net.frozenblock.lib.config.impl.ConfigCommand; import net.frozenblock.lib.core.impl.DataPackReloadMarker; @@ -144,6 +146,12 @@ public void onInitialize(String modId, ModContainer container) { if (!allRegistries) return; ModIntegrations.initialize(); }); + + RegistryFreezeEvents.END_REGISTRY_FREEZE.register((registry, allRegistries) -> { + for (Config config : ConfigRegistry.getAllConfigs()) { + config.save(); + } + }); } @Contract("_ -> new") diff --git a/src/main/java/net/frozenblock/lib/config/api/registry/ConfigRegistry.java b/src/main/java/net/frozenblock/lib/config/api/registry/ConfigRegistry.java index 71bf33143..50c4d8073 100644 --- a/src/main/java/net/frozenblock/lib/config/api/registry/ConfigRegistry.java +++ b/src/main/java/net/frozenblock/lib/config/api/registry/ConfigRegistry.java @@ -35,7 +35,6 @@ import org.jetbrains.annotations.Unmodifiable; public class ConfigRegistry { - private static final List> CONFIG_REGISTRY = new ObjectArrayList<>(); private static final Map>> MOD_CONFIG_REGISTRY = new Object2ObjectOpenHashMap<>(); From 879d6add00815aaa94e606c116524ec48701e020 Mon Sep 17 00:00:00 2001 From: AViewFromTheTop <87103914+AViewFromTheTop@users.noreply.github.com> Date: Thu, 13 Jun 2024 00:36:27 -0400 Subject: [PATCH 7/7] bump version --- CHANGELOG.md | 4 +--- gradle.properties | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75730041a..ea39c0546 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,4 @@ Make sure to clear this after each release Put changelog here: ----------------- -- Added `Config.onSync()` - - Allows configs to have special post-sync behavior -- Fixed licenses in Kotlin files +- Configs now save after the game loads to ensure they're loaded properly. diff --git a/gradle.properties b/gradle.properties index 508bd4b5a..5b2666130 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,7 +19,7 @@ min_loader_version=0.15.10 # Mod Properties - mod_version = 1.7.2 + mod_version = 1.7.3 mod_loader = Fabric maven_group = net.frozenblock archives_base_name = FrozenLib