mojira.dev
MC-139975

Hover/click events in books are vertically misaligned by about a third of a row of text

The bug

As of 18w43a, the first 1.14 snapshot, the "hitbox" for the cursor is incorrectly aligned for book click/hover events, meaning you can sometimes click the line above accidentally instead of what your cursor was hovering over.

How to reproduce

/give @p minecraft:written_book{pages:["{\"text\":\"Link to PAGE 2\",\"color\":\"blue\",\"clickEvent\":{\"action\":\"change_page\",\"value\":\"2\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"Hover text\"}}}]","[\"\",{\"text\":\"This is PAGE 2\"}]"],title:"Test Book",author:"?"}

 Hover your mouse over the top half of the line.

Here is a video demonstration: https://youtu.be/0GVYpVo99Jk

Comments 4

Confirming for 18w48a.

 

Was this the case in 1.13?

1.13.2 is unaffected and the first 1.14 snapshot, 18w43a, is affected. Probably due to the book editing changes that were introduced.

How to reproduce:
Create a simple book:

/give @p minecraft:written_book{pages:["{\"text\":\"Link to PAGE 2\",\"color\":\"blue\",\"clickEvent\":{\"action\":\"change_page\",\"value\":\"2\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"Hover text\"}}}]","[\"\",{\"text\":\"This is PAGE 2\"}]"],title:"Test Book",author:"?"}

Open the book and notice that the hover text does not appear and clicking has no effect for the top 1/3 of the line.

Thank you, I updated the description with this information

TheRedstoneBlaze

boq

Confirmed

Minecraft 18w47a, Minecraft 18w48a

Minecraft 19w03a

Retrieved