// Path: org/jglrxavpok/mods/customai/common/EntityWitherSkull2.java
// public class EntityWitherSkull2 extends EntityWitherSkull
// {
// 
//     private EntityLiving owner;
// 
//     public EntityWitherSkull2(World par1World, EntityLivingBase par2EntityLivingBase, double par3, double par5, double par7)
//     {
//         super(par1World, par2EntityLivingBase, par3, par5, par7);
//     }
//     
//     public void setOwner(EntityLiving owner)
//     {
//         this.owner = owner;
//     }
//     
//     public EntityLiving getOwner()
//     {
//         return owner;
//     }
//     
//     protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
//     {
//         if (!this.worldObj.isRemote)
//         {
//             if (par1MovingObjectPosition.entityHit != null)
//             {
//                 if(this.shootingEntity == par1MovingObjectPosition.entityHit)
//                 {
//                     return;
//                 }
//                 if (this.shootingEntity != null)
//                 {
//                     if (par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeMobDamage(this.shootingEntity), 8.0F) && !par1MovingObjectPosition.entityHit.isEntityAlive())
//                     {
//                         this.shootingEntity.heal(5.0F);
//                     }
//                 }
//                 else
//                 {
//                     par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.magic, 5.0F);
//                 }
// 
//                 if (par1MovingObjectPosition.entityHit instanceof EntityLivingBase)
//                 {
//                     byte b0 = 0;
// 
//                     if (this.worldObj.difficultySetting == EnumDifficulty.NORMAL)
//                     {
//                         b0 = 10;
//                     }
//                     else if (this.worldObj.difficultySetting == EnumDifficulty.HARD)
//                     {
//                         b0 = 40;
//                     }
// 
//                     if (b0 > 0)
//                     {
//                         ((EntityLivingBase)par1MovingObjectPosition.entityHit).addPotionEffect(new PotionEffect(Potion.wither.id, 20 * b0, 1));
//                     }
//                 }
//             }
// 
//             this.worldObj.newExplosion(shootingEntity, this.posX, this.posY, this.posZ, 1.0F, false, this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"));
//             this.setDead();
//         }
//     }
// 
// }


import java.util.Random;
import org.jglrxavpok.mods.customai.common.EntityWitherSkull2;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityWitherSkull;
import net.minecraft.util.MathHelper;
        else
        {
            float f = (user.renderYawOffset + (float)(180 * (par1 - 1))) / 180.0F * (float)Math.PI;
            float f1 = MathHelper.cos(f);
            return user.posX + (double)f1 * 1.3D;
        }
    }
   
    private double func_82208_v(EntityLiving user, int par1)
    {
        return par1 <= 0 ? user.posY + 3.0D : user.posY + 2.2D;
    }

    private double func_82213_w(EntityLiving user, int par1)
    {
        if (par1 <= 0)
        {
            return user.posZ;
        }
        else
        {
            float f = (user.renderYawOffset + (float)(180 * (par1 - 1))) / 180.0F * (float)Math.PI;
            float f1 = MathHelper.sin(f);
            return user.posZ + (double)f1 * 1.3D;
        }
    }
    
    private void func_82209_a(EntityLiving user, EntityLivingBase par1EntityLivingBase, int par1, double par2, double par4, double par6, boolean par8)
    {
        user.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1014, (int)user.posX, (int)user.posY, (int)user.posZ, 0);
// Path: org/jglrxavpok/mods/customai/common/EntityWitherSkull2.java
// public class EntityWitherSkull2 extends EntityWitherSkull
// {
// 
//     private EntityLiving owner;
// 
//     public EntityWitherSkull2(World par1World, EntityLivingBase par2EntityLivingBase, double par3, double par5, double par7)
//     {
//         super(par1World, par2EntityLivingBase, par3, par5, par7);
//     }
//     
//     public void setOwner(EntityLiving owner)
//     {
//         this.owner = owner;
//     }
//     
//     public EntityLiving getOwner()
//     {
//         return owner;
//     }
//     
//     protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
//     {
//         if (!this.worldObj.isRemote)
//         {
//             if (par1MovingObjectPosition.entityHit != null)
//             {
//                 if(this.shootingEntity == par1MovingObjectPosition.entityHit)
//                 {
//                     return;
//                 }
//                 if (this.shootingEntity != null)
//                 {
//                     if (par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeMobDamage(this.shootingEntity), 8.0F) && !par1MovingObjectPosition.entityHit.isEntityAlive())
//                     {
//                         this.shootingEntity.heal(5.0F);
//                     }
//                 }
//                 else
//                 {
//                     par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.magic, 5.0F);
//                 }
// 
//                 if (par1MovingObjectPosition.entityHit instanceof EntityLivingBase)
//                 {
//                     byte b0 = 0;
// 
//                     if (this.worldObj.difficultySetting == EnumDifficulty.NORMAL)
//                     {
//                         b0 = 10;
//                     }
//                     else if (this.worldObj.difficultySetting == EnumDifficulty.HARD)
//                     {
//                         b0 = 40;
//                     }
// 
//                     if (b0 > 0)
//                     {
//                         ((EntityLivingBase)par1MovingObjectPosition.entityHit).addPotionEffect(new PotionEffect(Potion.wither.id, 20 * b0, 1));
//                     }
//                 }
//             }
// 
//             this.worldObj.newExplosion(shootingEntity, this.posX, this.posY, this.posZ, 1.0F, false, this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"));
//             this.setDead();
//         }
//     }
// 
// }


// Path: org/jglrxavpok/mods/customai/ai/WitherSkullProjectile.java
import java.util.Random;
import org.jglrxavpok.mods.customai.common.EntityWitherSkull2;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityWitherSkull;
import net.minecraft.util.MathHelper;

        else
        {
            float f = (user.renderYawOffset + (float)(180 * (par1 - 1))) / 180.0F * (float)Math.PI;
            float f1 = MathHelper.cos(f);
            return user.posX + (double)f1 * 1.3D;
        }
    }
   
    private double func_82208_v(EntityLiving user, int par1)
    {
        return par1 <= 0 ? user.posY + 3.0D : user.posY + 2.2D;
    }

    private double func_82213_w(EntityLiving user, int par1)
    {
        if (par1 <= 0)
        {
            return user.posZ;
        }
        else
        {
            float f = (user.renderYawOffset + (float)(180 * (par1 - 1))) / 180.0F * (float)Math.PI;
            float f1 = MathHelper.sin(f);
            return user.posZ + (double)f1 * 1.3D;
        }
    }
    
    private void func_82209_a(EntityLiving user, EntityLivingBase par1EntityLivingBase, int par1, double par2, double par4, double par6, boolean par8)
    {
        user.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1014, (int)user.posX, (int)user.posY, (int)user.posZ, 0);
        EntityWitherSkull2 entitywitherskull = new EntityWitherSkull2(user.worldObj, user, 0, 0, 0);