Set up your IDE
As the Tau’ri Dev team primarily uses IntelliJ IDEA, this guide will be focused on that IDE. However, the steps below should apply to other IDEs as well, with some minor changes.
Adding JSG: Core as a dependency
Section titled “Adding JSG: Core as a dependency”-
Update your
gradle.propertiesas shown:Directorysrc/
- …
- build.gradle
- gradle.properties
- setting.gradle
- …
Add these two lines:
gradle.properties core_version=1+core_version_range=[1.0.0.0,)Make sure the file also contains this line:
gradle.properties minecraft_version=1.20.1 -
Update your
build.gradleas shown:Directorysrc/
- …
- build.gradle
- gradle.properties
- setting.gradle
- …
build.gradle minecraft {// some minecraft stuff...runs {// more minecraft stuff...data {// another minecraft stuff...// look for this:args '--mod', mod_id, '--all','--output', file('src/generated/resources/'),'--existing', file('src/main/resources/'),'--existing-mod', "jsg_core" // <---- Add this line!!!}}}repositories {// Add the maven central, if already not donemavenCentral()}dependencies {// DO NOT FORGET transitive = false !!!!// DO NOT FORGET TO PUT ":" AT THE END - to make gradle download the FULL shadowed jar fileimplementation(fg.deobf("eu.justsgmod:jsg-core-${minecraft_version}:${core_version}:") { transitive = false }) // <---- Add this line!!!}// UPDATE processResources TASK AS SHOWN: !IMPORTANT!tasks.named('processResources', ProcessResources).configure {var replaceProperties = [minecraft_version : minecraft_version,minecraft_version_range: minecraft_version_range,forge_version : forge_version,forge_version_range : forge_version_range,loader_version_range : loader_version_range,mod_id : mod_id,mod_name : mod_name,mod_license : mod_license,mod_version : version,mod_authors : mod_authors,mod_description : mod_description,core_version_range : core_version_range // <-- MAKE SURE THIS LINE IS PRESENT]inputs.properties replacePropertiesfilesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {expand replaceProperties + [project: project]}} -
Update mods.toml
Directorysrc/main/resources/META-INF/
- mods.toml
- build.gradle
- gradle.properties
- setting.gradle
- …
mods.toml # ADD THIS BLOCK[[dependencies.${mod_id}]]modId="jsg_core"mandatory=trueversionRange="${core_version_range}"ordering="NONE"side="BOTH" -
Reload your gradle project