Load Mekanism Tools config before creating the materials so the config actually takes effect. Fixes #5412

This commit is contained in:
Thiakil committed 2019-04-19 21:58:46 +08:00
1 parent a5d9a5a2c1
commit 260b545404
1 file changed
+3 -7
@@ -93,6 +93,9 @@ public class MekanismTools implements IModule {
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
//Load the config
proxy.loadConfiguration();
addItems();
}
@@ -104,9 +107,6 @@ public class MekanismTools implements IModule {
//Register this class to the event bus for special mob spawning (mobs with Mekanism armor/tools)
MinecraftForge.EVENT_BUS.register(this);
//Load the proxy
proxy.loadConfiguration();
//Finalization
Mekanism.logger.info("Loaded 'Mekanism: Tools' module.");
}
@@ -147,10 +147,6 @@ public class MekanismTools implements IModule {
armorSTEEL = getArmorMaterial("STEEL", MekanismConfig.current().tools.armorSTEEL,
SoundEvents.ITEM_ARMOR_EQUIP_IRON);
if (Mekanism.configuration.hasChanged()) {
Mekanism.configuration.save();
}
ToolsItems.initializeItems();
ToolsItems.setHarvestLevels();
}