Changes

m
Line 17: Line 17:  
The <code>mods.toml</code> file is formatted as [https://github.com/toml-lang/toml TOML], the example mods.toml file in the MDK provides comments explaining the contents of the file. It should be stored as <code>src/main/resources/META-INF/mods.toml</code>. A basic <code>mods.toml</code>, describing one mod, may look like this:
 
The <code>mods.toml</code> file is formatted as [https://github.com/toml-lang/toml TOML], the example mods.toml file in the MDK provides comments explaining the contents of the file. It should be stored as <code>src/main/resources/META-INF/mods.toml</code>. A basic <code>mods.toml</code>, describing one mod, may look like this:
 
<syntaxhighlight lang="toml">
 
<syntaxhighlight lang="toml">
 +
 
     # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
 
     # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
 
     modLoader="javafml"
 
     modLoader="javafml"
Line 53: Line 54:  
         side="BOTH"
 
         side="BOTH"
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 
The default Gradle configuration replaces <code>${file.jarVersion}</code> with the project version, but ''only'' within <code>mods.toml</code>, so you should use those instead of directly writing them out. Here is a table of attributes that may be given to a mod, where <code>mandatory</code> means there is no default and the absence of the property causes an error.
 
The default Gradle configuration replaces <code>${file.jarVersion}</code> with the project version, but ''only'' within <code>mods.toml</code>, so you should use those instead of directly writing them out. Here is a table of attributes that may be given to a mod, where <code>mandatory</code> means there is no default and the absence of the property causes an error.