How to reproduce:
Place a chiseled bookshelf
add a book to the first slot (top left)
standing on top of the block, execute
/item replace block ~ ~-1 ~ container.0 with air
-> the book will not be removed
Removing an item like this works for every single other block entity container in the game (except for jukeboxes, also being affected by this since being made a container block entity).
Possible fix: Update the if clause in the setItem method in ChiseledBookShelfBlockEntity to allow empty items
Comments 5
Jukeboxes is WAI, see MC-69387.
You could request it to be reviewed, but it shouldn't be included here.
69387 doesn't apply to this, jukeboxes are actual item containers now and you can use the command to set records - you just can't remove them with the command
@Avoma The new title isn't fully correct; You can replace books, but you cannot remove them (or I suppose replace with air specifically). You also removed the jukebox part, which is part of the same issue
This issue also affects jukeboxes in 1.19.4.