Written book hoverEvent and clickEvent are working for cut off lines
The bug
When a written book created using commands has a page with more lines than the maximum of lines that can fit on the page, the remaining lines are cut off.
However, hoverEvent and clickEvent work for at least 2 of the cut off lines (despite them not being visible) and even have higher priority than the book change page arrows.
This can be exploited by having text with a clickEvent at the location of the next page arrow button. See also MC-80483.
Reproduction steps
- Place a command block, paste the following command and activate it
/give @p written_book{author:Someone,title:Title,pages:["{\"text\":\"1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9\\n10\\n11\\n12\\n13\\n14\\n15 \\n16 \",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/say /op @p\"}}",""]} - Open the book
- Click on the next page arrow in the bottom right corner of the book
Instead of turning to the next page the clickEvent is executed