Ported ClientTickHandler.