We separately identify two mechanisms underlying peer effects in farm households' adoption of a new crop. A farmer can follow his peers to adopt a new crop because he learns knowledge about the new crop from them (social learning) and because he wants to avoid the damage caused by the practice conflicting with theirs (externalities). Using an agent-based model, we simulate the two mechanisms on a multiplex network consisting of two types of social relationships. The simulation model is estimated using detailed data of social networks, adoption and relevant socio-economic characteristics from 10 villages in China. We find that social learning -- in this case, the sharing of experiential resources -- among family members and production externalities between contiguous land plots both significantly influence farmers' adoption. Furthermore, sharing of experiential resources plays a significant role in the entire diffusion process and dominates the early phase, whereas externalities only matter in the late phase. This study shows the roles peer effects play in shaping diffusion can occur through different mechanisms and can vary as the diffusion proceeds. The work also suggests that agent-based models can help disentangle the role of social interactions in promoting or hindering diffusion.