I taught my huge Gloucester old spot boar to wait by his pallet for food as he started barging me, it took 2 -3 days of giving him a firm tap on the nose with a stick saying no, then pointing at the pallet and saying wait, I'd then put a tiny bit of food on the pallet, when he ate I said good boy, he learnt so quickly and never nips or barges now.