MCPcopy Create free account
hub / github.com/McJty/TutorialV3 / ManaConfig

Class ManaConfig

src/main/java/com/example/tutorialv3/manasystem/ManaConfig.java:5–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import net.minecraftforge.common.ForgeConfigSpec;
4
5public class ManaConfig {
6
7 public static ForgeConfigSpec.IntValue CHUNK_MIN_MANA;
8 public static ForgeConfigSpec.IntValue CHUNK_MAX_MANA;
9
10 public static ForgeConfigSpec.IntValue MANA_HUD_X;
11 public static ForgeConfigSpec.IntValue MANA_HUD_Y;
12 public static ForgeConfigSpec.IntValue MANA_HUD_COLOR;
13
14 public static void registerServerConfig(ForgeConfigSpec.Builder SERVER_BUILDER) {
15 SERVER_BUILDER.comment("Settings for the mana system").push("mana");
16
17 CHUNK_MIN_MANA = SERVER_BUILDER
18 .comment("Minumum amount of mana in a chunk")
19 .defineInRange("minMana", 10, 0, Integer.MAX_VALUE);
20 CHUNK_MAX_MANA = SERVER_BUILDER
21 .comment("Maximum amount of mana in a chunk (relative to minMana)")
22 .defineInRange("maxMana", 100, 1, Integer.MAX_VALUE);
23
24 SERVER_BUILDER.pop();
25 }
26
27 public static void registerClientConfig(ForgeConfigSpec.Builder CLIENT_BUILDER) {
28 CLIENT_BUILDER.comment("Settings for the mana system").push("mana");
29
30 MANA_HUD_X = CLIENT_BUILDER
31 .comment("X location of the mana hud")
32 .defineInRange("manaHudX", 10, -1, Integer.MAX_VALUE);
33 MANA_HUD_Y = CLIENT_BUILDER
34 .comment("Y location of the mana hud")
35 .defineInRange("manaHudY", 10, -1, Integer.MAX_VALUE);
36 MANA_HUD_COLOR = CLIENT_BUILDER
37 .comment("Color of the mana hud")
38 .defineInRange("manaHudColor", 0xffffffff, Integer.MIN_VALUE, Integer.MAX_VALUE);
39
40 CLIENT_BUILDER.pop();
41 }
42
43
44}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected