fix: fixed hot-reloading for some config values
@@ -3,7 +3,9 @@ package se.mickelus.tetra;
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
import com.electronwill.nightconfig.core.io.WritingMode;
import net.minecraftforge.common.ForgeConfigSpec;
+import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.event.config.ModConfigEvent;
import net.minecraftforge.fml.loading.FMLPaths;
import se.mickelus.tetra.items.modular.impl.ModularBladedItem;
import se.mickelus.tetra.items.modular.impl.ModularDoubleHeadedItem;
@@ -246,17 +248,17 @@ public class ConfigHandler {
spec.setConfig(configData);
}
-/*
+
@SubscribeEvent
- public static void onLoad(final ModConfig.Loading configEvent) {
+ public static void onLoad(final ModConfigEvent.Loading configEvent) {
onModConfigLoad();
}
@SubscribeEvent
- public static void onReload(final ModConfig.Reloading configEvent) {
+ public static void onReload(final ModConfigEvent.Reloading configEvent) {
onModConfigLoad();
}
- */
+
private static void onModConfigLoad() {
ModularBladedItem.instance.updateConfig(honeSwordBase.get(), honeSwordIntegrityMultiplier.get());
