@Override
  public boolean onEntityInteract(EntityPlayer player, Entity entity, boolean isAttack) {

    if (entity instanceof EntityLiving) {
      ItemStack stack = player.getCurrentEquippedItem();
      if (stack != null
          && !player.worldObj.isRemote
          && InfiToolPowers.freezingEnchant(stack, (EntityLiving) entity)) {
        // entity.worldObj.playSoundAtEntity(entity, "random.glass", 1.0F, this.rand.nextFloat() -
        // this.rand.nextFloat() * 0.2F + 1.0F);
        entity.attackEntityFrom(
            DamageSource.causePlayerDamage(player), stack.getDamageVsEntity(entity));
        ((EntityLiving) entity).freeze(500);
        return false;
      } else {
        return true;
      }
    } else {
      return true;
    }
  }
  public void attacks(
      ItemStack itemstack,
      World world,
      EntityLiving entityliving,
      EntityLiving entityliving1,
      int i) {
    switch (i) {
      case 1:
        InfiToolPowers.splinterAttack(entityliving, mod_InfiTools.woodSplinters, world);
        break;
      case 2:
        InfiToolPowers.splinterAttack(entityliving, mod_InfiTools.stoneShard, world);
        break;
      case 7:
        InfiToolPowers.splinterAttack(entityliving, mod_InfiTools.obsidianShard, world);
        break;
      case 8:
        InfiToolPowers.splinterAttack(entityliving, mod_InfiTools.sandstoneShard, world);
        break;
      case 12:
        InfiToolPowers.splinterAttack(entityliving, mod_InfiTools.netherrackShard, world);
        break;

      case 13:
        InfiToolPowers.splinterAttack(entityliving, Item.lightStoneDust, world);
        break;

      case 14:
        entityliving1.freeze();
        break;

      case 15:
        entityliving1.setFire(100);
        break;

      case 20:
        entityliving1.setFire(100);
        break;
    }
  }
 public void attacks(
     ItemStack itemstack, World world, EntityLiving player, EntityLiving mob, int materialType) {
   switch (materialType) {
     case 1:
       InfiToolPowers.splinterAttack(player, mod_InfiBase.woodSplinters, world);
       break;
     case 2:
       InfiToolPowers.splinterAttack(player, mod_InfiBase.stoneShard, world);
       break;
     case 6:
       InfiToolPowers.splinterAttack(player, mod_InfiBase.obsidianShard, world);
       break;
     case 7:
       InfiToolPowers.splinterAttack(player, mod_InfiBase.sandstoneShard, world);
       break;
     case 11:
       InfiToolPowers.splinterAttack(player, mod_InfiBase.netherrackShard, world);
       break;
     case 12:
       InfiToolPowers.splinterAttack(player, Item.lightStoneDust, world);
       break;
     case 13:
       mob.freeze(35);
       break;
     case 14:
       mob.setFire(40);
       break;
     case 15:
       InfiToolPowers.splinterAttack(player, Item.slimeBall, world);
       break;
     case 18:
       mob.setFire(100);
       break;
     case 26:
       mob.addPotionEffect(new PotionEffect(Potion.poison.id, 3 * 20, 0));
   }
 }