Mojira Archive
MC-197600

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

  1. 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\"}}",""]}
    
  2. Open the book
  3. 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

Unresolved

Marcono1234

2020-08-10, 01:49 PM

2023-08-22, 02:25 PM

0

2

Confirmed

Normal

Platform

Commands, UI

1.16.2 Release Candidate 1, 1.16.2

-