Did that on a 3HM35. that had a blown a head gasket and a couple of the precombustion chambers had some minor pitting. No problems encountered. Just keep everything CLEAN and don't be tempted to re-use copper washers!
Get a copy of the Yanmar repair and spare part manual. There is a whole bunch of copper washers going back in and if you get the sequence wrong you are in for trouble. Otherwise not a difficult job.