diff --git a/build.gradle b/build.gradle index 36d50db..6c9e531 100644 --- a/build.gradle +++ b/build.gradle @@ -10,22 +10,7 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(17) println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + ' (' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) minecraft { - // The mappings can be changed at any time and must be in the following format. - // Channel: Version: - // official MCVersion Official field/method names from Mojang mapping files - // parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official - // - // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings. - // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md - // - // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge - // Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started - // - // Use non-default mappings at your own risk. They may not always work. - // Simply re-run your setup task after changing the mappings to update your workspace. mappings channel: 'official', version: minecraft_version - // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. - accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') runs { @@ -49,7 +34,7 @@ minecraft { // property 'forge.enabledGameTestNamespaces', "${mod_id}" mods { - worldhandler { + modSource { source sourceSets.main } } @@ -64,7 +49,7 @@ minecraft { // property 'forge.enabledGameTestNamespaces', 'examplemod' mods { - worldhandler { + modSource { source sourceSets.main } } @@ -82,7 +67,7 @@ minecraft { // property 'forge.enabledGameTestNamespaces', 'examplemod' mods { - worldhandler { + modSource { source sourceSets.main } } @@ -98,7 +83,7 @@ minecraft { args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') mods { - worldhandler { + modSource { source sourceSets.main } } @@ -140,14 +125,14 @@ dependencies { jar { manifest { attributes([ - "Specification-Title": "worldhandler", - "Specification-Vendor": "Exopandora", + "Specification-Title": "${mod_id}", + "Specification-Vendor": "${author}", "Specification-Version": "1", - "Implementation-Title": project.name, - "Implementation-Version": project.jar.archiveVersion, - "Implementation-Vendor": "Exopandora", + "Implementation-Title": "${mod_name}", + "Implementation-Version": "${minecraft_version}-${version}", + "Implementation-Vendor": "${author}", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), - "Main-Class": "exopandora.worldhandler.Main" + "Main-Class": "${main_class}" ]) } } diff --git a/gradle.properties b/gradle.properties index dc4dbff..06845c7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,12 +1,13 @@ # WorldHandler -mod_id=worldhandler -mod_name=WorldHandler -version=3.3.1 -minecraft_version=1.19.1 -forge_version=42.0.0 -group=exopandora.worldhandler -main_class=exopandora.worldhandler.Main +mod_id = worldhandler +mod_name = WorldHandler +version = 3.3.1 +minecraft_version = 1.19.1 +forge_version = 42.0.0 +group = exopandora.worldhandler +main_class = exopandora.worldhandler.Main +author = Exopandora # Gradle -org.gradle.jvmargs=-Xmx3G -org.gradle.daemon=false +org.gradle.jvmargs = -Xmx3G +org.gradle.daemon = false