The Bug:
The pick block function doesn't work with entities while in survival or adventure mode.
Using the pick block function on a block in survival or adventure mode would switch your hotbar selection to that block if you have it present in your inventory. This isn't the case for entities such as item frames, boats, paintings, minecarts, armor stands, end crystals, etc...
Steps to Reproduce:
Obtain two item frames and switch into survival mode.
Place one of them down and begin holding anything other than the item frame in your inventory.
Use the pick block function whilst looking at the item frame you just placed.
Take note as to whether or not the pick block function works with entities while in survival or adventure mode.
Observed Behavior:
The pick block function doesn't work.
Expected Behavior:
The pick block function would work.
Linked issues
is duplicated by 5
Attachments
Comments 20
Can confirm this behavior in 21w40a. Here are some extra details regarding this problem.
The Bug:
The pick block function doesn't work with entities whilst in survival or adventure mode.
Steps to Reproduce:
Obtain two item frames and switch into survival mode.
Place one of them down and begin holding anything other than the item frame in your inventory.
Use the pick block function whilst looking at the item frame you just placed, and take note as to whether or not you are now holding an item frame in your hand.
Observed Behavior:
The pick block function doesn't work with entities whilst in survival or adventure mode.
Expected Behavior:
The pick block function would work with entities whilst in survival or adventure mode.
it doesn't work due to a redundant check in the net.minecraft.client.MinecraftClient class, method doItemPick()
For blocks it checks if (type = HitResult.Type.BLOCK)
For entities it checks if (type = HitResult.Type.ENTITY|| !bl)
where bl is only true when the player is in creative mode.
bl is still used later in the code to see if the player can pull items out of creative inventory, but please, remove it from the entity check, im begging
This issue was fixed in Minecraft snapshot 24w44a due to a refactor involving the pick item functionality.
The Armor Stand part is a bug for all game modes.