private void createEnderPortal(int par1, int par2)
    {
        byte var3 = 64;
        BlockEndPortal.bossDefeated = true;
        byte var4 = 4;

        for (int var5 = var3 - 1; var5 <= var3 + 32; ++var5)
        {
            for (int var6 = par1 - var4; var6 <= par1 + var4; ++var6)
            {
                for (int var7 = par2 - var4; var7 <= par2 + var4; ++var7)
                {
                    double var8 = (double)(var6 - par1);
                    double var10 = (double)(var7 - par2);
                    double var12 = (double)MathHelper.sqrt_double(var8 * var8 + var10 * var10);

                    if (var12 <= (double)var4 - 0.5D)
                    {
                        if (var5 < var3)
                        {
                            if (var12 <= (double)(var4 - 1) - 0.5D)
                            {
                                this.worldObj.setBlockWithNotify(var6, var5, var7, Block.bedrock.blockID);
                            }
                        }
                        else if (var5 > var3)
                        {
                            this.worldObj.setBlockWithNotify(var6, var5, var7, 0);
                        }
                        else if (var12 > (double)(var4 - 1) - 0.5D)
                        {
                            this.worldObj.setBlockWithNotify(var6, var5, var7, Block.bedrock.blockID);
                        }
                        else
                        {
                            this.worldObj.setBlockWithNotify(var6, var5, var7, Block.endPortal.blockID);
                        }
                    }
                }
            }
        }

        this.worldObj.setBlockWithNotify(par1, var3 + 0, par2, Block.bedrock.blockID);
        this.worldObj.setBlockWithNotify(par1, var3 + 1, par2, Block.bedrock.blockID);
        this.worldObj.setBlockWithNotify(par1, var3 + 2, par2, Block.bedrock.blockID);
        this.worldObj.setBlockWithNotify(par1 - 1, var3 + 2, par2, Block.torchWood.blockID);
        this.worldObj.setBlockWithNotify(par1 + 1, var3 + 2, par2, Block.torchWood.blockID);
        this.worldObj.setBlockWithNotify(par1, var3 + 2, par2 - 1, Block.torchWood.blockID);
        this.worldObj.setBlockWithNotify(par1, var3 + 2, par2 + 1, Block.torchWood.blockID);
        this.worldObj.setBlockWithNotify(par1, var3 + 3, par2, Block.bedrock.blockID);
        this.worldObj.setBlockWithNotify(par1, var3 + 4, par2, Block.dragonEgg.blockID);
        BlockEndPortal.bossDefeated = false;
    }