Posted December 26, 20222 yr I haven't been updating mods in a while but I remember back in 1.12.2 and older versions there was a "GuiConfig" that we could extend and together with a "IModGuiFactory" that was enough to register the in-game Config GUI from @Mod passing the guiFactory in question. All that to get the "Config" button working in-game. What is the method to achieve this in newer versions like 1.18.x and 1.19.x - I couldn't find anything in the Documentation (Or maybe I missed it)
December 27, 20222 yr Something like: @EventBusSubscriber(modid = MODID, bus = Bus.MOD, value = Dist.CLIENT) public class ConfigScreenTest { @SubscribeEvent public static void clientSetupEvent(FMLClientSetupEvent event) { event.enqueueWork(() -> { ModLoadingContext.get().registerExtensionPoint(ConfigScreenFactory.class, () -> new ConfigScreenFactory(ConfigScreenTest::createConfigScreen)); }); } public static Screen createConfigScreen(Minecraft minecraft, Screen mainConfigScreen) { return new ErrorScreen(Component.literal("Title"), Component.literal("Error")); } } Obviously you should minecraft.setScreen(mainConfigScreen) when you are done, unlike my stupid example. 🙂 Edited December 27, 20222 yr by warjort Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
December 27, 20222 yr Author Thanks will give it a go. PS: Do I need to manually build the screen items by item, or is there something built in that can handle it, like in the past we had GuiConfig? Edited December 27, 20222 yr by American2050 I missed something.
December 27, 20222 yr Maybe this if you don't want to write it yourself? https://www.curseforge.com/minecraft/mc-mods/configured Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
December 27, 20222 yr Author 1 minute ago, warjort said: Maybe this if you don't want to write it yourself? https://www.curseforge.com/minecraft/mc-mods/configured Oh yes, I saw that mod, but that's what I was trying to prevent, I want to provide the Config screen myself and not depend on other mods.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.