A person or public or private agency shall not be liable for any damage or subject to criminal prosecution for any act done pursuant to and in compliance with this part.