mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
SPIGOT-4679 Fix black lines after book paragraphs
Also increase max page count to 100 to match 1.14
This commit is contained in:
parent
1215188ff7
commit
b0ef3996ed
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
|
||||||
static final ItemMetaKey BOOK_PAGES = new ItemMetaKey("pages");
|
static final ItemMetaKey BOOK_PAGES = new ItemMetaKey("pages");
|
||||||
static final ItemMetaKey RESOLVED = new ItemMetaKey("resolved");
|
static final ItemMetaKey RESOLVED = new ItemMetaKey("resolved");
|
||||||
static final ItemMetaKey GENERATION = new ItemMetaKey("generation");
|
static final ItemMetaKey GENERATION = new ItemMetaKey("generation");
|
||||||
static final int MAX_PAGES = 50;
|
static final int MAX_PAGES = 100;
|
||||||
static final int MAX_PAGE_LENGTH = 320; // 256 limit + 64 characters to allow for psuedo colour codes
|
static final int MAX_PAGE_LENGTH = 320; // 256 limit + 64 characters to allow for psuedo colour codes
|
||||||
static final int MAX_TITLE_LENGTH = 32;
|
static final int MAX_TITLE_LENGTH = 32;
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
|
||||||
if (hasPages()) {
|
if (hasPages()) {
|
||||||
NBTTagList list = new NBTTagList();
|
NBTTagList list = new NBTTagList();
|
||||||
for (IChatBaseComponent page : pages) {
|
for (IChatBaseComponent page : pages) {
|
||||||
list.add(new NBTTagString(page == null ? "" : page.getString()));
|
list.add(new NBTTagString(page == null ? "" : page.e())); // PAIL getLegacyString
|
||||||
}
|
}
|
||||||
itemData.set(BOOK_PAGES.NBT, list);
|
itemData.set(BOOK_PAGES.NBT, list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue