Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-270745

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.20.5 Pre-Release 1
    • None
    • Unconfirmed
    • (Unassigned)

      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.

      2024-04-13 16-24-58.mkv

            Unassigned Unassigned
            Foebss Foebss
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: