PaperMC / PaperMC/Paper

chiseled bookshelf does not get updated after hopper pulls book

Open
#11,740 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scope: parity status: accepted version: 1.21.1 version: 1.21.11 version: 1.21.4
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

If you place a book in a chiseled bookshelf with a hopper beneath it, the hopper, if it has free inv space, pulls the book out of the bookshelf and the book is visually removed from the bookshelf, the state (f3 slot_x_occupied) is set to false and the book is removed from its inv.

Observed/Actual behavior

If there already are books inside the hopper and after pulling out the book from the bookshelf the book stacks with the books inside the hopper the bookshelf is not updated correctly. But if there are for example 32 books in the last slot of the hopper and the other slots are free everything works normally because the book gets transfered into the first hopper slot and does not stack with 32 books in the last slot. The bug only occurs if the book stacks with books in the hopper. If the bug occurs the book gets pulled into the hopper but is still displayed in the bookshelf but you cannot take it out since it was already pulled out by the hopper and you also cannot put a book in that slot. In f3 you can see the info slot_x_occupied is still true. Only after you insert a book into another slot or take another book out of another slot the bookshelf gets updated

Steps/models to reproduce
  1. place a hopper and on top a chiseled bookshelf
  2. put a book into the first slot of the hopper
  3. put a book into the bookshelf
  4. the hopper pulled out the book and stacked onto the containing book but the booshelf still displays the book
  5. empty the hopper and put one book into the last slot (or any other thats not the first)
  6. put a book into the last slot of the hopper
  7. put a book into the bookshelf
  8. the hopper pulled out the book and put it into the first slot and the bookshelf is empty
Plugin and Datapack List

Server Plugins (0):
There are 3 data pack(s) enabled: [vanilla (build-in)], [file/bukkit (world)], [paper (build-in)]
There are no more datapacks available

Paper version

This server is running Paper version 1.21.1-132-ver/1.21.1@b48403b (2024-11-21-T10:14:27Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.1-119-7cd4f2c (MC: 1.21.1)

Other

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a hopper beneath a chiseled bookshelf, first stacking the pulled book with an existing hopper book and then transferring into another slot. Trace the hopper/bookshelf interaction and compare the bookshelf's visual state and slot_x_occupied state after stacking. Done means the book is removed visually and from the bookshelf inventory in both stacking cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.