This really ought to go without saying, but if you are not a Japanese citizen, you are not automatically entitled to Japan's laws (regarding statuatory r*** or otherwise). An American visiting Japan is still subject to American laws even in Japan (so long as those laws don't undermine Japanese laws); even if you were in a prefecture with a low age of consent, and had a consentual relationship with a "minor", you would still be breaking the law. Additionally, certain countries have extradition agreements, which would allow your home government to bring you back and send you straight to jail/court.