Hopefully you are now in C and have calmed down dramatically. Next time he gets in a pissy mood you need to act "as-if". When he doesn't want to talk about it then shrug it off and ignore the mood. Have a regular chat while he is there offer something to drink..go about like nothing is wrong at all. It doesn't always work but most of the time this method will cause them to come out of their funk without you getting yourself upset and escalating the situation.