User Tools

Site Tools


tutorial:mappings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:mappings [2019/05/30 21:41] – [Using mappings] jamieswhiteshirttutorial:mappings [2019/06/01 18:48] – Add Remapping jamieswhiteshirt
Line 24: Line 24:
   * **The '-dev' jar (the ''jar'' task output) does not use intermediary names, and is therefore not useful.** It cannot be installed as a mod outside a development environment and will only work in a development environment with matching mappings. The regular jar (the ''remapJar'' task output) should be used instead and installed in development environments using the ''modCompile'' dependency configuration.   * **The '-dev' jar (the ''jar'' task output) does not use intermediary names, and is therefore not useful.** It cannot be installed as a mod outside a development environment and will only work in a development environment with matching mappings. The regular jar (the ''remapJar'' task output) should be used instead and installed in development environments using the ''modCompile'' dependency configuration.
   * **Yarn names are only applied in a development environment**. Outside a development environment, only intermediary names exist, meaning the code will not match exactly what you see and wrote. Loom transparently handles this transition for you, but be cautious when using reflection.   * **Yarn names are only applied in a development environment**. Outside a development environment, only intermediary names exist, meaning the code will not match exactly what you see and wrote. Loom transparently handles this transition for you, but be cautious when using reflection.
 +
 +==== Remapping ====
 +
 +Remapping is the process of applying mappings to code, transforming from one set of names to another. Both Java source code and compiled Java code can be remapped. It involves changing the names of references according to the mappings, as well as carefully renaming methods to preserve overrides. It does not change what the code does, although it will affect names used in reflection.
 +
 +[[https://github.com/FabricMC/tiny-remapper|Tiny Remapper]] is a tool that can remap compiled Java code. It has a command line interface as well as a programmable interface. Loom uses Tiny Remapper for a number of tasks, and Fabric Loader uses Tiny Remapper to remap the Minecraft code to intermediary. Loom is also capable of remapping Java source code.
  
 ==== Obfuscation and deobfuscation ==== ==== Obfuscation and deobfuscation ====
tutorial/mappings.txt · Last modified: 2022/05/22 08:38 by daomephsta