Added check to only throw item when certain blocks are clicked

Prevents accidentally throwing bricks while opening chests, crafting
benches, etc.