This is how hopper in minecraft work.
--------------------------------------------------
Download in attachment.