forked from vfx-dev/Right-Proper-MCPatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMCPatcherGuiFactory.java
More file actions
56 lines (49 loc) · 1.9 KB
/
Copy pathMCPatcherGuiFactory.java
File metadata and controls
56 lines (49 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Right Proper MCPatcher
*
* Copyright (C) 2025 FalsePattern
* All Rights Reserved
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* This program 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, only version 3 of the License.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.mcpatcher.internal.config;
import com.falsepattern.lib.config.ConfigException;
import com.falsepattern.lib.config.SimpleGuiConfig;
import com.falsepattern.lib.config.SimpleGuiFactory;
import com.falsepattern.mcpatcher.Tags;
import lombok.NoArgsConstructor;
import lombok.val;
import net.minecraft.client.gui.GuiScreen;
import java.util.ArrayList;
@NoArgsConstructor
public final class MCPatcherGuiFactory implements SimpleGuiFactory {
@Override
public Class<? extends GuiScreen> mainConfigGuiClass() {
return MCPatcherGuiConfig.class;
}
private static Class<?>[] getConfigClasses() {
val result = new ArrayList<Class<?>>();
result.add(ModuleConfig.class);
result.add(MixinConfig.class);
result.add(ExtraConfig.class);
return result.toArray(new Class<?>[0]);
}
public static class MCPatcherGuiConfig extends SimpleGuiConfig {
public MCPatcherGuiConfig(GuiScreen parent) throws ConfigException {
super(parent, Tags.MOD_ID, Tags.MOD_NAME, getConfigClasses());
}
}
}