Java Edition:Invalid Written Book
A book and quill normally has limits to the amount of characters that can be typed per page and how many pages one book can have. Various bugs can be abused to break these limits to varying degrees.
History of Book Limitations
On Modified Clients
An important focus of this page is the effects of both server-side and client-side changes to limits within books and quills. However, one may use a modified client to bypass any client-side restrictions, of course, which can allow for the replication of many discontinued books and the creation of normally impossible books, as limited by the server-side requirements.
12w17a to 1.4.2
From their introduction in 12w17a (1.3 snapshot), books were required server-side to have no page with more than 256 characters and titles no longer than 16 characters. The book GUI will also limit the amount of characters per page dynamically based on the size of the contents such that the text will not protrude outside of the GUI's boundary, won't extend beyond 14 rendered lines, and will not exceed 50 pages. The book packet must also not exceed 32,767 bytes in size after compression, for both multiplayer and singleplayer.
1.4.3 to 1.7.10
1.4.3 fixed a bug[1] that allowed for more than 13 new line characters to be inserted into a single page, so any book containing a page with more than this amount is now discontinued. This also fixed the any NBT book exploit, which also ensures that the author tag is always set by the server to the player's username so it can no longer be changed with a modified client. All other previous restrictions still apply.
These changes result in any book with a page containing more than 13 new line characters to be discontinued, alongside anything created with the any NBT exploit.
14w02a to 14w21b
14w02a introduced a bug[2] (cross server packets) that exists within the server connection code that allows one to send and receive packets to and from multiple servers. If a connection is initiated to a multiplayer server, canceled quickly, and another server is joined, the client will be connected to two servers at once. The client will send packets to one, but receive packets from both. To be able to reasonably pull off the race condition, one must have a fair amount of lag (500+ms) in the connection to both servers. Programs such as clumsy can be used to create artificial network lag.
Utilizing this exploit, one can override their player's inventory client side in one server with a second server's inventory, allowing for any book to be spoofed client side, as the book from the second server does not have to be made with legitimate methods (i.e. you can use commands to create it to bypass the client GUI limits). Opening the GUI of the spoofed book, making an edit, and clicking "Done" will send the spoofed book's data to the server, regardless of it breaking the client side limitations.
The two ways this can be utilized to break book limits is to bypass the client-side page limit and the client-side character per page limit, up to their server-side limitations. There is a theoretical limit of 2,147,483,645 pages due to limits of the Java Array class, but this is unreachable due to the limits on the size book edit packet.
This recontinues books with more than 13 new line characters in a single page.
An example of cross server packets being used to create books for chunk regeneration via abusing JSON parsing can be found here, which demonstrates the process.
14w25a to 14w34b
14w25a (a 1.8 snapshot) changed the server-side requirements to have no page with more than 32,767 characters. The book GUI still limits the text length the same as before. All other previous restrictions still apply.
These changes do not result in any discontinued written books.
14w34b to 1.13-pre5
14w25a (a 1.8 snapshot) changed the server-side requirements to have no title with more than 32 characters. The book GUI still limits the title length the same as before. All other previous restrictions still apply.
These changes do not result in any discontinued written books.
1.13-pre6 to 1.13.2
1.13-pre6 introduced the ability for resource packs to specify a custom font with a TrueType font file, which also allows for the editing of character widths. By creating a special resource pack, the width of all characters can be edited to near zero, which effectively prevents them from rendering. This allows clients to utilize the full 256 characters per page regardless of character width.
These changes do not result in any discontinued written books.
18w43a to 20w16a
18w43a (a 1.14 snapshot) changed the server-side requirements to no longer limit the title length explicitly, raising its limit to the limits of NbtString
, which is 65,535 characters. The book GUI was also changed to have a new maximum limit of 1,023 characters per page regardless of character width, and the maximum page count was raised to 100. The book packet size limit was also raised to 2,097,152 bytes in raw size for multiplayer and removed completely for singleplayer. All other previous restrictions still apply.
These changes do not result in any discontinued written books.
20w17a to 1.17
20w17a (a 1.16 snapshot) unintentionally[3] changed the book GUI to limit titles to no more than 15 characters. All other previous restrictions still apply.
This change results in any book having a title longer than 15 characters being discontinued.
1.17.1 Pre-release 1 to 1.20 Pre-release 4
1.17.1 Pre-release 1 changed the server-side requirements to limit books to 100 pages. The book packet was also changed such that no page could contain more than 8,192 characters and the title could contain no more than 128 characters for multiplayer. The book packet size limit was also raised to 8,388,608 bytes in raw size and 2,097,152 bytes in compressed size for multiplayer. All other previous restrictions still apply.
These changes result in any book with a page containing more than 8,192 characters in multiplayer or more than 100 pages being discontinued.
1.20 Pre-release 5 to 1.21.4 (present)
1.20 Pre-release 5 patched cross server packets.
This change results in any book with a page containing more than 1,023 characters being discontinued.
Obtaining
In summary, here are all presently discontinued variants of written book contents:
Vanilla Client
- 12w17a to 20w16a: Books with a title of 16 characters
- 12w17a to 1.4.2 and 14w02a to 1.20 Pre-release 3: Books containing a page with more than 13 new line characters
- 14w02a to 1.17: Books with more than 100 pages
- 14w25a to 1.17: Books containing a page with more than 8,192 characters in multiplayer
- 14w25a to 1.20 Pre-release 4: Books containing a page with more than 1,023 characters
Modified Client
- 12w17a to 1.4.2: Any NBT book
- 14w25a to 1.17: Books with a page containing more than 8,192 characters in multiplayer
- 18w43a to 1.17: Books with a title of more than 128 characters in multiplayer
Combos
- Any Enchantment on Any Item
- Any Potion Tag on Any Item
- Curse of Vanishing on Any Item
- Formatted Book
- Nameless Item
- Long Name Item
- Repair Cost
Gallery
See also
- Any NBT Book
- No NBT Written Book
- Revised No Text Written Book
- Formatted Book
- Orders Book
- Infinite Box Book
- Developer Book
- Searge Book