Diffraction of plane waves at the interface of two semi-infinite regions is considered for the case when one of the regions is filled with a metamaterial in the form of a 3D periodic lattice of dipole-type particles. The diffraction problem is solved via the method of compensating sources, which is extended to the case of 3D structures. Different formulations of the diffraction problem that is reduced to either a system of Wiener-Hopf functional equations or a system of linear algebraic equations are presented. Representation of a semi-infinite structure by a sequence of layers characterized by wave transmission matrices is analyzed. It is shown that such matrices can be used to obtain the solution to the diffraction problem in an explicit form.