Dynamic nuclear polarisation, which transfers the spin polarisation of electrons to nuclei, is routinely applied to enhance the sensitivity of nuclear magnetic resonance; it is also critical in spintronics, particularly when spin hyperpolarisation can be produced and controlled optically or electrically. Here we show the complete polarisation of nuclei located near the optically-polarised nitrogen-vacancy (NV) centre in diamond. When approaching the ground-state level anti-crossing condition of the NV electron spins, 13C nuclei in the first-shell are polarised in a pattern that depends sensitively and sharply upon the magnetic field. Based on the anisotropy of the hyperfine coupling and of the optical polarisation mechanism, we predict and observe a complete reversal of the nuclear spin polarisation with a few-mT change in the magnetic field. The demonstrated sensitive magnetic control of nuclear polarisation at room temperature will be useful for sensitivity-enhanced NMR, nuclear-based spintronics, and quantum computation in diamond.