  The apparent properties of distant objects encode information about the way
the light they emit propagates to an observer, and therefore about the
curvature of the underlying spacetime. Measuring the relationship between the
redshift $z$ and the luminosity distance $D_{\rm L}$ of a standard candle, for
example, yields information on the Universe's matter content. In practice,
however, in order to decode this information the observer needs to make an
assumption about the functional form of the $D_{\rm L}(z)$ relation; in other
words, a cosmological model needs to be assumed. In this work, we use
numerical-relativity simulations, equipped with a new ray-tracing module, to
numerically obtain this relation for a few black-hole--lattice cosmologies and
compare it to the well-known Friedmann-Lema\^itre-Robertson-Walker case, as
well as to other relevant cosmologies and to the Empty-Beam Approximation. We
find that the latter provides the best estimate of the luminosity distance and
formulate a simple argument to account for this agreement. We also find that a
Friedmann-Lema\^itre-Robertson-Walker model can reproduce this observable
exactly, as long as a time-dependent cosmological constant is included in the
fit. Finally, the dependence of these results on the lattice mass-to-spacing
ratio $\mu$ is discussed: we discover that, unlike the expansion rate, the
$D_{\rm L}(z)$ relation in a black-hole lattice does not tend to that measured
in the corresponding continuum spacetime as $\mu \to 0$.
