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 revision Previous revision
tutorial:mappings [2019/06/08 13:49]
jamieswhiteshirt [Using mappings] There is more than modCompile now
tutorial:mappings [2019/10/10 18:57] (current)
liach Custom mappings
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 mod-augmented dependency configurations like ''​modCompile''​.   * **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 mod-augmented dependency configurations like ''​modCompile''​.
   * **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.
 +
 +
 +=== Custom mappings ===
 +
 +You can use custom tiny mappings for Fabric Loom for your Gradle project setup.
 +
 +For example, if you have a custom branch of yarn which you want to use for mappings, you can build yarn with "​./​gradlew build" command, take out the jar file in "​build/​libs"​ directory, and move it to a folder "​mapping"​ in your Gradle project. Then, change your mappings dependency entry to:
 +
 +<​code>​
 +dependencies {
 +    mappings fileTree(dir:​ "​mapping",​ include: "​**.jar"​)
 +}
 +</​code>​
 +
 +You can change the directory where you put mapping to have any custom name; just change the name in "​dir"​ argument above. Note that Gradle build will fail if you have any other file than the mapping jar in the mapping directory!
  
 ==== Remapping ==== ==== Remapping ====
tutorial/mappings.txt ยท Last modified: 2019/10/10 18:57 by liach