[SPIGOT-3236] Books with long text content are broken in recent spigot Created: 13/May/17 Updated: 14/May/17 Resolved: 13/May/17 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Brokkonaut | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | Spigot, books | ||
| Attachments: |
|
| Description |
|
Since this update: books with long texts are broken. To create book like this use in a command block or the console: give @p minecraft:writable_book 1 0 {title:"a",author:"abc",pages:["iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii12345"]} If you try that in vanilla it will work, if you try it in spigot, the text is cut.
this also happens when you use the ingame minecraft book editor, fill the book with a lot of i's until you can input no more, remove about 10 characters, replace them with single chars each in one line, close the book, reopen it the last chars will be cut. Before reopening the book:
After reopening:
To fix this i would recommend to increase the character limit for a page to 512 or more (maybe even 1024?) - that should be enough for "normal" texts - while 256 is not enough.
The page limit is also too small, by using commands you can create books with much more than 50 pages, this works perfectly in vanilla, but no longer in spigot. In recent vanilla, created with a command block:
|
| Comments |
| Comment by pokechu22 [ 14/May/17 ] |
|
You shouldn't be using § in books. Yes, § is the only way to type, but if you're going to do it via a command (which is the only way you'd have gotten it over 256) you should be using chat components. |
| Comment by BillyGalbreath [ 14/May/17 ] |
|
R.I.P. color codes in books. :'( A better limit would have been 256 * 3 to be able to handle at most 256 rainbow colored characters. Current limit caps to 85 rainbow colored characters. Example: 256 characters: §0a§1b§2c§3d§4e§5f§6g§7h§8i§9j§ak§bl§cm§dn§eo§fp§0a§1b§2c§3d§4e§5f§6g§7h§8i§9j§ak§bl§cm§dn§eo§fp§0a§1b§2c§3d§4e§5f§6g§7h§8i§9j§ak§bl§cm§dn§eo§fp§0a§1b§2c§3d§4e§5f§6g§7h§8i§9j§ak§bl§cm§dn§eo§fp§0a§1b§2c§3d§4e§5f§6g§7h§8i§9j§ak§bl§cm§dn§eo§fp§0a§1b§2c§3d§4e§ Visible in book: abcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcde |
| Comment by md_5 [ 14/May/17 ] |
String s1 = s + p_146459_1_; int i = this.fontRendererObj.getWordWrappedHeight(s1 + "" + TextFormatting.BLACK + "_", 118); if (i <= 128 && s1.length() < 256) { this.pageSetCurrent(s1); } The Minecraft 1.11.2 client has that code limiting it to 256 characters. Its the client stopping you from entering more than 256 characters onto a page, not the server. We haven't (and cannot) change client behaviour. The only behaviour we have changed is how long you can make books using the server (commands etc). |
| Comment by Brokkonaut [ 14/May/17 ] |
|
They are not... Try what I wrote here, you only need a vanilla client and no commands and the content is truncated. But what is allowed by commands (more pages and even longer texts) is also vanilla and should be supported. This new limitation just beaks things for no reason - If someone wants to limit it more than vanilla allows he could use plugins or maybe some server config setting.. |
| Comment by md_5 [ 13/May/17 ] |
|
Books are limited to 256 characters per page. This is the max length that can be input with a vanilla client. |
| Comment by Black Hole [ 13/May/17 ] |
|
Related to |