package ljfa.advbackport;

import ljfa.advbackport.handlers.CanDestroyHandler;
import ljfa.advbackport.handlers.CanPlaceOnHandler;
import ljfa.advbackport.handlers.TooltipHandler;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.relauncher.Side;

@Mod(modid = Reference.MODID, name = Reference.MODNAME, version = Reference.VERSION)
public class AdventureBackport {
    @Mod.Instance(Reference.MODID)
    public static AdventureBackport instance;
    
    @Mod.EventHandler
    public void preInit(FMLPreInitializationEvent event) {
        Config.loadConfig(event.getSuggestedConfigurationFile());
    }
    
    @Mod.EventHandler
    public void init(FMLInitializationEvent event) {
        if(Config.activateCanDestroy)
            MinecraftForge.EVENT_BUS.register(new CanDestroyHandler());
        if(Config.activateCanPlaceOn)
            MinecraftForge.EVENT_BUS.register(new CanPlaceOnHandler());
        
        if(event.getSide() == Side.CLIENT) {
            MinecraftForge.EVENT_BUS.register(new TooltipHandler());
        }
    }
    
    /*@Mod.EventHandler
    public void postInit(FMLPostInitializationEvent event) {
        
    }*/
}

@@ -169,24 +169,65 @@
 tipHandler;%0A
+import net.minecraft.nbt.NBTTagCompound;%0A
 import net.m
@@ -344,32 +344,83 @@
 alizationEvent;%0A
+import cpw.mods.fml.common.event.FMLInterModComms;%0A
 import cpw.mods.
@@ -1287,24 +1287,62 @@
 ;%0A        %7D%0A
+        %0A        addVersionChecker();%0A
     %7D%0A    %0A 
@@ -1442,10 +1442,359 @@
     %7D*/%0A
+    %0A    public void addVersionChecker() %7B%0A        NBTTagCompound tag = new NBTTagCompound();%0A        tag.setString(%22curseProjectName%22, %22228312-adventure-backport%22);%0A        tag.setString(%22curseFilenameParser%22, %22adventure_backport-%5B%5D.jar%22);%0A        FMLInterModComms.sendRuntimeMessage(Reference.MODID, %22VersionChecker%22, %22addCurseCheck%22, tag);%0A    %7D%0A
 %7D%0A

Add Version Checker compatibility