package org.cyclops.integrateddynamics;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import org.apache.logging.log4j.Level;
import org.cyclops.cyclopscore.config.ConfigHandler;
import org.cyclops.cyclopscore.init.ItemCreativeTab;
import org.cyclops.cyclopscore.init.ModBase;

/**
 * The main mod class of IntegratedDynamics.
 * @author rubensworks
 *
 */
@Mod(modid = Reference.MOD_ID,
     name = Reference.MOD_NAME,
     useMetadata = true,
     version = Reference.MOD_VERSION,
     dependencies = Reference.MOD_DEPENDENCIES
)
public class IntegratedDynamics extends ModBase {

    /**
     * The unique instance of this mod.
     */
    @Mod.Instance(value = Reference.MOD_ID)
    public static IntegratedDynamics _instance;

    public IntegratedDynamics() {
        super(Reference.MOD_ID, Reference.MOD_NAME);
    }

    @Mod.EventHandler
    @Override
    public final void preInit(FMLPreInitializationEvent event) {
        super.preInit(event);
    }

    @Mod.EventHandler
    @Override
    public final void init(FMLInitializationEvent event) {
        super.init(event);
    }

    @Mod.EventHandler
    @Override
    public final void postInit(FMLPostInitializationEvent event) {
        super.postInit(event);
    }

    @Override
    public CreativeTabs constructDefaultCreativeTab() {
        return new ItemCreativeTab(this, Items.bed); // TODO: temp
    }

    @Override
    public void onGeneralConfigsRegister(ConfigHandler configHandler) {
        configHandler.add(new GeneralConfig());
    }

    @Override
    public void onMainConfigsRegister(ConfigHandler configHandler) {
        Configs.registerBlocks(configHandler);
    }

    /**
     * Log a new info message for this mod.
     * @param message The message to show.
     */
    public static void clog(String message) {
        IntegratedDynamics._instance.log(Level.INFO, message);
    }

    /**
     * Log a new message of the given level for this mod.
     * @param level The level in which the message must be shown.
     * @param message The message to show.
     */
    public static void clog(Level level, String message) {
        IntegratedDynamics._instance.log(level, message);
    }
}
@@ -203,171 +203,9 @@
 ent.
-FMLInitializationEvent;%0Aimport net.minecraftforge.fml.common.event.FMLPostInitializationEvent;%0Aimport net.minecraftforge.fml.common.event.FMLPreInitializationEvent
+*
 ;%0Aim
@@ -391,16 +391,77 @@
 ModBase;
+%0Aimport org.cyclops.cyclopscore.persist.world.GlobalCounters;
 %0A%0A/**%0A *
@@ -995,16 +995,112 @@
 _NAME);%0A
+        setGlobalCounters(new GlobalCounters(this)); // We require global counters in this mod.%0A
     %7D%0A%0A 
@@ -1460,32 +1460,32 @@
 nEvent event) %7B%0A
-
         super.po
@@ -1498,32 +1498,323 @@
 (event);%0A    %7D%0A%0A
+    @Mod.EventHandler%0A    @Override%0A    public void onServerStarted(FMLServerStartedEvent event) %7B%0A        super.onServerStarted(event);%0A    %7D%0A%0A    @Mod.EventHandler%0A    @Override%0A    public void onServerStopping(FMLServerStoppingEvent event) %7B%0A        super.onServerStopping(event);%0A    %7D%0A%0A
     @Override%0A  

Support the newly-added world storage from CyclopsCore.