Wither Config allows you to adjust the Wither's stats and behavior for a tailored boss experience.
1package dev.redstudio.witherconfig.config;
2
3import net.minecraftforge.common.config.Config;
4import net.minecraftforge.common.config.ConfigManager;
5import net.minecraftforge.fml.client.event.ConfigChangedEvent;
6import net.minecraftforge.fml.common.Mod;
7import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
8
9import static dev.redstudio.witherconfig.utils.ModReference.ID;
10import static dev.redstudio.witherconfig.utils.ModReference.NAME;
11
12@Config(modid = ID, name = NAME)
13public class WitherConfigConfig {
14
15 public static final Common common = new Common();
16
17 public static class Common {
18
19 public final SummonSequence summonSequence = new SummonSequence();
20 public final Skulls skulls = new Skulls();
21
22 // The Wither attributes
23 public double maxHealth = 300;
24 public double movementSpeed = 0.6; // The "default movement speed of the Wither, it's following speed is "added" to it"
25 public double followRange = 40; // Range for the Wither to look for it's target to follow it
26 public double armor = 4;
27
28 public float unarmoredFlyHeight = 5;
29 public float followDistance = 9;
30
31 public boolean breakBlocksWhenTargetingPlayer = false;
32
33 public static class SummonSequence {
34
35 public int length = 220;
36 public float endExplosionStrength = 7;
37 }
38
39 public static class Skulls {
40
41 public float damage = 8;
42 public float magicDamage = 5;
43 public float healOnKill = 5;
44 public float explosionStrength = 1;
45
46 public String[] effects = new String[]{"minecraft:wither;20;1"};
47 }
48 }
49
50 @Mod.EventBusSubscriber(modid = ID)
51 private static class EventHandler {
52
53 @SubscribeEvent
54 public static void onConfigChanged(final ConfigChangedEvent.OnConfigChangedEvent onConfigChangedEvent) {
55 if (onConfigChangedEvent.getModID().equals(ID))
56 ConfigManager.sync(ID, Config.Type.INSTANCE);
57 }
58 }
59}