mojira.dev
MC-270745

Clicking on a command in a written book that exceeds 256 characters kicks the player from the game

Closely related to MC-270679

I'm currently trying to make a utility command library through the use of a written book. I have been trying to fix it because of the recent component update. There was an interesting issue I came across once I tried to run a command that exceeded 256 characters. Normally, if you tried to use a command that exceeds 256 characters in regular chat, the chat would cut you off. In the case of a written book, it kicks the player running the command from the game.

This is the command that I used: (in a command block)

/give @p written_book[minecraft:written_book_content={pages: [{raw: '{"extra":[{"clickEvent":{"action":"run_command","value":"/tellraw @a \\"Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler Data Filler\\""},"text":"Test"}],"text":" "}'}],author:"Fobes",title:{raw:"Test"},resolved:1}]

The following error shows up:

Internal Exception: io.netty.handler.codec.EncoderException: Failed to encode packet 'serverbound/minecraft:chat_command'

I have also provided the video as to what happens once the command in the book is ran.

[media]

Linked issues

Attachments

Comments 1

Thank you for your report!
We're tracking this issue in MC-268984, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.

Foebss

(Unassigned)

Unconfirmed

(Unassigned)

1.20.5 Pre-Release 1

Retrieved