package net.silentchaos512.gems.block;

import java.util.List;

import net.minecraft.block.SoundType;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.silentchaos512.gems.SilentGems;
import net.silentchaos512.gems.lib.EnumGem;
import net.silentchaos512.gems.lib.Names;
import net.silentchaos512.lib.util.RecipeHelper;

public class BlockGem extends BlockGemSubtypes {

  public final boolean supercharged;

  public BlockGem(boolean dark, boolean supercharged) {

    super(dark, Names.GEM_BLOCK + (supercharged ? "Super" : "") + (dark ? "Dark" : ""));
    this.supercharged = supercharged;

    setHardness(supercharged ? 7.0f : 3.0f);
    setResistance(supercharged ? 6000000.0F : 30.0f);
    setStepSound(SoundType.METAL);
    setHarvestLevel("pickaxe", supercharged ? 3 : 1);
  }

  @Override
  public void addRecipes() {

    for (int i = 0; i < 16; ++i) {
      EnumGem gem = getGem(i);

      if (supercharged) {
        GameRegistry.addRecipe(new ShapedOreRecipe(gem.getBlockSuper(), " g ", "gog", " g ", 'g',
            gem.getItemSuperOreName(), 'o', Blocks.obsidian));
      } else {
        RecipeHelper.addCompressionRecipe(gem.getItem(), gem.getBlock(), 9);
      }
    }
  }

  @Override
  public void addOreDict() {

    for (int i = 0; i < 16; ++i) {
      EnumGem gem = getGem(i);
      if (supercharged) {
        OreDictionary.registerOre(gem.getBlockSuperOreName(), gem.getBlockSuper());
      } else {
        OreDictionary.registerOre(gem.getBlockOreName(), gem.getBlock());
      }
    }
  }

  @Override
  public void addInformation(ItemStack stack, EntityPlayer player, List<String> list,
      boolean advanced) {

    list.addAll(SilentGems.instance.localizationHelper
        .getBlockDescriptionLines(blockName.replaceFirst("Dark", "")));
  }

  @Override
  public boolean canEntityDestroy(IBlockState state, IBlockAccess world, BlockPos pos,
      Entity entity) {

    // Does not prevent Withers from breaking. Only the Ender Dragon seems to call this...
    if (supercharged) {
      return entity instanceof EntityPlayer;
    }
    return super.canEntityDestroy(state, world, pos, entity);
  }
}

@@ -286,25 +286,26 @@
 ft.item.
-ItemStack
+EnumRarity
 ;%0Aimport
@@ -323,26 +323,22 @@
 aft.
-util.math.BlockPos
+item.ItemStack
 ;%0Aim
@@ -360,23 +360,26 @@
 aft.
-world.Explosion
+util.math.BlockPos
 ;%0Aim
@@ -421,42 +421,8 @@
 ss;%0A
-import net.minecraft.world.World;%0A
 impo
@@ -2204,32 +2204,155 @@
 k%22, %22%22)));%0A  %7D%0A%0A
+  @Override%0A  public EnumRarity getRarity(int meta) %7B%0A%0A    return supercharged ? EnumRarity.RARE : EnumRarity.COMMON;%0A  %7D%0A%0A
   @Override%0A  pu

Add rarity getter for gem blocks