package mimickal.mc.floodgate;

import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;

@Mod(
        modid = FloodgateMod.MOD_ID,
        name = FloodgateMod.NAME,
        version = FloodgateMod.VERSION,
        acceptedMinecraftVersions = "[1.10.2]"
)
public class FloodgateMod {

    public static final String MOD_ID = "floodgate";
    public static final String NAME = "Floodgate";
    public static final String VERSION = "1.10.2-1.0.0";

    @SidedProxy(
            serverSide = "mimickal.mc.floodgate.CommonProxy",
            clientSide = "mimickal.mc.floodgate.ClientProxy"
    )
    public static CommonProxy proxy;

    public static BlockFloodgate floodgate;

    @EventHandler
    public void init(FMLInitializationEvent event) {
        System.out.println("Loading Floodgate");
        initFloodgateBlock();
        initFloodgateTileEntity();
    }

    private void initFloodgateBlock() {
        BlockFloodgate block = new BlockFloodgate();

        ItemBlock itemBlock = new ItemBlock(block);
        itemBlock.setRegistryName(block.getRegistryName());

        GameRegistry.register(block);
        GameRegistry.register(itemBlock);
        proxy.registerItemRenderer(itemBlock, 0, BlockFloodgate.NAME);

        floodgate = block;
    }

    private void initFloodgateTileEntity() {
        GameRegistry.registerTileEntity(TileEntityFloodgate.class, MOD_ID + "_tile_entity");
    }

}

@@ -25,16 +25,83 @@
 dgate;%0A%0A
+import net.minecraft.init.Blocks;%0Aimport net.minecraft.init.Items;%0A
 import n
@@ -129,16 +129,16 @@
 mBlock;%0A
-
 import n
@@ -401,16 +401,116 @@
 egistry;
+%0Aimport net.minecraftforge.oredict.OreDictionary;%0Aimport net.minecraftforge.oredict.ShapedOreRecipe;
 %0A%0A@Mod(%0A
@@ -1270,24 +1270,55 @@
 leEntity();%0A
+        initFloodgateRecipe();%0A
     %7D%0A%0A    p
@@ -1746,24 +1746,24 @@
 eEntity() %7B%0A
-
         Game
@@ -1850,10 +1850,258 @@
 %0A    %7D%0A%0A
+    private void initFloodgateRecipe() %7B%0A        GameRegistry.addRecipe(new ShapedOreRecipe(floodgate,%0A            %22III%22,%0A            %22B B%22,%0A            %22IBI%22,%0A            'I', Items.IRON_INGOT,%0A            'B', Blocks.IRON_BARS%0A        ));%0A    %7D%0A%0A
 %7D%0A

Add crafting recipe