|
1 | 1 | # ☃️ Snowblower |
2 | 2 |
|
3 | 3 | A utility to create a git repository of Minecraft decompiled code to make it easier to see what changed between minecraft versions. |
| 4 | + |
| 5 | +### How to use |
| 6 | +This section covers the basic command-line usage for generating a repository of decompiled Minecraft code. Most users can simply run the tool locally as described below. |
| 7 | + |
| 8 | +You can download the latest and previous versions of Snowblower directly from its [project page](https://projects.neoforged.net/neoforged/snowblower). |
| 9 | + |
| 10 | +#### Basic usage |
| 11 | +The most common use case is to generate a comprehensive repository of all supported versions. The following command processes every version starting from `1.14.4`, which is the first version where official Mojang mappings are available. |
| 12 | + |
| 13 | +```sh |
| 14 | +java -jar Snowblower.jar --output output/$BRANCH --branch $BRANCH --start-over-if-required |
| 15 | +``` |
| 16 | + |
| 17 | +- `--output output/$BRANCH`: Specifies the output directory for the generated repo. |
| 18 | +- `--branch $BRANCH`: Designates the target branch, which can be `release` or `dev`. |
| 19 | + - Using `dev` will include snapshots in the generated output. |
| 20 | +- `--start-over-if-required`: Ensures the process starts from scratch if necessary. |
| 21 | + |
| 22 | +**Note**: Generating every version takes a considerable amount of time. |
| 23 | + |
| 24 | +#### Excluding unnecessary files |
| 25 | +To prevent repository clutter and large diffs, especially with structures (`.nbt`) and images (`.png`), it is recommended to exclude them. These files frequently change due to internal version values, causing noise in the commit history. |
| 26 | + |
| 27 | +```sh |
| 28 | +java -jar Snowblower.jar --output output/$BRANCH --branch $BRANCH --exclude "**.nbt" --exclude "**.png" --start-over-if-required |
| 29 | +``` |
| 30 | + |
| 31 | +#### Processing specific versions |
| 32 | +If you need to generate a repository for a limited range of versions, you can use the `--start-ver` and `--target-ver` flags. This will process everything from the specified start version up to and including the target version. |
| 33 | + |
| 34 | +```sh |
| 35 | +java -jar Snowblower.jar --output output/$BRANCH --branch $BRANCH --start-ver 1.20.1 --target-ver 1.21 --start-over-if-required |
| 36 | +``` |
| 37 | + |
| 38 | +#### Exploring more flags |
| 39 | +Snowblower has many more flags and options for advanced users. You can see a complete list by running the jar file without any arguments. |
| 40 | + |
| 41 | +```sh |
| 42 | +java -jar Snowblower.jar |
| 43 | +``` |
0 commit comments