private boolean canPlaceTorchOn(World par1World, int par2, int par3, int par4)
    {
        if (par1World.isBlockSolidOnSide(par2, par3, par4, 1))
        {
            return true;
        }
        else
        {
            int var5 = par1World.getBlockId(par2, par3, par4);

            if (var5 != Block.fence.blockID && var5 != Block.netherFence.blockID && var5 != Block.glass.blockID)
            {
                if (Block.blocksList[var5] != null && Block.blocksList[var5] instanceof BlockStairs)
                {
                    int var6 = par1World.getBlockMetadata(par2, par3, par4);

                    if ((4 & var6) != 0)
                    {
                        return true;
                    }
                }

                return false;
            }
            else
            {
                return true;
            }
        }
    }