Sex offender Johnathan Tamihana has been sentenced to preventive detention after he attacked two people at a reserve in South Auckland.