mojira.dev
MC-297408

Writable book content incorrectly lingers on the client under certain circumstances

Under certain circumstances, the content of a writable book lingers on the client even though it has been deleted on the server while the player was not in the UI.

To reproduce

  1. Obtain a book and quill

  2. Type something in the book and quill, and press Done to save it

  3. While holding the book and quill, run /data get entity @s SelectedItem
    ✅ The text you wrote shows up in the output

  4. Place an always-active, repeating command block with the following command: execute as @p if data entity @s SelectedItem.components."minecraft:writable_book_content".pages[0] run item replace entity @s weapon.mainhand with writable_book
    This makes it so if you’re holding a book and quill with something written in it, it will be replaced with a fresh book and quill with no content

  5. Switch back to the book and quill from earlier, and open it
    ✅ It is blank (since it was replaced with a fresh one the moment you switched to it)

  6. Type something and press Done

  7. Once again, while holding the book and quill, run /data get entity @s SelectedItem
    ✅ What you just wrote is not present in the book’s data

  8. Open the book and quill
    ❌ What you just wrote is still there

  9. Throw out the book and pick it up again, or reload the world

  10. Open the book and quill
    ✅ What you wrote is gone

This only seems to happen when the item command is being run every tick while the game is running normally (i.e. you aren’t using the tick command to step forward one tick at a time). Very curious.

Attachments

Comments 6

When you say add it to #minecraft:tick, how is this done? Please provide complete reproduction steps

[media]

[media]

Add the data pack to a world and follow the steps in the video.

Can confirm, will update the title and description to make the report clearer

Was this issue introduced in this snapshot series?

Is this issue also present in Minecraft 1.21.5?

Muggle2077

(Unassigned)

Confirmed

Platform

Normal

Commands, Save Data, UI

1.21.5, 25w18a

Retrieved