Skip to content

Commit

Permalink
Updated readme and reworded changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
booky10 committed Mar 30, 2023
1 parent f7d194a commit 4a64cc8
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 36 deletions.
16 changes: 8 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

- Mappings are now loaded asynchronously, removing startup time impact
- Added more log messages (e.g. time tracking and detailed http requests)
- Added support for (mostly) every minecraft version (starting from 18w49a)
- 18w49 because this is the first yarn release
- Mojang mappings will error if used below 19w36a (1.14.4 excluded)
- Quilt mappings will error if used below 1.19.2
- Yarn/Quilt versions are now cached for two days before being refreshed
- Added note in stacktraces when something has been remapped ("MC//" prefix before class)
- Added support for more minecraft versions
- Yarn: 18w49a (1.14 snapshot) or higher
- Quilt: 1.19.2 or higher
- Mojang: 1.14.4 and 19w36a (1.15 snapshot) or higher
- Yarn/Quilt versions are now cached for 48 hours before being refreshed
- Added note in stacktraces when something has been remapped (`MC//` prefix before classname)
- Custom mappings now support the in-jar format used by intermediary, yarn and quilt
- They also support GZIP (without TAR) and normal ZIP (just one file in a zip) compression
- Auto-detected by file name extension
- They also support GZIP (without TAR) and normal ZIP (just one file in a zip) compression<br>
Auto-detected by file name extension
- All cached mappings (yarn, quilt, intermediary and mojang) are now saved GZIP compressed

## v1.2.1
Expand Down
118 changes: 90 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,114 @@
# Stack Deobfuscator

**Note: By enabling mojang mappings in the configuration, you agree to the license of mojang mappings:**

> (c) 2020 Microsoft Corporation.These mappings are provided "as-is" and you bear the risk of using them. You may copy
> and use the mappings for development purposes, but you may not redistribute the mappings complete and unmodified.
> Microsoft makes no warranties, express or implied, with respect to the mappings provided here. Use and modification of
> this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License
> Agreement available at https://account.mojang.com/documents/minecraft_eula.
## What does this mod do?
## Downloads

<details>
<summary><b>Comparison (Before & After)</b></summary>
- Modrinth: https://modrinth.com/mod/stackdeobf
- Curseforge: https://curseforge.com/minecraft/mc-mods/stackdeobf

### Before
See [wiki](https://github.com/booky10/StackDeobfuscator/wiki/Configuration) for configuration

![intermediary_mapped_exception](./images/exception_showcase_intermediary.png)
## What does this mod do?

### After (yarn mappings)
All errors displayed in the console and all crash reports will be remapped from unreadable production names (e.g.
`net.minecraft.class_310`) to readable mapped names (e.g. `net.minecraft.client.MinecraftClient`).

![yarn_mapped_exception](./images/exception_showcase_yarn.png)
This allows mod developers to more easily identify issues in a non-development environment, as the errors are instantly
human-readable.

### After (mojang mappings)
### Comparison

![mojang_mapped_exception](./images/exception_showcase_mojang.png)
<details>
<summary><b>Before</b></summary>

> ```
> [18:04:12] [Render thread/ERROR]: Reported exception thrown!
> net.minecraft.class_148: Manually triggered debug crash
> at net.minecraft.class_309.method_1474(class_309.java:509) ~[client-intermediary.jar:?]
> at net.minecraft.class_310.method_1574(class_310.java:1955) ~[client-intermediary.jar:?]
> at net.minecraft.class_310.method_1523(class_310.java:1180) ~[client-intermediary.jar:?]
> at net.minecraft.class_310.method_1514(class_310.java:801) ~[client-intermediary.jar:?]
> at net.minecraft.client.main.Main.main(Main.java:237) ~[minecraft-1.19.4-client.jar:?]
> at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:462) ~[fabric-loader-0.14.18.jar:?]
> at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.14.18.jar:?]
> at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.14.18.jar:?]
> at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88) ~[NewLaunch.jar:?]
> at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126) ~[NewLaunch.jar:?]
> at org.prismlauncher.EntryPoint.main(EntryPoint.java:71) ~[NewLaunch.jar:?]
> Caused by: java.lang.Throwable: Manually triggered debug crash
> at net.minecraft.class_309.method_1474(class_309.java:506) ~[client-intermediary.jar:?]
> ... 10 more
> ```
</details>
<details>
<summary><b>After (yarn/quilt mappings)</b></summary>
> ```
> [18:02:00] [Render thread/ERROR]: Reported exception thrown!
> [18:02:00] [Render thread/ERROR]: net.minecraft.util.crash.CrashException: Manually triggered debug crash
> at MC//net.minecraft.client.Keyboard.pollDebugCrash(Keyboard.java:509)
> at MC//net.minecraft.client.MinecraftClient.tick(MinecraftClient.java:1955)
> at MC//net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1180)
> at MC//net.minecraft.client.MinecraftClient.run(MinecraftClient.java:801)
> at net.minecraft.client.main.Main.main(Main.java:237)
> at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:462)
> at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
> at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
> at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
> at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
> at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
> Caused by: java.lang.Throwable: Manually triggered debug crash
> at MC//net.minecraft.client.Keyboard.pollDebugCrash(Keyboard.java:506)
> ... 10 more
> ```
All throwables logged using the log4j root logger will be remapped from intermediary mappings to mojang mappings.
This allows mod developers to more easily spot issues in a non-development environment as the errors are instantly
human-readable.
</details>
<details>
<summary><b>After (mojang mappings)</b></summary>
> ```
> [17:52:01] [Render thread/ERROR]: Reported exception thrown!
> [17:52:01] [Render thread/ERROR]: net.minecraft.ReportedException: Manually triggered debug crash
> at MC//net.minecraft.client.KeyboardHandler.tick(KeyboardHandler.java:509)
> at MC//net.minecraft.client.Minecraft.tick(Minecraft.java:1955)
> at MC//net.minecraft.client.Minecraft.runTick(Minecraft.java:1180)
> at MC//net.minecraft.client.Minecraft.run(Minecraft.java:801)
> at net.minecraft.client.main.Main.main(Main.java:237)
> at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:462)
> at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
> at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
> at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
> at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
> at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
> Caused by: java.lang.Throwable: Manually triggered debug crash
> at MC//net.minecraft.client.KeyboardHandler.tick(KeyboardHandler.java:506)
> ... 10 more
> ```
**Note:** This mod downloads yarn mappings on startup (or mojang mappings and intermediary mappings if configured).
</details>
## Compatibility
## Mappings Overview
This mod only injects at a few places for crash reports to be remapped and only uses one vanilla method for getting the
current minecraft version, so this mod should be compatible with most future minecraft versions.
Mappings are downloaded and parsed asynchronously. They are downloaded only once per version.
Yarn and Quilt refresh their version every 48 hours to check for updates.
## Downloads
| Mappings | Compatible Minecraft Versions | Download Size (zipped¹)² | Cached Size (gzipped)² |
|----------|---------------------------------------------|----------------------------------------|-------------------------|
| Yarn | 18w49a (1.14 snapshot) or higher | `1.2 MiB` | `1.2 MiB` |
| Quilt | 1.19.2 or higher | `1.2 MiB` | `1.2 MiB` |
| Mojang | 1.14.4 and 19w36a (1.15 snapshot) or higher | `7.5 MiB` (uncompressed) + `494.7 KiB` | `1.1 MiB` + `494.3 KiB` |
- Modrinth: https://modrinth.com/mod/stackdeobf
- Curseforge: https://curseforge.com/minecraft/mc-mods/stackdeobf
¹: Mojang mappings are not compressed<br>
²: Sizes as of 30th March 2023 (1.19.4 is latest)
## Building
```shell
./gradlew build # remove "./" on windows
```
The output jar can be found in `build` –> `libs`.
The output jar can be found in `build``libs`.

## License

This project is licensed under [**LGPL-3.0-only**](./LICENSE) unless specified otherwise.
Binary file removed images/exception_showcase_intermediary.png
Binary file not shown.
Binary file removed images/exception_showcase_mojang.png
Binary file not shown.
Binary file removed images/exception_showcase_yarn.png
Binary file not shown.

0 comments on commit 4a64cc8

Please sign in to comment.