Skip to content

Commit

Permalink
Fix the deprecated nightTime setting not removed at config save time (#…
Browse files Browse the repository at this point in the history
…23)

Fix the deprecated nightTime setting not removing at config save time
  • Loading branch information
eigenraven committed Jan 11, 2024
1 parent 619a6f4 commit f181a20
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1704650211
//version: 1704751096
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
Expand Down Expand Up @@ -786,7 +786,7 @@ dependencies {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.35')
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.4.4')
}

java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
Expand Down
8 changes: 4 additions & 4 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Add your dependencies here

dependencies {
implementation("com.github.GTNewHorizons:NotEnoughItems:2.4.3-GTNH:dev")
implementation("com.github.GTNewHorizons:NotEnoughItems:2.5.4-GTNH:dev")

compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-262-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Galaxy-Space-GTNH:1.2.9-GTNH:dev") {transitive = false}
compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-310-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Galaxy-Space-GTNH:1.3.0-GTNH:dev") {transitive = false}
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:Baubles:1.0.1.16:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:Baubles:1.0.3:dev') {transitive = false}
}
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,14 @@ public int syncWithFile(File file, boolean write, int dimId) {
setDaylightCycle(DaylightCycle.fromOrdinal(cur.getInt()));
}
// handle old nightTime config
if (!write && cfg.hasKey(VISUAL, "nightTime")) {
Boolean isNight = cfg.getCategory(VISUAL).get("nightTime").getBoolean();
setDaylightCycle(isNight ? DaylightCycle.MOON : DaylightCycle.SUN);
cfg.getCategory(VISUAL).remove("nightTime");
needsSaving = true;
if (cfg.hasKey(VISUAL, "nightTime")) {
if (write) {
cfg.getCategory(VISUAL).remove("nightTime");
} else {
boolean isNight = cfg.getCategory(VISUAL).get("nightTime").getBoolean();
setDaylightCycle(isNight ? DaylightCycle.MOON : DaylightCycle.SUN);
needsSaving = true;
}
}
cur = cfg.get(VISUAL, "cloudsEnabled", cloudsEnabled, "");
if (write) {
Expand Down

0 comments on commit f181a20

Please sign in to comment.