No sweat. Actually 18gr is probably, historically, the most popular weight for .22 caliber Spring gun users over the years...at least it used to be until the past few years when a whole lot of new pellet weights and shapes began to be available to the sport.
The spring in the gun, or an air piston for that matter, does not know or care what weight the pellet is. The power plant will provide "X" pounds of compression against the top of the pressure chamber no matter whether you use 12gr or 21gr pellets...the only difference is the heavier pellet will go a bit slower leaving the muzzle.
I used 18 and 21gr pellets for hunting at distances of 30 to 40 yards in all my .22 caliber mechanical guns and never had a problem. The 18 was the best all around for accuracy and energy at the point of impact for my pest control needs in the back yard. So have some fun!!!
Uncle Hoot