mojira.dev
MC-59362

Written books given by commands will have * Invalid book tag * in it

What I expected to happen was...:
/give @p written_book 1 0 {display:{Name:"Menu"},pages:["{text:\"Menu (Click to activate):\n\n\n\"}"]}
should give the player a book with text inside

What actually happened was...:
A command made in 14w25b will now just give a book with the text * Invalid book tag * in it.
All books given have this inside
/give @p minecraft:written_book
should be an empty book but it ll have the error in it

Linked issues

Comments 3

I have a similar issue when trying to use the below code for a book

/give @p written_book 1 0 {title:"Matrix Server Guide",author:"Morpheus1101",pages:["{text:\"Welcome, \",extra:[
{selector:\"@p\",color:red}
,
{text:\"\n\nthis is your list of destinations:\n\n\"}
,{text:\"1. \",color:orange,extra:[
{text:\"Start Spawn\",color:dark_green,bold:flase}
],hoverEvent:
{action:show_text,value:\"Start Spawn\"}
,clickEvent:{action:run_command,value:\"/trigger tp set 2\"}},
{text:\"\n\"}
,{text:\"2. \",color:orange,extra:[
{text:\"Start Survival\",color:dark_green}
],hoverEvent:
{action:show_text,value:\"Survival Start\"}
,clickEvent:{action:run_command,value:\"/trigger tp set 3\"}},
{text:\"\n\"}
,{text:\"3. \",color:orange,extra:[
{text:\"Bank & Lottery\",color:dark_green}
],hoverEvent:
{action:show_text,value:\"Bank & Lottery\"}
,clickEvent:{action:run_command,value:\"/trigger tp set 1\"}},
{text:\"\n\"}
,{text:\"4. \",color:orange,extra:[
{text:\"Villager Center\",color:dark_green}
],hoverEvent:
{action:show_text,value:\"Villager Center\"}
,clickEvent:{action:run_command,value:\"/trigger tp set 5\"}},
{text:\"\n\nPlease click one of them, \"}
,
{selector:\"@p\",color:red}
]}"]}

However in saying this, when using a Custom Book code done by Searge as per below, the book actually works an gives you what its meant to be, which in some instance makes me think something broken in our code.

/give @p written_book 1 0 {title:"Getting around",author:"Searge",pages:["{text:\"Welcome, \",extra:[
{selector:\"@p\",color:red}
,
{text:\"\n\nthis is your list of destinations:\n\n\"}
,{text:\"1. \",color:orange,extra:[
{text:\"Spawn\",color:dark_green,bold:true}
],hoverEvent:
{action:show_text,value:\"This worlds spawn point\"}
,clickEvent:{action:run_command,value:\"/tp @p -305 56 169\"}},
{text:\"\n\"}
,{text:\"2. \",color:orange,extra:[
{text:\"Home\",color:dark_green}
],hoverEvent:
{action:show_text,value:\"Your main base\"}
,clickEvent:{action:run_command,value:\"/tp @p 5 56 96\"}},
{text:\"\n\"}
,{text:\"3. \",color:orange,extra:[
{text:\"Mine\",color:dark_green}
],hoverEvent:
{action:show_text,value:\"The old mines\"}
,clickEvent:{action:run_command,value:\"/tp @p 15 56 -318\"}},
{text:\"\n\nPlease click one of them, \"}
,
{selector:\"@p\",color:red}
]}"]}

It seems it has been changed a little bit how books work. For me it works now when i add a title instead of display name and an author and warrens code only works when the title has no spaces in it.

I took spaces out an changed all spawn points to be 1 word but still only shows INVALID BOOK TAG .. but my code is basically an addition on what Searge has which works perfectly.

EDIT:

Due to not knowing the char limit for title was 16chars, i reduced my title to under 16 an it all works perfectly fine 😃

sZPeddy

(Unassigned)

Unconfirmed

Minecraft 14w26c

Retrieved