This tutorial shows how to run the data generator that is included in Java Edition 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)
java -cp server.jar net.minecraft.data.Main
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
java -cp server.jar net.minecraft.data.Main --server
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.