[CHANGE] Have mods.toml use values from gradle.properties

This commit is contained in:
2023-11-08 22:31:08 +02:00
parent 4f23720734
commit 4f234fc059
3 changed files with 7 additions and 10 deletions

3
.gitignore vendored
View File

@@ -43,4 +43,5 @@ bin/
.idea .idea
run/ run/
artifacts

View File

@@ -4,14 +4,14 @@ license="MIT"
issueTrackerURL="https://github.com/minecraftforge/" issueTrackerURL="https://github.com/minecraftforge/"
[[mods]] [[mods]]
modId="examplemod" modId="${mod_id}"
version="${version}" version="${version}"
displayName="Example Mod" displayName="${mod_name}"
#updateJSONURL="https://change.me.example.invalid/updates.json" #updateJSONURL="https://change.me.example.invalid/updates.json"
displayURL="https://minecraftforge.net" displayURL="https://minecraftforge.net"
logoFile="assets/examplemod/icon.png" logoFile="assets/examplemod/icon.png"
credits="Thanks for this example mod goes to Java" credits="Thanks for this example mod goes to Java"
authors="ExampleAuthor" authors="${mod_author}"
description=''' description='''
This is a long form description of the mod. You can write whatever you want here This is a long form description of the mod. You can write whatever you want here
@@ -20,14 +20,14 @@ Have some lorem ipsum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
''' '''
[[dependencies.examplemod]] [[dependencies.${mod_id}]]
modId="forge" modId="forge"
mandatory=true mandatory=true
versionRange="[48,)" versionRange="[48,)"
ordering="NONE" ordering="NONE"
side="BOTH" side="BOTH"
[[dependencies.examplemod]] [[dependencies.${mod_id}]]
modId="minecraft" modId="minecraft"
mandatory=true mandatory=true
versionRange="[1.20.2,)" versionRange="[1.20.2,)"

View File

@@ -35,13 +35,9 @@ This project is powered by [Unimined](https://github.com/unimined/unimined), and
1) `loaderVersion` -> The forge version code 1) `loaderVersion` -> The forge version code
2) `license` -> Your mod license 2) `license` -> Your mod license
3) `issueTrackerURL` -> Your GitHub repository of the mod 3) `issueTrackerURL` -> Your GitHub repository of the mod
4) `modId` -> Your modid. Make sure to match this with `mod_id` from `gradle.properties`
5) `displayName` -> The name of your mod
6) `displayURL` -> Your Modrinth/Curseforge/GitHub page of the mod 6) `displayURL` -> Your Modrinth/Curseforge/GitHub page of the mod
7) `logoFile` -> Your mod icon 7) `logoFile` -> Your mod icon
8) `authors` -> Your name
9) `description` -> Your mod description 9) `description` -> Your mod description
10) `dependencies.examplemod` -> `dependencies.yourmodid`
11) `versionRange` -> `[forgeVersionCode,)` and `[1.20.2,)` (Replace with the minecraft versions your mod supports) 11) `versionRange` -> `[forgeVersionCode,)` and `[1.20.2,)` (Replace with the minecraft versions your mod supports)
6) If your default JVM/JDK is not Java 17 you will encounter an error when opening the project. This error is fixed by going to File > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JVMand changing the value to a valid Java 17 JVM. You will also need to set the Project SDK to Java 17. This can be done by going to File > Project Structure > Project SDK. Once both have been set open the Gradle tab in IDEA and click the refresh button to reload the project. 6) If your default JVM/JDK is not Java 17 you will encounter an error when opening the project. This error is fixed by going to File > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JVMand changing the value to a valid Java 17 JVM. You will also need to set the Project SDK to Java 17. This can be done by going to File > Project Structure > Project SDK. Once both have been set open the Gradle tab in IDEA and click the refresh button to reload the project.