def METHOD_NAME(self):
    with open(self.get_filepath(), 'wb') as file_writer:
        # Write version.
        file_writer.write(PacketWriter.string_to_bytes(Constants.MAPS_VERSION))
        # Write heightfield.
        with HeightField(self) as heightfield:
            heightfield.write_to_file(file_writer)
        # Write area information.
        self._write_area_information(file_writer)
        # Write liquids.
        with LiquidAdtWriter(self) as liquids:
            liquids.write_to_file(file_writer)