package com.slugterra.item;

import com.slugterra.block.BlockRegistry;
import com.slugterra.block.SlugterraDirtBlock;

import net.minecraft.block.material.Material;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class ItemBlockRegistry {

	public static void registerBlocks(){
		initialiseBlock();
		registerBlock();
	}

	public static ItemBlock slugContainer;
	public static ItemBlock dropSeat;
	public static ItemBlock slimeRope;
	public static ItemBlock slugterraGrass;
	public static ItemBlock slugterraDirt;
	public static ItemBlock mushroom;
	public static ItemBlock slugterraIce;
	public static ItemBlock electricWall;

	public static void initialiseBlock(){
//		dropSeat = new ItemBlock(BlockRegistry.dropSeat);
//		slimeRope = new ItemBlock(BlockRegistry.slimeRope);
//		slugContainer = new ItemBlock(BlockRegistry.slugContainer);
		slugterraDirt = new ItemBlock(BlockRegistry.slugterraDirt);
		slugterraGrass = new ItemBlock(BlockRegistry.slugterraGrass);
		mushroom = new ItemBlock(BlockRegistry.mushroom);
		slugterraIce = new ItemBlock(BlockRegistry.slugterraIce);
		electricWall = new ItemBlock(BlockRegistry.electricWall);
	}
	
	public static void registerBlock(){
//		GameRegistry.register(slugContainer.setRegistryName(slugContainer.getUnlocalizedName().substring(5)));
//		GameRegistry.register(dropSeat.setRegistryName(dropSeat.getUnlocalizedName().substring(5)));
		GameRegistry.register(slugterraGrass.setUnlocalizedName("slugterra_grass").setRegistryName("slugterra_grass"));
		GameRegistry.register(slugterraDirt.setRegistryName(slugterraDirt.getUnlocalizedName().substring(5)));
		GameRegistry.register(mushroom.setRegistryName(mushroom.getUnlocalizedName().substring(5)));
		GameRegistry.register(slugterraIce.setRegistryName(slugterraIce.getUnlocalizedName().substring(5)));
//		GameRegistry.register(slimeRope.setRegistryName(slimeRope.getUnlocalizedName().substring(5)));
		GameRegistry.register(electricWall.setUnlocalizedName("electric_wall").setRegistryName("electric_wall"));
	}	
}
@@ -68,101 +68,8 @@
 ry;%0A
-import com.slugterra.block.SlugterraDirtBlock;%0A%0Aimport net.minecraft.block.material.Material;
 %0Aimp
@@ -624,18 +624,16 @@
 lock()%7B%0A
-//
 %09%09dropSe
@@ -676,18 +676,16 @@
 pSeat);%0A
-//
 %09%09slimeR
@@ -730,18 +730,16 @@
 eRope);%0A
-//
 %09%09slugCo
@@ -1132,18 +1132,16 @@
 lock()%7B%0A
-//
 %09%09GameRe
@@ -1229,34 +1229,32 @@
 substring(5)));%0A
-//
 %09%09GameRegistry.r
@@ -1374,33 +1374,29 @@
 rass.set
-Unlocalized
+Registry
 Name(
-%22
 slugterr
@@ -1400,50 +1400,47 @@
 erra
-_g
+G
 rass
-%22).setRegistryName(%22slugterra_grass%22
+.getUnlocalizedName().substring(5)
 ));%0A
@@ -1746,10 +1746,8 @@
 ));%0A
-//
 %09%09Ga
@@ -1883,33 +1883,29 @@
 .set
-Unlocalized
+Registry
 Name(
-%22
 electric
 _wal
@@ -1904,47 +1904,46 @@
 tric
-_wall%22).setRegistryName(%22electric_wall%22
+Wall.getUnlocalizedName().substring(5)
 ));%0A

Add ItemBlocks for all custom blocks