diff --git a/CHANGELOG.md b/CHANGELOG.md index a2098010..c4011be5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -175,6 +175,14 @@ - Updated Ukrainian translations ([#195](https://github.com/LambdAurora/LambDynamicLights/pull/195)). - Updated to Minecraft 1.20.4 ([#202](https://github.com/LambdAurora/LambDynamicLights/pull/202)). +## 3.0.0 + +- Updated to Minecraft 1.21 ([#227](https://github.com/LambdAurora/LambDynamicLights/pull/227)) +- Updated configuration library. + - Configuration corruption should now be fixed. +- Updated Mexican Spanish translations ([#214](https://github.com/LambdAurora/LambDynamicLights/pull/214)). +- Switched license to [Lambda License](https://github.com/LambdAurora/LambDynamicLights/blob/bbefb8860bca2e797f8a2ba8a59d1120b6e1c7b4/LICENSE). + [SpruceUI]: https://github.com/LambdAurora/SpruceUI "SpruceUI page" [pridelib]: https://github.com/Queerbric/pridelib "Pridelib page" [Sodium]: https://modrinth.com/mod/sodium "Sodium Modrinth page" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8db9460e..d10a1e65 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,7 +12,7 @@ modmenu = "11.0.1" sodium = "mc1.21-0.5.9" # Configuration -nightconfig = "3.6.6" +nightconfig = "3.8.1" [libraries] minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" } diff --git a/src/main/java/dev/lambdaurora/lambdynlights/DynamicLightsConfig.java b/src/main/java/dev/lambdaurora/lambdynlights/DynamicLightsConfig.java index de19c75f..b6c6825a 100644 --- a/src/main/java/dev/lambdaurora/lambdynlights/DynamicLightsConfig.java +++ b/src/main/java/dev/lambdaurora/lambdynlights/DynamicLightsConfig.java @@ -10,6 +10,7 @@ package dev.lambdaurora.lambdynlights; import com.electronwill.nightconfig.core.file.FileConfig; +import com.electronwill.nightconfig.core.io.WritingMode; import dev.lambdaurora.lambdynlights.config.BooleanSettingEntry; import dev.lambdaurora.lambdynlights.config.SettingEntry; import dev.lambdaurora.spruceui.option.SpruceCyclingOption; @@ -61,7 +62,11 @@ public class DynamicLightsConfig { public DynamicLightsConfig(@NotNull LambDynLights mod) { this.mod = mod; - this.config = FileConfig.builder(CONFIG_FILE_PATH).concurrent().defaultResource("/lambdynlights.toml").autosave().build(); + this.config = FileConfig.builder(CONFIG_FILE_PATH) + .defaultResource("/lambdynlights.toml") + .autosave() + .writingMode(WritingMode.REPLACE_ATOMIC) + .build(); this.entitiesLightSource = new BooleanSettingEntry("light_sources.entities", DEFAULT_ENTITIES_LIGHT_SOURCE, this.config, Text.translatable("lambdynlights.tooltip.entities")) .withOnSet(value -> { diff --git a/src/main/resources/lambdynlights.toml b/src/main/resources/lambdynlights.toml index 5a170130..3575f515 100644 --- a/src/main/resources/lambdynlights.toml +++ b/src/main/resources/lambdynlights.toml @@ -2,20 +2,20 @@ # The dynamic lights mode mode = "fancy" - # Light sources settings. +# Light sources settings. [light_sources] - # Enable entities light source. - entities = true - # Enable first-person player light source. - self = true - # Enable block entities light source. - block_entities = true - # Enables water-sensitive light sources check. This means that water-sensitive items will not light up when submerged in water. - water_sensitive_check = true - # Creeper lighting mode. May be off, simple or fancy. - creeper = "simple" - # TNT lighting mode. May be off, simple or fancy. - tnt = "off" + # Enable entities light source. + entities = true + # Enable first-person player light source. + self = true + # Enable block entities light source. + block_entities = true + # Enables water-sensitive light sources check. This means that water-sensitive items will not light up when submerged in water. + water_sensitive_check = true + # Creeper lighting mode. May be off, simple or fancy. + creeper = "simple" + # TNT lighting mode. May be off, simple or fancy. + tnt = "off" [light_sources.settings.entities.minecraft] - glow_item_frame = false + glow_item_frame = false