When a user right-clicks a certain type of block while holding a block in the hand, depending on the type (or state?) of the right-clicked block on the ground, the held block is placed either on it’s side (eg.: stone, dirt, …), or replaces the block on the ground (eg.: snow layer, tall grass, …). How can I figure out, how it will behave?
Additionally, is it also possible to figure out whether a block would be placed when a user right-clicks it? When a user right-clicks a lever or a button, the held block isn’t placed.