- 1,249 views, 2 today
109
Since I have not found any working tutorials or documentation on how to actually format for this here goes my take:
If you want to make something like this:
here is the give command:
give @p written_book{display:{Name:'{"text":"test"}'},title:"",author:"",pages:['{"text":"Recipe 1","hoverEvent":{"action":"show_item","contents":{"id":"bundle","Count":1,"tag":"{Items:[{id:\\"minecraft:black_stained_glass_pane\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b},{id:\\"minecraft:hopper_minecart\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b},{id:\\"minecraft:black_stained_glass_pane\\",Count:1b},{id:\\"minecraft:hopper\\",Count:2b},{id:\\"minecraft:lava_bucket\\",Count:1b},{id:\\"minecraft:hopper\\",Count:2b},{id:\\"minecraft:black_stained_glass_pane\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b},{id:\\"minecraft:hopper_minecart\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b}]}"}}}']} 1
I cant really explain all the formatting but this is how its supposed to be ^^
here is just the part you put in the "contents" section:
{"id":"bundle","Count":1,"tag":"{Items:[{id:\\"minecraft:black_stained_glass_pane\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b},{id:\\"minecraft:hopper_minecart\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b},{id:\\"minecraft:black_stained_glass_pane\\",Count:1b},{id:\\"minecraft:hopper\\",Count:2b},{id:\\"minecraft:lava_bucket\\",Count:1b},{id:\\"minecraft:hopper\\",Count:2b},{id:\\"minecraft:black_stained_glass_pane\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b},{id:\\"minecraft:hopper_minecart\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b}]}"}}
I have tried using mcstacker for this but they just escape everything way too much:
give @p written_book{display:{Name:'{"text":"test"}'},title:"",author:"",pages:['{"text":"Recipe 1","hoverEvent":{"action":"show_item","contents":" {\\"id\\":\\"bundle\\",\\"Count\\":1,\\"tag\\":\\"{Items:[{id:\\\\\\\\\\"minecraft:black_stained_glass_pane\\\\\\\\\\",Count:1b},{id:\\\\\\\\\\"minecraft:furnace\\\\\\\\\\",Count:2b},{id:\\\\\\\\\\"minecraft:hopper_minecart\\\\\\\\\\",Count:1b},{id:\\\\\\\\\\"minecraft:furnace\\\\\\\\\\",Count:2b},{id:\\\\\\\\\\"minecraft:black_stained_glass_pane\\\\\\\\\\",Count:1b},{id:\\\\\\\\\\"minecraft:hopper\\\\\\\\\\",Count:2b},{id:\\\\\\\\\\"minecraft:lava_bucket\\\\\\\\\\",Count:1b},{id:\\\\\\\\\\"minecraft:hopper\\\\\\\\\\",Count:2b},{id:\\\\\\\\\\"minecraft:black_stained_glass_pane\\\\\\\\\\",Count:1b},{id:\\\\\\\\\\"minecraft:furnace\\\\\\\\\\",Count:2b},{id:\\\\\\\\\\"minecraft:hopper_minecart\\\\\\\\\\",Count:1b},{id:\\\\\\\\\\"minecraft:furnace\\\\\\\\\\",Count:2b}]}\\"}}"}}']} 1
Im guessing thats a bit outdated ^^
If youre making long book your best bet would probably be to put a dummy text in the "hoverEvent" field and replace that later in a text editor with your own edited component.
Here is a hover event just showing stone:
give @p written_book{display:{Name:'{"text":"test"}'},title:"",author:"",pages:['{"text":"Recipe 1","hoverEvent":{"action":"show_item","contents":{"id":"stone","Count":1}}}']} 1
Here is the command for an item with name and colour:
give @p written_book{display:{Name:'{"text":"test"}'},title:"",author:"",pages:['{"text":"Recipe 1","hoverEvent":{"action":"show_item","contents":{"id":"bundle","Count":1,"tag":"{display:{Name:\'{\\"text\\":\\"Name\\",\\"italic\\": false,\\"color\\":\\"gold\\"}\'},Items:[{id:\\"minecraft:black_stained_glass_pane\\"}]}"}}}']} 1
You can of course just display normal items.
I havent really played with other tags but the idea should be the same.
If youre in doubt just try escaping quotes or adding and removing them =)
If you want to make something like this:
here is the give command:
give @p written_book{display:{Name:'{"text":"test"}'},title:"",author:"",pages:['{"text":"Recipe 1","hoverEvent":{"action":"show_item","contents":{"id":"bundle","Count":1,"tag":"{Items:[{id:\\"minecraft:black_stained_glass_pane\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b},{id:\\"minecraft:hopper_minecart\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b},{id:\\"minecraft:black_stained_glass_pane\\",Count:1b},{id:\\"minecraft:hopper\\",Count:2b},{id:\\"minecraft:lava_bucket\\",Count:1b},{id:\\"minecraft:hopper\\",Count:2b},{id:\\"minecraft:black_stained_glass_pane\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b},{id:\\"minecraft:hopper_minecart\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b}]}"}}}']} 1
I cant really explain all the formatting but this is how its supposed to be ^^
here is just the part you put in the "contents" section:
{"id":"bundle","Count":1,"tag":"{Items:[{id:\\"minecraft:black_stained_glass_pane\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b},{id:\\"minecraft:hopper_minecart\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b},{id:\\"minecraft:black_stained_glass_pane\\",Count:1b},{id:\\"minecraft:hopper\\",Count:2b},{id:\\"minecraft:lava_bucket\\",Count:1b},{id:\\"minecraft:hopper\\",Count:2b},{id:\\"minecraft:black_stained_glass_pane\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b},{id:\\"minecraft:hopper_minecart\\",Count:1b},{id:\\"minecraft:furnace\\",Count:2b}]}"}}
I have tried using mcstacker for this but they just escape everything way too much:
give @p written_book{display:{Name:'{"text":"test"}'},title:"",author:"",pages:['{"text":"Recipe 1","hoverEvent":{"action":"show_item","contents":" {\\"id\\":\\"bundle\\",\\"Count\\":1,\\"tag\\":\\"{Items:[{id:\\\\\\\\\\"minecraft:black_stained_glass_pane\\\\\\\\\\",Count:1b},{id:\\\\\\\\\\"minecraft:furnace\\\\\\\\\\",Count:2b},{id:\\\\\\\\\\"minecraft:hopper_minecart\\\\\\\\\\",Count:1b},{id:\\\\\\\\\\"minecraft:furnace\\\\\\\\\\",Count:2b},{id:\\\\\\\\\\"minecraft:black_stained_glass_pane\\\\\\\\\\",Count:1b},{id:\\\\\\\\\\"minecraft:hopper\\\\\\\\\\",Count:2b},{id:\\\\\\\\\\"minecraft:lava_bucket\\\\\\\\\\",Count:1b},{id:\\\\\\\\\\"minecraft:hopper\\\\\\\\\\",Count:2b},{id:\\\\\\\\\\"minecraft:black_stained_glass_pane\\\\\\\\\\",Count:1b},{id:\\\\\\\\\\"minecraft:furnace\\\\\\\\\\",Count:2b},{id:\\\\\\\\\\"minecraft:hopper_minecart\\\\\\\\\\",Count:1b},{id:\\\\\\\\\\"minecraft:furnace\\\\\\\\\\",Count:2b}]}\\"}}"}}']} 1
Im guessing thats a bit outdated ^^
If youre making long book your best bet would probably be to put a dummy text in the "hoverEvent" field and replace that later in a text editor with your own edited component.
Here is a hover event just showing stone:
give @p written_book{display:{Name:'{"text":"test"}'},title:"",author:"",pages:['{"text":"Recipe 1","hoverEvent":{"action":"show_item","contents":{"id":"stone","Count":1}}}']} 1
Here is the command for an item with name and colour:
give @p written_book{display:{Name:'{"text":"test"}'},title:"",author:"",pages:['{"text":"Recipe 1","hoverEvent":{"action":"show_item","contents":{"id":"bundle","Count":1,"tag":"{display:{Name:\'{\\"text\\":\\"Name\\",\\"italic\\": false,\\"color\\":\\"gold\\"}\'},Items:[{id:\\"minecraft:black_stained_glass_pane\\"}]}"}}}']} 1
You can of course just display normal items.
I havent really played with other tags but the idea should be the same.
If youre in doubt just try escaping quotes or adding and removing them =)
Tags |
1 Update Logs
Update #1 : by imalittlhigh 04/05/2023 7:15:41 amApr 5th, 2023
fixed typos
tools/tracking
5817059
6
showing-hover-event-items-in-written-books
Create an account or sign in to comment.
The ID bundle, where and how do you find this kind of stuff?
Thats just the id that is displayed if you have f3+h on. "minecraft:bundle" would technically be better to use here.
And technically there is documentation on how to use this on the mc wiki, its just very surface level and you have the experiment a lot for it to work ^^
If that wasnt your question feel free to add me on disc and ask there. imalittlhigh#3104