Java Edition "pick block" works like so. Each bullet point is attempted, and subsequent bullet points are only attempted if prior ones failed (i.e. don't do behavior #3 if #2 already succeeded)
If the picked item is already in the hotbar, switch to it.
If the picked item is in the inventory, move it to the first empty slot on the hotbar after the selected slot and switch to it. If the hotbar is full, swap the held item with the picked item.
If the player is in creative mode, create the picked item, add it to the first empty slot on the hotbar after the selected slot, and switch to it. If the hotbar is full, move the held item to the inventory.
Bedrock Edition "pick block" simply overwrites the held item with the picked item, and doesn't work in survival (this is covered in MCPE-12456).
EDIT: As of 1.2.10, point #1 has been implemented, but only in creative mode.
Linked issues
is duplicated by 1
relates to 2
Comments 4
In 1.2.13, newly created items appear to be created in the first available slot in the hotbar, instead of the first available slot after/including the currently selected slot.
Example 1:
Empty hotbar with the center slot selected. Pick block on grass.
Expected behavior: Grass appears in center slot.
Actual behavior: Grass appears in first slot and is selected.
Example 2:
Hotbar with one sand block selected in the center slot. Pick block on grass.
Expected behavior: Grass appears to the right of the center and is selected.
Actual behavior: Grass appears in first slot and is selected.
Mostly fixed in 1.2.10.1 - the remaining difference is that it doesn't pull an existing item out of your inventory, but gives you a new single item instead.