Refactor generate jump and perform jump to use average to get pos_jumping