mojira.dev
MC-267221

"value" within "change_page" clickEvent json looks for a string instead of an integer

Within book json text components, when trying to add a "change_page" clickEvent the json resolution looks for a string rather than an integer, breaking book json components.

How to replicate:

use command to give book:

Works:

/give @s written_book{author:"test",title:"test",pages:['{"text":"goto page 2","clickEvent":{"action":"change_page","value":"2"}}', '{"text":"page 2"}']}

What is expected but does not work:

/give @s written_book{author:"test",title:"test",pages:['{"text":"goto page 2","clickEvent":{"action":"change_page","value":2}}', '{"text":"page 2"}']}

Attachments

Comments 1

Confirmed, it doesn't even parse.
Other easier way to check is to insert the json in a command and look at the error:

[media]

MukiTanuki

gegy

Community Consensus

Platform

Important

Commands

1.20.4, 23w51b, 24w03a, 24w03b, 24w05a, ..., 24w19b, 24w20a, 1.21 Pre-Release 2, 1.21, 1.21.3

25w02a

Retrieved