mojira.dev
MC-263633

Books removed from a chiseled bookshelf or lectern are not put into the player's empty hand

When a book is removed from either a chiseled bookshelf or lecturn, it is inserted into the first-most slot of the inventory instead of the player's empty hand slot.

Steps to Reproduce:

  1. Place down a chiseled bookshelf

  2. Put a book inside it
    (Empty your inventory if other items are present)

  3. Put your currently used hotbar slot to #9

  4. Take the book out

Expected & Observed Results:

❌ - The book will return to slot #1
✔ - The book would be returned to slot #9, as that is the slot the player is currently using for their hand.

Screenshots/Videos:

[media]

Notes:

This behavior is inconsistent when compared to the armor stand, where any items taken from the stand will be returned to the player's currently used hand slot.

Attachments

Comments 3

[Mod] Jingy

I can confirm in 1.20.4. This also affects the lecturn when removing a book.

[Mod] Jingy

I've written a new description, and title for this issue to include more information:
Title

Books removed from a chiseled bookshelf or lecturn are not put into the player's empty hand.

Description:

When a book is removed from either a chiseled bookshelf or lecturn, it is inserted into the first-most slot of the inventory instead of the player's empty hand slot.

h3. Steps to Reproduce:
 # Place down a chiseled bookshelf
 # Put a book inside it
(Empty your inventory if other items are present)
 # Put your currently used hotbar slot to #9
 # Take the book out
 
h3. Expected & Observed Results:
(x) - The book will return to slot #1
(/) - The book would be returned to slot #9, as that is the slot the player is currently using for their hand. 

h3. Screenshots/Videos:
 [^ChiseledBookshelf.mp4] 

h3. Notes:
This behavior is inconsistent when compared to the armor stand, where any items taken from the stand will be returned to the player's currently used hand slot.
RicTheCoder

Tested this in 1.21.4, seems to still be present, might be that the book is returned by a `add` to the inventory instead of a `set_selected` which could be what causes the issue, the adding the item should only happen if the selected slot can't take it.

Small Observation:
Even though I agree with that chiseled bookshelf and how it works for the armor stand is similar and makes sense to be on par, the Lectern requires the Take Book button to be pressed on an interface that doesn't open the inventory so it might not need the same approach.

migrated

(Unassigned)

Community Consensus

(Unassigned)

1.20.1, 1.20.4

Retrieved