--- ../src-base/minecraft/net/minecraft/inventory/ContainerEnchantment.java
+++ ../src-work/minecraft/net/minecraft/inventory/ContainerEnchantment.java
@@ -14,6 +14,7 @@
 import net.minecraft.world.World;
 import net.minecraftforge.fml.relauncher.Side;
 import net.minecraftforge.fml.relauncher.SideOnly;
+import net.minecraftforge.oredict.OreDictionary;
 
 public class ContainerEnchantment extends Container
 {
@@ -68,9 +69,12 @@
         this.func_75146_a(new Slot(this.field_75168_e, 1, 35, 47)
         {
             private static final String __OBFID = "CL_00002185";
+            java.util.ArrayList<ItemStack> ores = net.minecraftforge.oredict.OreDictionary.getOres("gemLapis");
             public boolean func_75214_a(ItemStack p_75214_1_)
             {
-                return p_75214_1_.func_77973_b() == Items.field_151100_aR && EnumDyeColor.func_176766_a(p_75214_1_.func_77960_j()) == EnumDyeColor.BLUE;
+                for (ItemStack ore : ores)
+                    if (net.minecraftforge.oredict.OreDictionary.itemMatches(ore, p_75214_1_, false)) return true;
+                return false;
             }
         });
         int i;
@@ -152,6 +156,7 @@
                 {
                     i = 0;
                     int j;
+                    float power = 0;
 
                     for (j = -1; j <= 1; ++j)
                     {
@@ -159,37 +164,15 @@
                         {
                             if ((j != 0 || k != 0) && this.field_75172_h.func_175623_d(this.field_178150_j.func_177982_a(k, 0, j)) && this.field_75172_h.func_175623_d(this.field_178150_j.func_177982_a(k, 1, j)))
                             {
-                                if (this.field_75172_h.func_180495_p(this.field_178150_j.func_177982_a(k * 2, 0, j * 2)).func_177230_c() == Blocks.field_150342_X)
-                                {
-                                    ++i;
-                                }
+                                power += net.minecraftforge.common.ForgeHooks.getEnchantPower(field_75172_h, field_178150_j.func_177982_a(k * 2, 0, j * 2));
+                                power += net.minecraftforge.common.ForgeHooks.getEnchantPower(field_75172_h, field_178150_j.func_177982_a(k * 2, 1, j * 2));
 
-                                if (this.field_75172_h.func_180495_p(this.field_178150_j.func_177982_a(k * 2, 1, j * 2)).func_177230_c() == Blocks.field_150342_X)
-                                {
-                                    ++i;
-                                }
-
                                 if (k != 0 && j != 0)
                                 {
-                                    if (this.field_75172_h.func_180495_p(this.field_178150_j.func_177982_a(k * 2, 0, j)).func_177230_c() == Blocks.field_150342_X)
-                                    {
-                                        ++i;
-                                    }
-
-                                    if (this.field_75172_h.func_180495_p(this.field_178150_j.func_177982_a(k * 2, 1, j)).func_177230_c() == Blocks.field_150342_X)
-                                    {
-                                        ++i;
-                                    }
-
-                                    if (this.field_75172_h.func_180495_p(this.field_178150_j.func_177982_a(k, 0, j * 2)).func_177230_c() == Blocks.field_150342_X)
-                                    {
-                                        ++i;
-                                    }
-
-                                    if (this.field_75172_h.func_180495_p(this.field_178150_j.func_177982_a(k, 1, j * 2)).func_177230_c() == Blocks.field_150342_X)
-                                    {
-                                        ++i;
-                                    }
+                                    power += net.minecraftforge.common.ForgeHooks.getEnchantPower(field_75172_h, field_178150_j.func_177982_a(k * 2, 0, j));
+                                    power += net.minecraftforge.common.ForgeHooks.getEnchantPower(field_75172_h, field_178150_j.func_177982_a(k * 2, 1, j));
+                                    power += net.minecraftforge.common.ForgeHooks.getEnchantPower(field_75172_h, field_178150_j.func_177982_a(k, 0, j * 2));
+                                    power += net.minecraftforge.common.ForgeHooks.getEnchantPower(field_75172_h, field_178150_j.func_177982_a(k, 1, j * 2));
                                 }
                             }
                         }
@@ -199,7 +182,7 @@
 
                     for (j = 0; j < 3; ++j)
                     {
-                        this.field_75167_g[j] = EnchantmentHelper.func_77514_a(this.field_75169_l, j, i, itemstack);
+                        this.field_75167_g[j] = EnchantmentHelper.func_77514_a(this.field_75169_l, j, (int)power, itemstack);
                         this.field_178151_h[j] = -1;
 
                         if (this.field_75167_g[j] < j + 1)
