mojira.dev
MC-55343

Pickblock does not recognize NBT data of items in player's inventory

I first pick up a command block with a command in it with ctrl-pickblock and get a entity with the "(+NBT)" information.

Then, later, I use the normal pickblock on any command block while having anything (or even nothing) in the selected slot in the hotbar and rather than getting a blank command block into my inventory it just switches the selected slot to the one with the NBT data!

The problem is that I intended to pick up a blank command block just to place a blank command block then, but what I place then, if I haven't payed attention about that I was still having the block with data in my inventory, is a command block with contents. This is a bug, that comes from the fact that the NBT data in items was introduced after the pickblock mechanics so it doesn't check this property when it tests if it can save inventory space and existing items by just switching to another slot. It is pretty annoying while mapmaking.

EDIT: I should explicitly mention here that - as the title suggests - this bug does not just happen with command blocks but with any block with NBT data. The previous description is just one example of how to reproduce the bug.

Linked issues

Comments 6

Confirmed for 14w21b

I think it is with all NBT containing things, when you have one in your inventory and press "select block" on the same block without NBT your selected slot gets to the block with NBT

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.

Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been delivered.

Frank Steffahn

(Unassigned)

Confirmed

Minecraft 14w20b, Minecraft 14w21b, Minecraft 14w32d

Retrieved