papermc/patches
Bjarne Koll b33b63908e
Support complex components in written book builder (#6337)
The previously existing toBuilder method defined on the CraftMetaBook
would, no matter if called on a writable or written book, return a
builder targetting a writable book, in which complex components, such as
hover or click text are not allowed.

The builer hence serializes the page components using LEGACY_UXRC to
ensure only colour may be passed. While this works as intented for
writable books, the builder fails to fully support the complex
components that may be used in a written book.

This commit implemements a child class of the CraftMetaBookBuilder, the
CraftMetaBookSignedBuilder, which builds to a CraftMetaBookSigned
instance and hence serializes the pages to json.
This builder instance is automatically supplied when calling toBuilder
on a CraftMetaBookSigned instance.

Resolves: #6296
2021-08-08 15:57:20 -07:00
..
api [ci skip] add vs code files to .gitignore (#5663) 2021-08-07 00:27:45 +00:00
removed Update email & name (DenWav) 2021-07-19 21:07:53 -05:00
server Support complex components in written book builder (#6337) 2021-08-08 15:57:20 -07:00