Repository navigation
fix: store the hidden book glint on the books, not in packets - #54
Conversation
Clients hash every stack they click (1.21.5+). Books whose glint was hidden only in inventory packets never matched the server's copy, so each click resent the cursor; a resend arriving after the next click left a ghost book on the cursor (e.g. placing a letter in a barrel). BookGlintStamper now sets the glint override on real signed books in player inventories (every second) and in containers when opened, tagged with tfmccore:hidden_glint so turning the option off restores only those. BookGlintHider keeps hiding books shown on entities only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@coderabbitai review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
✅ Action performedReview finished.
|
Problem
A player reported that placing a letter in a barrel leaves a fake copy of it on the mouse cursor.
Since 1.21.5, every inventory click sends the server a hash of each stack the client sees.
BookGlintHiderchanged the glint on signed books only in outgoing inventory packets, so the client's copy of every letter or signed book never matched the server's. Paper resyncs a mismatched cursor withClientboundSetCursorItemPacket, which carries no state id. If that resync from the pick-up click arrives after the client has already placed the book, the client puts the book back on its cursor. The place click reported an empty cursor, which matches the server, so nothing ever corrects it.Fix
BookGlintStamperstores the glint override (false) on real signed books, so client and server hold the same item.tfmccore:hidden_glint. Withhide-book-glint: false, only tagged books get their glint back. Books with their own override are never touched.BookGlintHidernow only rewrites entity packets (dropped items, item frames, displays, equipment), for books the stamper hasn't reached yet. It no longer touches inventory or creative packets.Testing
mvn verify: 827 tests pass, and the 100% line coverage gate passes.~/glint-test/test.js, real character bot), 21/21 pass:Mineflayer doesn't compute real item hashes, so a bot can't replay the exact click race. With no inventory packet rewritten, a real client now hashes exactly the item the server holds.
Notes
🤖 Generated with Claude Code