Skip to content

Configuration

booky10 edited this page Jun 10, 2023 · 3 revisions

The configuration file for this mod can be found in the config directory. It is named stackobf.json and is formatted in JSON.

Default configuration file
{
  "config-version-dont-touch-this": 2,
  "inject-logger": true,
  "rewrite-every-log-message": false,
  "mapping-type": "yarn"
}

config-version-dont-touch-this (default: 2)

Don't touch this option! This is used for automatic upgrading of the configuration to newer versions. Upgrading a configuration may remove, add or change existing values.

inject-logger (default: true)

Specifies whether exceptions displayed via the log4j root logger (almost every error in the console) should be remapped. Crash reports will be remapped regardless of what this is set to.

rewrite-every-log-message (default: false)

Toggles remapping every class mentioned anywhere in the log. This also means that if players write class_310 in chat, MinecraftClient will be logged to your log file.

mapping-type (default: "yarn")

The mapping type is used to configure which mappings are used for remapping. Four types are built-in: yarn, quilt, mojang and a custom one. To use yarn, quilt or mojang mappings, set to "yarn", "quilt" or "mojang" respectively.

Warning for mojang mapping usage

If mojang mappings are used, their license applies:

(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.

Custom mappings are a bit more complex to set up. They must be in a supported format (TINY, TINY_2, ENIGMA, MCP, SRG, TSRG, TSRG2 and PROGUARD). Note that only TINY_2 and PROGUARD have been tested.

Example of custom mapping configuration:

"mapping-type": {
    "path": "custom_mappings.txt", // can be relative (resolved from game directory) or absolute path
    "mapping-format": "TINY_2" // see above for possible formats
}