diff --git a/src/main/java/io/wispforest/owo/Owo.java b/src/main/java/io/wispforest/owo/Owo.java index d1975378..e755c52d 100644 --- a/src/main/java/io/wispforest/owo/Owo.java +++ b/src/main/java/io/wispforest/owo/Owo.java @@ -2,8 +2,6 @@ import io.wispforest.owo.client.screens.ScreenInternals; import io.wispforest.owo.command.debug.OwoDebugCommands; -import io.wispforest.owo.config.ui.ConfigScreen; -import io.wispforest.owo.config.ui.ConfigScreenProviders; import io.wispforest.owo.ops.LootOps; import io.wispforest.owo.util.OwoFreezer; import io.wispforest.owo.util.Wisdom; @@ -11,12 +9,9 @@ import net.minecraft.text.Text; import net.minecraft.util.Formatting; import net.neoforged.bus.api.IEventBus; -import net.neoforged.fml.ModList; import net.neoforged.fml.common.Mod; -import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; import net.neoforged.fml.event.lifecycle.FMLLoadCompleteEvent; import net.neoforged.fml.loading.FMLLoader; -import net.neoforged.neoforge.client.gui.IConfigScreenFactory; import net.neoforged.neoforge.server.ServerLifecycleHooks; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -57,13 +52,6 @@ public Owo(IEventBus modBus) { modBus.addListener((FMLLoadCompleteEvent event) -> OwoFreezer.freeze()); - modBus.addListener(FMLCommonSetupEvent.class, event -> { - ConfigScreenProviders.forEach((modId, screenFactory) -> { - ModList.get().getModContainerById(modId) - .ifPresent(mod -> mod.registerExtensionPoint(IConfigScreenFactory.class, (modContainer, modsScreen) -> screenFactory.apply(modsScreen))); - }); - }); - Wisdom.spread(); if (!DEBUG) return; diff --git a/src/main/java/io/wispforest/owo/client/OwoClient.java b/src/main/java/io/wispforest/owo/client/OwoClient.java index a5e9e01d..8301d391 100644 --- a/src/main/java/io/wispforest/owo/client/OwoClient.java +++ b/src/main/java/io/wispforest/owo/client/OwoClient.java @@ -4,6 +4,7 @@ import io.wispforest.owo.client.screens.ScreenInternals; import io.wispforest.owo.command.debug.OwoDebugCommands; import io.wispforest.owo.config.OwoConfigCommand; +import io.wispforest.owo.config.ui.ConfigScreenProviders; import io.wispforest.owo.itemgroup.json.OwoItemGroupLoader; import io.wispforest.owo.moddata.ModDataLoader; import io.wispforest.owo.shader.BlurProgram; @@ -16,9 +17,12 @@ import net.neoforged.api.distmarker.Dist; import net.neoforged.api.distmarker.OnlyIn; import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.ModList; import net.neoforged.fml.common.Mod; +import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; import net.neoforged.neoforge.client.event.RegisterClientCommandsEvent; import net.neoforged.neoforge.client.event.RegisterClientReloadListenersEvent; +import net.neoforged.neoforge.client.gui.IConfigScreenFactory; import net.neoforged.neoforge.common.NeoForge; import org.jetbrains.annotations.ApiStatus; @@ -80,5 +84,12 @@ public OwoClient(IEventBus modBus) { if (!Owo.DEBUG) return; OwoDebugCommands.Client.register(); + + modBus.addListener(FMLClientSetupEvent.class, event -> { + ConfigScreenProviders.forEach((modId, screenFactory) -> { + ModList.get().getModContainerById(modId) + .ifPresent(mod -> mod.registerExtensionPoint(IConfigScreenFactory.class, (modContainer, modsScreen) -> screenFactory.apply(modsScreen))); + }); + }); } }