|
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 | + |
| 7 | +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. |
| 8 | + |
| 9 | +You can download the latest and previous versions of Snowblower directly from its [project page](https://projects.neoforged.net/neoforged/snowblower). |
| 10 | + |
| 11 | +### Basic usage |
| 12 | + |
| 13 | +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. |
| 14 | + |
| 15 | +```sh |
| 16 | +java -jar Snowblower.jar --output $OUTPUT --branch $BRANCH --start-over-if-required |
| 17 | +``` |
| 18 | + |
| 19 | +- `--output $OUTPUT`: Specifies the output directory for the generated repository. |
| 20 | + - This can be specified either as an absolute path or some path releative to the `jar` file. |
| 21 | + - `output/$BRANCH` or `output/$VERSION` is recommended to keep your generated repositories organized. (`$VERSION` being a specific Minecraft version) |
| 22 | +- `--branch $BRANCH`: Designates the target branch, which can be `release` or `dev`. |
| 23 | + - Using `dev` will include snapshots in the generated output. |
| 24 | +- `--start-over-if-required`: Ensures the process starts from scratch if necessary. |
| 25 | + |
| 26 | +**Note**: Generating every version takes a considerable amount of time. |
| 27 | + |
| 28 | +### Excluding unnecessary files |
| 29 | + |
| 30 | +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. |
| 31 | + |
| 32 | +```sh |
| 33 | +java -jar Snowblower.jar --output $OUTPUT --branch $BRANCH --exclude "**.nbt" --exclude "**.png" --start-over-if-required |
| 34 | +``` |
| 35 | + |
| 36 | +### Processing specific versions |
| 37 | + |
| 38 | +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. |
| 39 | + |
| 40 | +```sh |
| 41 | +java -jar Snowblower.jar --output $OUTPUT --branch $BRANCH --start-ver 1.20.1 --target-ver 1.21 --start-over-if-required |
| 42 | +``` |
| 43 | + |
| 44 | +### Exploring more flags |
| 45 | + |
| 46 | +Snowblower has many more flags and options for advanced users. You can see a complete list by running the jar file without any arguments. |
| 47 | + |
| 48 | +```sh |
| 49 | +java -jar Snowblower.jar |
| 50 | +``` |
0 commit comments