def save(self):
        '''
        Saves all waypoint information to the 'mcedit_waypoints.dat' file in the world directory
        '''
        del self.nbt_waypoints["Waypoints"]
        self.nbt_waypoints["Waypoints"] = nbt.TAG_List()
        for waypoint in self.waypoints.keys():
            if waypoint.split()[0] == "Empty":
                continue
            way = nbt.TAG_Compound()
            way["Name"] = nbt.TAG_String(waypoint.split()[0])
            way["Dimension"] = nbt.TAG_Int(self.waypoints[waypoint][5])
            coords = nbt.TAG_List()
            coords.append(nbt.TAG_Float(self.waypoints[waypoint][0]))
            coords.append(nbt.TAG_Float(self.waypoints[waypoint][1]))
            coords.append(nbt.TAG_Float(self.waypoints[waypoint][2]))
            rot = nbt.TAG_List()
            rot.append(nbt.TAG_Float(self.waypoints[waypoint][3]))
            rot.append(nbt.TAG_Float(self.waypoints[waypoint][4]))
            way["Coordinates"] = coords
            way["Rotation"] = rot
            self.nbt_waypoints["Waypoints"].append(way)
        self.nbt_waypoints.save(os.path.join(self.worldDirectory, u"mcedit_waypoints.dat"))

        Saves all waypoint information to the 'mcedit_waypoints.dat' file in the world directory
        
waypoints.py