1+ /*
2+ * Skytils - Hypixel Skyblock Quality of Life Mod
3+ * Copyright (C) 2020-2024 Skytils
4+ *
5+ * This program is free software: you can redistribute it and/or modify
6+ * it under the terms of the GNU Affero General Public License as published
7+ * by the Free Software Foundation, either version 3 of the License, or
8+ * (at your option) any later version.
9+ *
10+ * This program is distributed in the hope that it will be useful,
11+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+ * GNU Affero General Public License for more details.
14+ *
15+ * You should have received a copy of the GNU Affero General Public License
16+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
17+ */
18+
19+ package gg.skytils.skytilsmod.core
20+
21+ import gg.skytils.skytilsmod.gui.OptionsGui
22+ import net.minecraft.client.Minecraft
23+ import net.minecraft.client.gui.Gui
24+ import net.minecraft.client.gui.GuiScreen
25+ import net.minecraftforge.fml.client.IModGuiFactory
26+ import net.minecraftforge.fml.client.IModGuiFactory.RuntimeOptionGuiHandler
27+
28+ class ForgeGuiFactory : IModGuiFactory {
29+ override fun initialize (minecraft : Minecraft ) {
30+ }
31+
32+ override fun mainConfigGuiClass (): Class <out GuiScreen > = OptionsGui ::class .java
33+
34+ override fun runtimeGuiCategories (): Set <IModGuiFactory .RuntimeOptionCategoryElement > = emptySet()
35+
36+ override fun getHandlerFor (runtimeOptionCategoryElement : IModGuiFactory .RuntimeOptionCategoryElement ): RuntimeOptionGuiHandler =
37+ object : RuntimeOptionGuiHandler {
38+ override fun addWidgets (list : MutableList <Gui >? , i : Int , j : Int , k : Int , l : Int ) {}
39+
40+ override fun paint (i : Int , j : Int , k : Int , l : Int ) {}
41+
42+ override fun actionCallback (i : Int ) {}
43+
44+ override fun close () {}
45+ }
46+
47+ }
0 commit comments