Minecraft Blogs / Tutorial

JSON Book Generator - Easily create colored Books! hoverEvents, clickEvents etc.

  • 10,962 views, 2 today
  • 20
  • 14
  • 10
CrushedPixel's Avatar CrushedPixel
Level 36 : Artisan Pixel Puncher
50
CrushedPixel's JSON Book Generator v1.0.2


I. Introduction

About
The JSON Book Generator is an external tool to very easily create Books with all of the JSON features like colored and stylized text, player selectors, custom hover and click events and much more. The user interface is intuitive and makes creation of Books a matter of seconds.

Features:
- Create books with multiple pages
- Text can be colored, bold, italic, underlined, strikethrough and obfuscated
- hoverEvents and clickEvents can be assigned
- Infinite amount of nested elements
- Supports custom selectors, player scores and translations

Not possible (yet):
- Creation of /blockdata commands for signs
- Creation of /title or /tellraw commands
- importing existing JSON code

II. Tutorial

This tutorial exists in video form here:
www.youtube.com/watch?v=EHwhetY0auc

In this section, I'll show you how to use the program to create an advanced custom JSON Book!

Simple text pages

To create a simple book that contains multiple pages with text, open the program and click on the Tree entry on the right called "pages". Then, click "Add Element" to add a new page to the book. You'll notice that the pages node now contains a subfolder called "page 1" and the main editing view became visible.

However, in the navigation tree the newly generated page node is tinted red. This is because the element is invalid since the Text value is empty. To fix this, simply enter any text into the upper text field on the left.

The navigation tree should not show any errors anymore. You can now click "Copy to Clipboard" and you can paste the generated JSON into a command block in Minecraft. The book you'll get has one page and contains the default black text that you entered.

However, this is not good enough yet. Using the color drop down menu all of the text can be colored in one of the colors Minecraft supports. You can also make the text bold, italic, underlined, strikethrough and obfuscated using the checkboxes below. If you copy and paste the command now to give yourself the book, it should look similar to this:
Click to reveal
JSON Book Generator - Easily create colored Books! hoverEvents, clickEvents etc.

To add another page to the book, simply select the "pages" node in the tree again and click "Add Element" another time. Repeat the same steps to create more pages and customize them!

Finally, you can optionally specify a Title and Author for the book you'll get in Minecraft (maximum character length: 16) above the "Copy to Clipboard" button and you've created a very simple custom book!

TIP: To create a newline, simply type "\n" in the Text field at the desired position.

Nested Elements

Of course you might want different parts of the text on a page in different colors or styles. This is not possible when only having one element per page, so to append another text part to a page, simply select your page (e.g. "page 1") in the tree navigation and click "Add Element". The "extra" node will now contain an element that is similar to the page element we created before. Simply modify the text value and assign color and style as you wish.

If you do NOT change the color value (by simply selecting "none"), it will be inherited from the superior JSON element. This means that every item in the "extra" list of an element has by default the same color as the element above.

The JSON Book Generator allows every "extra" element to contain an infinite extra elements, making the books very flexible.
Example:
Click to reveal
JSON Book Generator - Easily create colored Books! hoverEvents, clickEvents etc.


score, selector and translation

There are three alternatives to a simple Text element: score, selector and translate.

You can choose them by selecting the according tab in the upper left corner. Note that none of these fields may contain an empty value, you need to fill in every input field!

The Score element displays the value of a player's score on a certain objective (e.g. '42').
The Player input takes a selector, player name or * (to show the current viewer's score).
The Objective value is the ingame name of the scoreboard objective.

The Selector will simply output the name of the player or entity that has been found, e.g. "@a" will output the names of every player on the map ("Notch, jeb_ and oleoleMC")

The Translate element takes a translation key from the game and outputs it translated into the user's language.

For example, "item.cookie.name" will return "Cookie" in English, but "Keks" if the player plays Minecraft in German.

You can find a list of all translation keys here: https://sites.google.com/site/unminecrafttranslations/en_us

These alternatives to Text can be used in any element.
Example:
Click to reveal
JSON Book Generator - Easily create colored Books! hoverEvents, clickEvents etc.


clickEvents and hoverEvents

Finally, a clickEvent and/or hoverEvent can be applied to any element in the book.

To add a clickEvent, simply select the "clickEvent" checkbox and the panel below will be activated.
Below, a panel will be activated. In the Action drop down menu, "run_command", "suggest_command" and "open_url" can be selected.

run_command executes a command as the player clicking it. Since it is executed like a chat message, a limit of 100 characters is given by the game. Additionally, cheat commands like /give or /tp can't be executed by non-operators. Only trigger scoreboard objectives can be changed (to activate additional Redstone circuits).

suggest_command is doing NOTHING in books so far. Maybe Mojang will implement a use for suggest_command in the near future though, so I still included it.

open_url takes a valid URL (weblink) in the Value field. When clicked, the player gets asked whether he wants to navigate to the given url in their web browser.

The hoverEvent can be activated using the "hoverEvent" checkbox. Click on "Change hoverEvent" to set and modify the according value. Again, there are 4 different action types, "show_text", "show_item", "show_entity" and "show_achievement". Only one action type per hoverEvent is possible, so a tab panel contains the according settings.

show_text is like a normal text element with extras, however no clickEvent and hoverEvent can be assigned. Using "Add Extra", multiple elements can be added which will be put together in the hoverEvent text.

show_item allows you to make the hoverEvent show an item description, including enchantments, a custom name and lore. The id text has to be a valid Item ID, for example "minecraft:golden_apple". A full list of Item IDs can be found here: http://www.minecraftinfo.com/idnamelist.htm

show_entity shows an entity detail and has three optional inputs: Name, Type and UUID. Name specifies a custom name for the entity, Type is the entity type and UUID can contain a UUID String like "1-2-3-4-5".

show_achievement will simply show the player an achievement or statistic name and description. Simply select an achievement or stat from the provided drop down.

Example:
Click to reveal




III. Get it

Support me on my Youtube channel CrushedPixel where I upload Minecraft Command Block and Redstone concepts, creations and adventure maps:
http://youtube.com/CrushedPixel

Download links:
Latest Version (v1.0.2): Download here
No adfly (please consider donating)
Since Mediafire told Windows users to treat the jar like a zip file, I updated the download link.


Donate:
A lot of hard work went into this project. If you want, you can support me by donating to my PayPal account :) This keeps me motivated making stuff for the awesome Minecraft community!

undefined

License:
This program is licensed under the Creative Commons 3.0 License: http://creativecommons.org/licenses/by-nc-nd/3.0/legalcode

Finally, a huge thank you to Skylinerw, who created a very useful tutorial on JSON formatting: http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/351959-1-7-1-8-raw-json-text-examples-for-tellraw-title

Have fun with CrushedPixel's JSON Book Generator!
Tags

Create an account or sign in to comment.

1
03/25/2016 6:26 pm
Level 2 : Apprentice Miner
dellman
dellman's Avatar
Love it!
1
03/30/2015 10:59 am
Level 33 : Artisan Architect
Barkitect
Barkitect's Avatar
i love you CP consider me a subscriber
1
02/18/2015 10:32 am
Level 1 : New Miner
Laige
Laige's Avatar
Thanks bro this is so helpfull
1
12/05/2014 9:38 pm
Level 82 : Elite Creator
Sibsib92
Sibsib92's Avatar
Awesome !!!
1
11/11/2014 5:47 pm
Level 19 : Journeyman Engineer
[babbp12]
[babbp12]'s Avatar
This is an amazing project.  I will definitely suggest this to a lot of people!  But one question.  Is there a way to start text on a new line or do you just have to add extra spaces?
1
11/03/2014 12:25 pm
Level 42 : Master Pokemon
RandomMelonHere
RandomMelonHere's Avatar
never mind i fixed it
1
10/25/2014 5:03 pm
Level 13 : Journeyman Dolphin
trainboy2019
trainboy2019's Avatar
source code?
1
09/25/2014 3:18 am
Level 75 : Legendary Gent
Zitzabis
Zitzabis's Avatar
Exactly what I was looking for! Months of searching are finally over.
1
09/25/2014 2:45 am
Level 1 : New Crafter
SlySnivy
SlySnivy's Avatar
Awesome job. Nice work
1
09/25/2014 12:37 am
Level 2 : Apprentice Miner
jfields99
jfields99's Avatar
Wow... this is amazing dude
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome