diff --git a/common/src/main/java/io/github/amerebagatelle/mods/nuit/NuitClient.java b/common/src/main/java/io/github/amerebagatelle/mods/nuit/NuitClient.java index 7fd5336d..ecde52ba 100644 --- a/common/src/main/java/io/github/amerebagatelle/mods/nuit/NuitClient.java +++ b/common/src/main/java/io/github/amerebagatelle/mods/nuit/NuitClient.java @@ -13,7 +13,7 @@ public class NuitClient { private static NuitConfig CONFIG; public static void init() { - NuitApi.getInstance().setEnabled(config().generalSettings.enable); + SkyboxManager.getInstance().setEnabled(config().generalSettings.enable); } public static Logger getLogger() { diff --git a/common/src/main/java/io/github/amerebagatelle/mods/nuit/api/NuitApi.java b/common/src/main/java/io/github/amerebagatelle/mods/nuit/api/NuitApi.java index 6048758e..be82c986 100644 --- a/common/src/main/java/io/github/amerebagatelle/mods/nuit/api/NuitApi.java +++ b/common/src/main/java/io/github/amerebagatelle/mods/nuit/api/NuitApi.java @@ -27,20 +27,6 @@ static int getApiVersion() { return 0; } - /** - * Gets the state of the Nuit mod. - * - * @return Whether Nuit is enabled. - */ - boolean isEnabled(); - - /** - * Allows mods to set the state of the Nuit. - * - * @param enabled State of the Nuit. - */ - void setEnabled(boolean enabled); - /** * Allows mods to add new skyboxes at runtime. * diff --git a/common/src/main/java/io/github/amerebagatelle/mods/nuit/config/NuitConfig.java b/common/src/main/java/io/github/amerebagatelle/mods/nuit/config/NuitConfig.java index 2b483b8f..ccd41704 100644 --- a/common/src/main/java/io/github/amerebagatelle/mods/nuit/config/NuitConfig.java +++ b/common/src/main/java/io/github/amerebagatelle/mods/nuit/config/NuitConfig.java @@ -4,6 +4,7 @@ import com.google.gson.GsonBuilder; import com.mojang.blaze3d.platform.InputConstants; import io.github.amerebagatelle.mods.nuit.NuitClient; +import io.github.amerebagatelle.mods.nuit.SkyboxManager; import io.github.amerebagatelle.mods.nuit.api.NuitApi; import net.minecraft.client.KeyMapping; import net.minecraft.client.Minecraft; @@ -83,10 +84,10 @@ public void tick(Minecraft client) { while (this.toggleNuit.consumeClick()) { NuitClient.config().generalSettings.enable = !NuitClient.config().generalSettings.enable; NuitClient.config().save(); - NuitApi.getInstance().setEnabled(NuitClient.config().generalSettings.enable); + SkyboxManager.getInstance().setEnabled(NuitClient.config().generalSettings.enable); assert client.player != null; - if (NuitApi.getInstance().isEnabled()) { + if (SkyboxManager.getInstance().isEnabled()) { client.player.displayClientMessage(Component.translatable("nuit.message.enabled"), false); } else { client.player.displayClientMessage(Component.translatable("nuit.message.disabled"), false);