package common.init;

import common.block.Block;
import common.block.BlockBeacon;
import common.block.BlockBed;
import common.block.BlockBlackenedSoil;
import common.block.BlockBush;
import common.block.BlockCactus;
import common.block.BlockCauldron;
import common.block.BlockChest;
import common.block.BlockDaylightDetector;
import common.block.BlockDeadBush;
import common.block.BlockDoublePlant;
import common.block.BlockDryLeaves;
import common.block.BlockDynamicLiquid;
import common.block.BlockFire;
import common.block.BlockFlower;
import common.block.BlockGrass;
import common.block.BlockHopper;
import common.block.BlockLeaves;
import common.block.BlockMycelium;
import common.block.BlockOre;
import common.block.BlockPistonBase;
import common.block.BlockPistonHead;
import common.block.BlockPistonMoving;
import common.block.BlockPortal;
import common.block.BlockRedstoneComparator;
import common.block.BlockRedstoneRepeater;
import common.block.BlockRedstoneWire;
import common.block.BlockReed;
import common.block.BlockSand;
import common.block.BlockSkull;
import common.block.BlockSlab;
import common.block.BlockStainedGlass;
import common.block.BlockStainedGlassPane;
import common.block.BlockStaticLiquid;
import common.block.BlockTallGrass;
import common.block.BlockTianReactor;
import common.block.BlockTripWireHook;


public abstract class Blocks {
    public static final Block air = get("air");
    public static final Block stone = get("stone");
    public static final Block blackened_stone = get("blackened_stone");
    public static final BlockGrass grass = (BlockGrass)get("grass");
    public static final BlockBlackenedSoil blackened_soil = (BlockBlackenedSoil)get("blackened_soil");
    public static final Block dirt = get("dirt");
    public static final Block blackened_dirt = get("blackened_dirt");
    public static final Block cobblestone = get("cobblestone");
    public static final Block blackened_cobble = get("blackened_cobble");
    public static final Block oak_planks = get("oak_planks");
    public static final Block spruce_planks = get("spruce_planks");
    public static final Block birch_planks = get("birch_planks");
    public static final Block maple_planks = get("maple_planks");
    public static final Block jungle_planks = get("jungle_planks");
    public static final Block acacia_planks = get("acacia_planks");
    public static final Block dark_oak_planks = get("dark_oak_planks");
    public static final Block cherry_planks = get("cherry_planks");
    public static final Block oak_sapling = get("oak_sapling");
    public static final Block spruce_sapling = get("spruce_sapling");
    public static final Block birch_sapling = get("birch_sapling");
    public static final Block jungle_sapling = get("jungle_sapling");
    public static final Block acacia_sapling = get("acacia_sapling");
    public static final Block dark_oak_sapling = get("dark_oak_sapling");
    public static final Block cherry_sapling = get("cherry_sapling");
    public static final Block maple_sapling = get("maple_sapling");
    public static final Block bedrock = get("bedrock");
    public static final BlockDynamicLiquid flowing_water = (BlockDynamicLiquid)get("flowing_water");
    public static final BlockStaticLiquid water = (BlockStaticLiquid)get("water");
    public static final BlockDynamicLiquid flowing_lava = (BlockDynamicLiquid)get("flowing_lava");
    public static final BlockStaticLiquid lava = (BlockStaticLiquid)get("lava");
    public static final BlockDynamicLiquid flowing_goo = (BlockDynamicLiquid)get("flowing_goo");
    public static final BlockStaticLiquid goo = (BlockStaticLiquid)get("goo");
    public static final BlockSand sand = (BlockSand)get("sand");
    public static final Block gravel = get("gravel");
    public static final BlockOre gold_ore = (BlockOre)get("gold_ore");
    public static final BlockOre iron_ore = (BlockOre)get("iron_ore");
    public static final BlockOre coal_ore = (BlockOre)get("coal_ore");
    public static final BlockOre lead_ore = (BlockOre)get("lead_ore");
    public static final BlockOre copper_ore = (BlockOre)get("copper_ore");
    public static final Block oak_log = get("oak_log");
    public static final Block spruce_log = get("spruce_log");
    public static final Block birch_log = get("birch_log");
    public static final Block jungle_log = get("jungle_log");
    public static final Block acacia_log = get("acacia_log");
    public static final Block dark_oak_log = get("dark_oak_log");
    public static final Block cherry_log = get("cherry_log");
    public static final Block maple_log = get("maple_log");
    public static final Block tian_log = get("tian_log");
    public static final Block blackwood_log = get("blackwood_log");
    public static final Block oak_slab = get("oak_slab");
    public static final Block spruce_slab = get("spruce_slab");
    public static final Block birch_slab = get("birch_slab");
    public static final Block jungle_slab = get("jungle_slab");
    public static final Block acacia_slab = get("acacia_slab");
    public static final Block dark_oak_slab = get("dark_oak_slab");
    public static final Block cherry_slab = get("cherry_slab");
    public static final Block maple_slab = get("maple_slab");
    public static final Block cobblestone_slab = get("cobblestone_slab");
    public static final Block brick_slab = get("brick_slab");
    public static final Block blood_brick_slab = get("blood_brick_slab");
    public static final Block quartz_slab = get("quartz_slab");
    public static final BlockDryLeaves dry_leaves = (BlockDryLeaves)get("dry_leaves");
    public static final Block sponge = get("sponge");
    public static final Block glass = get("glass");
    public static final BlockOre lapis_ore = (BlockOre)get("lapis_ore");
    public static final Block lapis_block = get("lapis_block");
    public static final Block dispenser = get("dispenser");
    public static final Block sandstone = get("sandstone");
    public static final Block noteblock = get("noteblock");
    public static final BlockBed red_bed = (BlockBed)get("red_bed");
    public static final Block golden_rail = get("golden_rail");
    public static final Block detector_rail = get("detector_rail");
    public static final BlockPistonBase sticky_piston = (BlockPistonBase)get("sticky_piston");
    public static final Block web = get("web");
    public static final BlockTallGrass tallgrass = (BlockTallGrass)get("tallgrass");
    public static final BlockDeadBush deadbush = (BlockDeadBush)get("deadbush");
    public static final BlockPistonBase piston = (BlockPistonBase)get("piston");
    public static final BlockPistonHead piston_head = (BlockPistonHead)get("piston_head");
    public static final Block wool = get("wool");
    public static final BlockPistonMoving piston_extension = (BlockPistonMoving)get("piston_extension");
    public static final BlockFlower flower = (BlockFlower)get("flower");
    public static final BlockBush brown_mushroom = (BlockBush)get("brown_mushroom");
    public static final BlockBush red_mushroom = (BlockBush)get("red_mushroom");
    public static final Block gold_block = get("gold_block");
    public static final Block iron_block = get("iron_block");
//    public static final BlockSlab double_stone_slab = get("double_stone_slab");
//    public static final BlockSlab stone_slab = get("stone_slab");
    public static final Block brick_block = get("brick_block");
    public static final Block tnt = get("tnt");
    public static final Block bookshelf = get("bookshelf");
    public static final Block mossy_cobblestone = get("mossy_cobblestone");
    public static final Block obsidian = get("obsidian");
    public static final Block torch = get("torch");
    public static final BlockFire fire = (BlockFire)get("fire");
    public static final Block mob_spawner = get("mob_spawner");
    public static final Block oak_stairs = get("oak_stairs");
    public static final BlockChest chest = (BlockChest)get("chest");
    public static final BlockRedstoneWire redstone = (BlockRedstoneWire)get("redstone");
    public static final BlockOre diamond_ore = (BlockOre)get("diamond_ore");
    public static final Block diamond_block = get("diamond_block");
    public static final Block crafting_table = get("crafting_table");
    public static final Block wheat = get("wheat");
    public static final Block farmland = get("farmland");
    public static final Block furnace = get("furnace");
    public static final Block lit_furnace = get("lit_furnace");
    public static final Block sign = get("sign");
    public static final Block oak_door = get("oak_door");
    public static final Block spruce_door = get("spruce_door");
    public static final Block birch_door = get("birch_door");
    public static final Block jungle_door = get("jungle_door");
    public static final Block acacia_door = get("acacia_door");
    public static final Block dark_oak_door = get("dark_oak_door");
    public static final Block ladder = get("ladder");
    public static final Block rail = get("rail");
    public static final Block cobblestone_stairs = get("cobblestone_stairs");
    public static final Block wall_sign = get("wall_sign");
    public static final Block lever = get("lever");
    public static final Block stone_pressure_plate = get("stone_pressure_plate");
    public static final Block iron_door = get("iron_door");
    public static final Block wooden_pressure_plate = get("wooden_pressure_plate");
    public static final Block redstone_ore = get("redstone_ore");
    public static final Block lit_redstone_ore = get("lit_redstone_ore");
    public static final Block unlit_redstone_torch = get("unlit_redstone_torch");
    public static final Block redstone_torch = get("redstone_torch");
    public static final Block stone_button = get("stone_button");
    public static final Block snow_layer = get("snow_layer");
    public static final Block ice = get("ice");
    public static final Block snow = get("snow");
    public static final BlockCactus cactus = (BlockCactus)get("cactus");
    public static final Block clay = get("clay");
    public static final BlockReed reeds = (BlockReed)get("reeds");
    public static final Block jukebox = get("jukebox");
    public static final Block oak_fence = get("oak_fence");
    public static final Block spruce_fence = get("spruce_fence");
    public static final Block birch_fence = get("birch_fence");
    public static final Block jungle_fence = get("jungle_fence");
    public static final Block dark_oak_fence = get("dark_oak_fence");
    public static final Block acacia_fence = get("acacia_fence");
    public static final Block pumpkin = get("pumpkin");
    public static final Block hellrock = get("hellrock");
    public static final Block soul_sand = get("soul_sand");
    public static final Block glowstone = get("glowstone");
    public static final BlockPortal portal = (BlockPortal)get("portal");
    public static final Block lit_pumpkin = get("lit_pumpkin");
    public static final Block cake = get("cake");
    public static final BlockRedstoneRepeater repeater = (BlockRedstoneRepeater)get("repeater");
    public static final BlockRedstoneRepeater powered_repeater = (BlockRedstoneRepeater)get("powered_repeater");
    public static final Block trapdoor = get("trapdoor");
    public static final Block stonebrick = get("stonebrick");
    public static final Block brown_mushroom_block = get("brown_mushroom_block");
    public static final Block red_mushroom_block = get("red_mushroom_block");
    public static final Block iron_bars = get("iron_bars");
    public static final Block glass_pane = get("glass_pane");
    public static final Block melon_block = get("melon_block");
    public static final Block pumpkin_stem = get("pumpkin_stem");
    public static final Block melon_stem = get("melon_stem");
    public static final Block vine = get("vine");
    public static final Block oak_fence_gate = get("oak_fence_gate");
    public static final Block spruce_fence_gate = get("spruce_fence_gate");
    public static final Block birch_fence_gate = get("birch_fence_gate");
    public static final Block jungle_fence_gate = get("jungle_fence_gate");
    public static final Block dark_oak_fence_gate = get("dark_oak_fence_gate");
    public static final Block acacia_fence_gate = get("acacia_fence_gate");
    public static final Block brick_stairs = get("brick_stairs");
    public static final Block stonebrick_stairs = get("stonebrick_stairs");
    public static final BlockMycelium mycelium = (BlockMycelium)get("mycelium");
    public static final Block waterlily = get("waterlily");
    public static final Block blood_brick = get("blood_brick");
    public static final Block blood_brick_fence = get("blood_brick_fence");
    public static final Block blood_brick_stairs = get("blood_brick_stairs");
    public static final Block black_brick = get("black_brick");
    public static final Block black_brick_fence = get("black_brick_fence");
    public static final Block black_brick_stairs = get("black_brick_stairs");
    public static final Block soul_wart = get("soul_wart");
    public static final Block enchanting_table = get("enchanting_table");
    public static final Block brewing_stand = get("brewing_stand");
    public static final BlockCauldron cauldron = (BlockCauldron)get("cauldron");
    public static final Block floor_portal = get("floor_portal");
    public static final Block portal_frame = get("portal_frame");
    public static final Block cell_rock = get("cell_rock");
    public static final Block dragon_egg = get("dragon_egg");
    public static final Block redstone_lamp = get("redstone_lamp");
    public static final Block lit_redstone_lamp = get("lit_redstone_lamp");
//    public static final BlockSlab double_wooden_slab = get("double_wooden_slab");
//    public static final BlockSlab wooden_slab = get("wooden_slab");
    public static final Block cocoa = get("cocoa");
    public static final Block sandstone_stairs = get("sandstone_stairs");
    public static final BlockOre emerald_ore = (BlockOre)get("emerald_ore");
    public static final Block warp_chest = get("warp_chest");
    public static final BlockTripWireHook tripwire_hook = (BlockTripWireHook)get("tripwire_hook");
    public static final Block string = get("string");
    public static final Block emerald_block = get("emerald_block");
    public static final Block spruce_stairs = get("spruce_stairs");
    public static final Block birch_stairs = get("birch_stairs");
    public static final Block jungle_stairs = get("jungle_stairs");
    public static final BlockBeacon beacon = (BlockBeacon)get("beacon");
    public static final Block cobblestone_wall = get("cobblestone_wall");
    public static final Block flower_pot = get("flower_pot");
    public static final Block carrot = get("carrot");
    public static final Block potato = get("potato");
    public static final Block wooden_button = get("wooden_button");
    public static final BlockSkull skull = (BlockSkull)get("skull");
    public static final Block anvil = get("anvil");
    public static final Block trapped_chest = get("trapped_chest");
    public static final Block light_weighted_pressure_plate = get("light_weighted_pressure_plate");
    public static final Block heavy_weighted_pressure_plate = get("heavy_weighted_pressure_plate");
    public static final BlockRedstoneComparator comparator = (BlockRedstoneComparator)get("comparator");
    public static final BlockRedstoneComparator powered_comparator = (BlockRedstoneComparator)get("powered_comparator");
    public static final BlockDaylightDetector daylight_detector = (BlockDaylightDetector)get("daylight_detector");
    public static final BlockDaylightDetector daylight_detector_inverted = (BlockDaylightDetector)get("daylight_detector_inverted");
    public static final Block redstone_block = get("redstone_block");
    public static final BlockOre quartz_ore = (BlockOre)get("quartz_ore");
    public static final BlockHopper hopper = (BlockHopper)get("hopper");
    public static final Block quartz_block = get("quartz_block");
    public static final Block black_quartz_block = get("black_quartz_block");
    public static final Block quartz_stairs = get("quartz_stairs");
    public static final Block black_quartz_stairs = get("black_quartz_stairs");
    public static final Block activator_rail = get("activator_rail");
    public static final Block dropper = get("dropper");
    public static final Block stained_hardened_clay = get("stained_hardened_clay");
    public static final Block iron_trapdoor = get("iron_trapdoor");
    public static final Block hay_block = get("hay_block");
    public static final Block carpet = get("carpet");
    public static final Block hardened_clay = get("hardened_clay");
    public static final Block coal_block = get("coal_block");
    public static final Block packed_ice = get("packed_ice");
    public static final Block acacia_stairs = get("acacia_stairs");
    public static final Block dark_oak_stairs = get("dark_oak_stairs");
    public static final Block slime_block = get("slime_block");
    public static final BlockDoublePlant double_plant = (BlockDoublePlant)get("double_plant");
    public static final BlockStainedGlass stained_glass = (BlockStainedGlass)get("stained_glass");
    public static final BlockStainedGlassPane stained_glass_pane = (BlockStainedGlassPane)get("stained_glass_pane");
    public static final Block banner = get("banner");
    public static final Block wall_banner = get("wall_banner");

    public static final BlockLeaves oak_leaves = (BlockLeaves)get("oak_leaves");
    public static final BlockLeaves spruce_leaves = (BlockLeaves)get("spruce_leaves");
    public static final BlockLeaves birch_leaves = (BlockLeaves)get("birch_leaves");
    public static final BlockLeaves jungle_leaves = (BlockLeaves)get("jungle_leaves");
    public static final BlockLeaves acacia_leaves = (BlockLeaves)get("acacia_leaves");
    public static final BlockLeaves dark_oak_leaves = (BlockLeaves)get("dark_oak_leaves");
    public static final BlockLeaves cherry_leaves = (BlockLeaves)get("cherry_leaves");
    public static final BlockLeaves maple_leaves = (BlockLeaves)get("maple_leaves");
    public static final BlockLeaves tian_leaves = (BlockLeaves)get("tian_leaves");
    public static final BlockLeaves blackwood_leaves = (BlockLeaves)get("blackwood_leaves");
    public static final Block cherry_stairs = get("cherry_stairs");
    public static final Block maple_stairs = get("maple_stairs");
    public static final Block cherry_door = get("cherry_door");
    public static final Block maple_door = get("maple_door");
    public static final Block cherry_fence = get("cherry_fence");
    public static final Block maple_fence = get("maple_fence");
    public static final Block cherry_fence_gate = get("cherry_fence_gate");
    public static final Block maple_fence_gate = get("maple_fence_gate");
    public static final Block nuke = get("nuke");
//    public static final BlockVerticalSlab stone_vslab = get("stone_vslab");
//    public static final BlockVerticalSlab stone_vslab2 = get("stone_vslab2");
//    public static final BlockVerticalSlab wooden_vslab = get("wooden_vslab");
//    public static final BlockVerticalSlab wooden_vslab2 = get("wooden_vslab2");
    public static final BlockOre thetium_ore = (BlockOre)get("thetium_ore");
    public static final BlockOre ardite_ore = (BlockOre)get("ardite_ore");
    public static final BlockOre gyriyn_ore = (BlockOre)get("gyriyn_ore");
    public static final BlockOre nichun_ore = (BlockOre)get("nichun_ore");
    public static final BlockOre ruby_ore = (BlockOre)get("ruby_ore");
    public static final BlockOre cinnabar_ore = (BlockOre)get("cinnabar_ore");
    public static final Block lamp = get("lamp");

    public static final Block copper_block = get("copper_block");
    public static final Block tin_block = get("tin_block");
    public static final Block aluminium_block = get("aluminium_block");
    public static final Block lead_block = get("lead_block");

    public static final Block tian = get("tian");
    public static final Block tian_soil = get("tian_soil");
    public static final BlockBush blue_mushroom = (BlockBush)get("blue_mushroom");
    public static final BlockTianReactor tian_reactor = (BlockTianReactor)get("tian_reactor");
    public static final Block red_button = get("red_button");
    public static final Block moon_rock = get("moon_rock");
    public static final Block moon_cheese = get("moon_cheese");
    public static final Block rock = get("rock");
    public static final Block ash = get("ash");
    public static final Block core = get("core");
    
    public static final BlockSlab stone_slab = (BlockSlab)get("stone_slab");
    public static final BlockSlab sandstone_slab = (BlockSlab)get("sandstone_slab");
    public static final BlockSlab stonebrick_slab = (BlockSlab)get("stonebrick_slab");

    public static final BlockDynamicLiquid flowing_blood = (BlockDynamicLiquid)get("flowing_blood");
    public static final BlockStaticLiquid blood = (BlockStaticLiquid)get("blood");
    public static final BlockDynamicLiquid flowing_mercury = (BlockDynamicLiquid)get("flowing_mercury");
    public static final BlockStaticLiquid mercury = (BlockStaticLiquid)get("mercury");
    public static final BlockDynamicLiquid flowing_magma = (BlockDynamicLiquid)get("flowing_magma");
    public static final BlockStaticLiquid magma = (BlockStaticLiquid)get("magma");
    public static final BlockDynamicLiquid flowing_hydrogen = (BlockDynamicLiquid)get("flowing_hydrogen");
    public static final BlockStaticLiquid hydrogen = (BlockStaticLiquid)get("hydrogen");
    
    private static Block get(String id) {
    	if(!BlockRegistry.REGISTRY.containsKey(id))
			throw new RuntimeException("Block " + id + " does not exist!");
		return BlockRegistry.REGISTRY.getObject(id);
    }
    
//    static {
//    	for(Field field : Blocks.class.getDeclaredFields()) {
//    		if(Block.class.isAssignableFrom(field.getType())) {
//    			if(!BlockRegistry.REGISTRY.containsKey(field.getName())) {
//    				throw new RuntimeException("Block " + field.getName() + " does not exist!");
//    			}
//    			Block block = BlockRegistry.REGISTRY.getObject(field.getName());
//    			try {
//					field.set(null, block);
//				}
//				catch(IllegalArgumentException | IllegalAccessException e) {
//					throw new RuntimeException(e);
//				}
//    		}
//    	}
//    }
}
