Off-duty pilot used 'magic mushrooms', court hears