package eggdropsoap.spreadinglilypads;

import java.lang.reflect.*;

import net.minecraft.block.Block;
import net.minecraft.block.BlockLilyPad;
import net.minecraft.creativetab.CreativeTabs;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler; // used in 1.6.2
//import cpw.mods.fml.common.Mod.PreInit;    // used in 1.5.2
//import cpw.mods.fml.common.Mod.Init;       // used in 1.5.2
//import cpw.mods.fml.common.Mod.PostInit;   // used in 1.5.2
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid="SpreadingLilypads", name="Spreading Lilypads", version="0.1.0")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class SpreadingLilypads {

	public Block spreadingLilyPad = (new BlockSpreadingLilyPad(500)) // FIXME: config for temp ID
			.setHardness(0.0F).setStepSound(Block.soundGrassFootstep)
			.setUnlocalizedName("waterlily")
			.func_111022_d("waterlily")
			.setCreativeTab(CreativeTabs.tabDecorations);
	
    // The instance of your mod that Forge uses.
    @Instance("SpreadingLilypads")
    public static SpreadingLilypads instance;
   
    // Says where the client and server 'proxy' code is loaded.
    @SidedProxy(clientSide="eggdropsoap.spreadinglilypads.client.ClientProxy", serverSide="eggdropsoap.spreadinglilypads.CommonProxy")
    public static CommonProxy proxy;
   
    
    @EventHandler // used in 1.6.2
    //@PreInit    // used in 1.5.2
    public void preInit(FMLPreInitializationEvent event) {
            // Stub Method
    }
   
    @EventHandler // used in 1.6.2
    //@Init       // used in 1.5.2
    public void load(FMLInitializationEvent event) {
            proxy.registerRenderers();
                      
            Block.blocksList[Block.waterlily.blockID] = spreadingLilyPad;
            

    }
   
    @EventHandler // used in 1.6.2
    //@PostInit   // used in 1.5.2
    public void postInit(FMLPostInitializationEvent event) {
            // Stub Method
    }
}

@@ -33,16 +33,18 @@
 ypads;%0A%0A
+//
 import j
@@ -63,16 +63,16 @@
 lect.*;%0A
-
 %0Aimport 
@@ -186,16 +186,64 @@
 veTabs;%0A
+import net.minecraftforge.common.Configuration;%0A
 import c
@@ -1046,16 +1046,17 @@
 ypads %7B%0A
+%09
 %0A%09public
@@ -1082,248 +1082,40 @@
 yPad
- = (new BlockSpreadingLilyPad(500)) // FIXME: config for temp ID%0A%09%09%09.setHardness(0.0F).setStepSound(Block.soundGrassFootstep)%0A%09%09%09.setUnlocalizedName(%22waterlily%22)%0A%09%09%09.func_111022_d(%22waterlily%22)%0A%09%09%09.setCreativeTab(CreativeTabs.tabDecorations)
+;%0A%09public int spreadingLilyPadID
 ;%0A%09%0A
@@ -1611,32 +1611,36 @@
 tionEvent event)
+%0A   
  %7B%0A            /
@@ -1634,34 +1634,549 @@
         
-    // Stub Method
+// get configuration%0A    %09Configuration config = new Configuration(event.getSuggestedConfigurationFile());%0A    %09config.load();%0A    %09spreadingLilyPadID = config.getBlock(%22spreadingLilyPad%22, 500).getInt();%0A    %09config.save();%0A    %09%0A    %09// initialise spreading block%0A    %09spreadingLilyPad = (new BlockSpreadingLilyPad(spreadingLilyPadID))%0A    %09%09%09.setHardness(0.0F).setStepSound(Block.soundGrassFootstep)%0A    %09%09%09.setUnlocalizedName(%22spreadinglily%22)%0A    %09%09%09.func_111022_d(%22waterlily%22)%0A    %09%09%09.setCreativeTab(CreativeTabs.tabDecorations);
 %0A    %7D%0A 
@@ -2352,26 +2352,147 @@
         
-          
+%0A            // replace worldgen lilypads with spreading lilies,%0A            // but keeping original blockID for save compatibility
 %0A       

Add configuration file for block ID