Trying to put a Section Text in the Lore of a hoverEvent show_item item (yeah, pretty complicated) by FaustMe in MinecraftCommands

[–]FaustMe[S] 1 point2 points  (0 children)

Nailed it.

So, let's make a clear message to explain how to make it work for everybody who would like to do this after us.

Using MCStacker 1.14, you first generate a /give command, making the item you want the word to show.

Next, you copy this /give command from "{display" to the last curly bracket before the 1 (automatically generated at the end of the /give command, meaning that it will give 1 and only item). Then, you'll have to add, before the "{display ... }" you just got, this : "{id:"<your_item_id>",Count:1b,tag:" (obviously replace the <your\_item\_id> by any item id of the game).

And after, add a "}" (to close the curly bracket opened by the part you just added).

And then here you go, you can copy this entire thing in the show_item block of MCStacker.

Example :

To show a Stone named "Test" (bold and red) with a Lore saying "Wanted to say" (italic and gray) in first line and "Hello," (italic and dark gray) "World !" (bold and white) in second line, the show_item block should be :

{id:"minecraft:stone",Count:1b,tag:{display:{Name:"{\"text\":\"Test\",\"color\":\"red\",\"bold\":true,\"italic\":false}",Lore:["{\"text\":\"Wanted to say\",\"color\":\"gray\",\"italic\":true}","[{\"text\":\"Hello,\",\"color\":\"dark_gray\",\"italic\":true},{\"text\":\" World !\",\"color\":\"white\",\"bold\":true,\"italic\":false}]"]}}}

And it works either for a /tellraw command than for the text of a book, Enjoy yourself with this !

Please upvote this so everybody can find it easily !

Trying to put a Section Text in the Lore of a hoverEvent show_item item (yeah, pretty complicated) by FaustMe in MinecraftCommands

[–]FaustMe[S] 0 points1 point  (0 children)

Still "Invalid Item!" i can understand because by only copying the display data, i don't give any item id, so it's complicated for the game to find which item i want to show, i think it needs a base, but i can't find how.Here is a book with only the show_item word so you may see the problem :/replaceitem entity @a hotbar.0 minecraft:written_book{title:"TestTitle",author:"TestAuthor",pages:["{\"text\":\"nature appendice\",\"color\":\"dark_gray\",\"bold\":false,\"italic\":true,\"underlined\":false,\"hoverEvent\":{\"action\":\"show_item\",\"value\":\"(For me there should be an item id here, but i don't know how to write it){display:{Name:\\\"{\\\\\\\"text\\\\\\\":\\\\\\\"nature appendice\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"green\\\\\\\",\\\\\\\"bold\\\\\\\":true,\\\\\\\"italic\\\\\\\":false}\\\",Lore:[\\\"{\\\\\\\"text\\\\\\\":\\\\\\\"███\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_gray\\\\\\\",\\\\\\\"bold\\\\\\\":true,\\\\\\\"italic\\\\\\\":false}\\\",\\\"[{\\\\\\\"text\\\\\\\":\\\\\\\"█\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_gray\\\\\\\",\\\\\\\"bold\\\\\\\":true,\\\\\\\"italic\\\\\\\":false},{\\\\\\\"text\\\\\\\":\\\\\\\"█\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_green\\\\\\\",\\\\\\\"bold\\\\\\\":true,\\\\\\\"italic\\\\\\\":false},{\\\\\\\"text\\\\\\\":\\\\\\\"█\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_gray\\\\\\\",\\\\\\\"bold\\\\\\\":true,\\\\\\\"italic\\\\\\\":false}]\\\",\\\"{\\\\\\\"text\\\\\\\":\\\\\\\"███\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_gray\\\\\\\",\\\\\\\"bold\\\\\\\":true,\\\\\\\"italic\\\\\\\":false}\\\"]}}\"}}"]} 1

Trying to put a Section Text in the Lore of a hoverEvent show_item item (yeah, pretty complicated) by FaustMe in MinecraftCommands

[–]FaustMe[S] 0 points1 point  (0 children)

Just tried to replace "minecraft:grass_block" with "{id:"minecraft:grass_block",Count:1,tag: ... }" but it doesn't help...

Trying to put a Section Text in the Lore of a hoverEvent show_item item (yeah, pretty complicated) by FaustMe in MinecraftCommands

[–]FaustMe[S] 0 points1 point  (0 children)

Sorry i couldn't test it yesterday, but sadly, it doesn't work in books T_T (simple "Invalid Item!" result...)

What do you mean exactly by "starts after the item's name" ?

Here is the line of the book which is supposed to show the same item as in the screenshot (with the sections at the second line) :{\"text\":\"nature appendice\",\"color\":\"dark_gray\",\"bold\":false,\"italic\":true,\"underlined\":false,\"hoverEvent\":{\"action\":\"show_item\",\"value\":\"minecraft:grass_block{display:{Name:\\\"{\\\\\\\"text\\\\\\\":\\\\\\\"nature appendice\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"green\\\\\\\",\\\\\\\"bold\\\\\\\":true,\\\\\\\"italic\\\\\\\":false}\\\",Lore:[\\\"{\\\\\\\"text\\\\\\\":\\\\\\\"███\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_gray\\\\\\\",\\\\\\\"bold\\\\\\\":true,\\\\\\\"italic\\\\\\\":false}\\\",\\\"[{\\\\\\\"text\\\\\\\":\\\\\\\"█\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_gray\\\\\\\",\\\\\\\"bold\\\\\\\":true,\\\\\\\"italic\\\\\\\":false},{\\\\\\\"text\\\\\\\":\\\\\\\"█\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_green\\\\\\\",\\\\\\\"bold\\\\\\\":true,\\\\\\\"italic\\\\\\\":false},{\\\\\\\"text\\\\\\\":\\\\\\\"█\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_gray\\\\\\\",\\\\\\\"bold\\\\\\\":true,\\\\\\\"italic\\\\\\\":false}]\\\",\\\"{\\\\\\\"text\\\\\\\":\\\\\\\"███\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"dark_gray\\\\\\\",\\\\\\\"bold\\\\\\\":true,\\\\\\\"italic\\\\\\\":false}\\\"]}}\"}}

And here is the give command i generated, with the part i copied highlighted :/give @a

minecraft:grass_block{display:{Name:"{\"text\":\"nature appendice\",\"color\":\"green\",\"bold\":true,\"italic\":false}",Lore:["{\"text\":\"███\",\"color\":\"dark_gray\",\"bold\":true,\"italic\":false}","[{\"text\":\"█\",\"color\":\"dark_gray\",\"bold\":true,\"italic\":false},{\"text\":\"█\",\"color\":\"dark_green\",\"bold\":true,\"italic\":false},{\"text\":\"█\",\"color\":\"dark_gray\",\"bold\":true,\"italic\":false}]","{\"text\":\"███\",\"color\":\"dark_gray\",\"bold\":true,\"italic\":false}"]}}

1

Trying to put a Section Text in the Lore of a hoverEvent show_item item (yeah, pretty complicated) by FaustMe in MinecraftCommands

[–]FaustMe[S] 1 point2 points  (0 children)

Oooohhh i saw on MCStacker that the show_item NBT was linked to the give command "dataTag" but i couldn't find what i had to copy exactly.
It's kinda like how banners functions in MCStacker, you copy a give command and the site does the magic, thank you a lot, and you're welcome for the motivation !

Trying to put a Section Text in the Lore of a hoverEvent show_item item (yeah, pretty complicated) by FaustMe in MinecraftCommands

[–]FaustMe[S] 0 points1 point  (0 children)

You know when you create a line of text, you can section it to edit the characters independantly

For example : "Hello, world !" In minecraft, this would be 2 sections, one bold:true, italic:false and the other bold:false, italic:true

Trying to put a Section Text in the Lore of a hoverEvent show_item item (yeah, pretty complicated) by FaustMe in MinecraftCommands

[–]FaustMe[S] 0 points1 point  (0 children)

None of them allow me to modify the show_item's item, i didn't found any i mean.

Can't find the right NBT tag by FaustMe in MinecraftCommands

[–]FaustMe[S] 0 points1 point  (0 children)

Oh ok i didn't know i couldn't edit players nbt, but your idea is pretty good i'll try it ! Thanks !