forked from vfx-dev/Right-Proper-MCPatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleConfig.java
More file actions
106 lines (91 loc) · 3.48 KB
/
Copy pathModuleConfig.java
File metadata and controls
106 lines (91 loc) · 3.48 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*
* 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.Config;
import com.falsepattern.lib.config.ConfigurationManager;
import com.falsepattern.mcpatcher.Tags;
import lombok.NoArgsConstructor;
@Config.Comment("Runtime Module Toggles")
@Config.LangKey
@Config(modid = Tags.MOD_ID,
category = "00_modules")
@NoArgsConstructor
public final class ModuleConfig {
//@formatter:off
@Config.Comment({"Runtime toggle for connected textures.",
"Requires connectedTexturesMixins enabled."})
@Config.LangKey
@Config.Name("connectedTextures")
@Config.DefaultBoolean(true)
public static boolean connectedTextures;
@Config.Comment({"Runtime toggle for natural textures.",
"Requires naturalTexturesMixins enabled."})
@Config.LangKey
@Config.Name("naturalTextures")
@Config.DefaultBoolean(true)
public static boolean naturalTextures;
@Config.Comment({"Allow regular glass blocks, glass panes, and beacon glass to have semi-transparent textures.",
"Requires betterGlassMixins enabled."})
@Config.LangKey
@Config.Name("betterGlass")
@Config.DefaultBoolean(true)
public static boolean betterGlass;
@Config.Comment({"Runtime toggle for random mobs.",
"Requires randomMobsMixins to be enabled."})
@Config.LangKey
@Config.Name("randomMobs")
@Config.DefaultBoolean(true)
public static boolean randomMobs;
@Config.Comment({"Runtime toggle for custom item textures.",
"Requires customItemTexturesMixins enabled."})
@Config.LangKey
@Config.Name("customItemTextures")
@Config.DefaultBoolean(true)
public static boolean customItemTextures;
//@formatter:on
public static boolean isConnectedTexturesEnabled() {
return MixinConfig.connectedTexturesMixins && connectedTextures;
}
public static boolean isNaturalTexturesEnabled() {
return MixinConfig.naturalTexturesMixins && naturalTextures;
}
public static boolean isBetterGlassEnabled() {
return MixinConfig.betterGlassMixins && betterGlass;
}
public static boolean isCustomItemTexturesEnabled() {
return MixinConfig.customItemTexturesMixins != MixinConfig.CITMixinStrength.Disabled && customItemTextures;
}
public static boolean isRandomMobsEnabled() {
return MixinConfig.randomMobsMixins && randomMobs;
}
// region Init
static {
ConfigurationManager.selfInit();
MixinConfig.init();
}
/**
* This is here to make the static initializer run
*/
public static void init() {
}
// endregion
}