Tutorials/Running the data generator

This tutorial shows how to run the data generator that is included $$ client and server distributions since 1.13.

Purpose
The data generator can:
 * Convert G-Zip compressed NBT format files with .nbt extensions (as used in Structure files) from and to String NBT format files with .snbt extensions.
 * Generate all contents of the vanilla data pack
 * Create JSON reports of all block states, all registries, and the full vanilla command tree

Getting Started
To launch the data generator, it is recommended that you download the official server distribution of the Minecraft version you desire.

Then, open a bash or command prompt in the directory where you have the server jar, and run (make sure you have Java installed)

If you have set up correctly, the command line will show a list of options and descriptions.

Generating data pack contents
In the same command line interface, run

The contents of the vanilla data pack (except pack.mcmeta ) will be generated to generated directory in the run directory of the command line interface.

Generating stringified server DAT files
Many of the server data files located in the world directory of the game server bear the  extension. Many of these files are actually saved in Named Binary Tag (NBT) format used widely throughout Minecraft. Follow these steps to use the data generator tools distributed with the Minecraft server JAR to convert these files to a human-readable "stringified" format:


 * 1) Open a terminal or command prompt of your choice on your game server
 * 2) Create a new directory named  in the same directory as your game server JAR


 * 1) Copy any qualifying  file which is actually written in NBT format into the   directory you created and re-save it with the   extension
 * 2) Use the  flag to activate the development generator which is capable of converting a directory of NBT files into a directory of "stringified" NBT (SNBT) files If it worked, you'll get some output that looks like this You should also have a new directory named   in the current directory where you ran the command.  Inside will be the stringified version of each file you supplied as input.
 * 3) Use command-line tools of your choice (e.g.  on linux systems) to view them immediately, or use a GUI text editor of your choice to open them