diff options
86 files changed, 683 insertions, 3766 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index b583027c..1b4a52ae 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -75,11 +75,11 @@ loom { repositories { mavenCentral() mavenLocal() + maven("https://maven.notenoughupdates.org/releases") maven("https://repo.spongepowered.org/maven/") maven("https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1") maven("https://jitpack.io") maven("https://repo.polyfrost.cc/releases") - maven("https://maven.notenoughupdates.org/releases") } val shadowImplementation: Configuration by configurations.creating { @@ -154,11 +154,13 @@ dependencies { annotationProcessor("net.fabricmc:sponge-mixin:0.11.4+mixin.0.8.5") compileOnly("org.jetbrains:annotations:24.0.1") + modImplementation(libs.moulconfig) + shadowOnly(libs.moulconfig) + @Suppress("VulnerableLibrariesLocal") shadowApi("info.bliki.wiki:bliki-core:3.1.0") testImplementation("org.junit.jupiter:junit-jupiter:5.9.2") testAnnotationProcessor("net.fabricmc:sponge-mixin:0.11.4+mixin.0.8.5") - // modImplementation("io.github.notenoughupdates:MoulConfig:0.0.1") detektPlugins("org.notenoughupdates:detektrules:1.0.0") devEnv("me.djtheredstoner:DevAuth-forge-legacy:1.1.0") } @@ -167,7 +169,7 @@ dependencies { java { withSourcesJar() -// toolchain.languageVersion.set(JavaLanguageVersion.of(8)) + toolchain.languageVersion.set(JavaLanguageVersion.of(8)) } // Tasks: @@ -175,8 +177,6 @@ java { tasks.withType(JavaCompile::class) { options.encoding = "UTF-8" options.isFork = true - if (JavaVersion.current().isJava9Compatible) - options.release.set(8) } tasks.named("compileOneconfigJava", JavaCompile::class) { doFirst { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..49239396 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,5 @@ +[versions] +moulconfig = "1.3.0" + +[libraries] +moulconfig = { module = "org.notenoughupdates.moulconfig:MoulConfig", version.ref = "moulconfig" } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index 88e7a205..792bbea4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -23,6 +23,7 @@ import com.google.common.collect.Lists; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; +import io.github.moulberry.notenoughupdates.commands.help.SettingsCommand; import io.github.moulberry.notenoughupdates.core.BackgroundBlur; import io.github.moulberry.notenoughupdates.core.GuiScreenElementWrapper; import io.github.moulberry.notenoughupdates.core.util.lerp.LerpingInteger; @@ -38,7 +39,6 @@ import io.github.moulberry.notenoughupdates.miscfeatures.EnchantingSolvers; import io.github.moulberry.notenoughupdates.miscfeatures.SunTzu; import io.github.moulberry.notenoughupdates.miscgui.NeuSearchCalculator; import io.github.moulberry.notenoughupdates.miscgui.pricegraph.GuiPriceGraph; -import io.github.moulberry.notenoughupdates.options.NEUConfigEditor; import io.github.moulberry.notenoughupdates.util.Calculator; import io.github.moulberry.notenoughupdates.util.Constants; import io.github.moulberry.notenoughupdates.util.GuiTextures; @@ -402,7 +402,7 @@ public class NEUOverlay extends Gui { return; } if (Mouse.getEventButtonState()) { - NotEnoughUpdates.INSTANCE.openGui = new GuiScreenElementWrapper(NEUConfigEditor.editor); + NotEnoughUpdates.INSTANCE.openGui = SettingsCommand.INSTANCE.createConfigScreen(""); } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java index 6105ddb8..f81331ea 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -274,7 +274,7 @@ public class NotEnoughUpdates { if (config.mining.powderGrindingTrackerResetMode == 2) OverlayManager.powderGrindingOverlay.load(); - IOneConfigCompat.getInstance().ifPresent(it -> it.initConfig(config, this::saveConfig)); + IOneConfigCompat.getInstance().ifPresent(it -> it.initConfig(config)); MinecraftForge.EVENT_BUS.register(new NEUEventListener(this)); MinecraftForge.EVENT_BUS.register(new RecipeGenerator(this)); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/Config.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/Config.java deleted file mode 100644 index 6bafb1fd..00000000 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/Config.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2022 NotEnoughUpdates contributors - * - * This file is part of NotEnoughUpdates. - * - * NotEnoughUpdates is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation, either - * version 3 of the License, or (at your option) any later version. - * - * NotEnoughUpdates is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>. - */ - -package io. |
