diff --git a/build.gradle b/build.gradle index 7ed2e7204..c93165a9e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,17 +1,19 @@ +import groovy.json.JsonOutput +import groovy.json.JsonSlurper + +import java.util.concurrent.TimeUnit + plugins { id 'eclipse' + id 'idea' id 'maven-publish' - id 'net.minecraftforge.gradle' version '5.1.+' + id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'org.parchmentmc.librarian.forgegradle' version '1.+' - id 'org.spongepowered.mixin' version '0.7-SNAPSHOT' + id 'org.spongepowered.mixin' version '0.7.+' } jarJar.enable() -import groovy.json.JsonSlurper - -import java.util.concurrent.TimeUnit - /** * MAJORMOD.MAJORAPI.MINOR.PATCH * @return Hybrid Semantic Version @@ -24,160 +26,127 @@ private String getModVersion() { def mod_version = getModVersion() version = "${mod_version}" -group = 'com.github.elenterius.biomancy' -archivesBaseName = "biomancy-forge-${mc_version}" - -java.toolchain.languageVersion = JavaLanguageVersion.of(17) // Mojang ships Java 17 to end users in 1.18+ +group = mod_group_id -println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" - -sourceSets { - api {} - main { - resources { - srcDir 'src/generated/resources' // Include resources generated by data generators - exclude '.cache/' - } - } - test {} - datagen {} +base { + archivesName = "${mod_id}-forge-${minecraft_version}" } +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 { - mappings channel: 'parchment', version: "${parchment_version}-${mc_version}" // official mappings augmented with parameter names and javadocs + mappings channel: mapping_channel, version: mapping_version - // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. + // This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game. + // It is REQUIRED to be set to true for this template to function. + // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html + copyIdeResources = true - accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default. + // When true, this property will add the folder name of all declared run configurations to generated IDE run configurations. + // The folder name can be set on a run configuration using the "folderName" property. + // By default, the folder name of a run configuration is the name of the Gradle project containing it. + // generateRunFolders = true + + accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') runs { - client { + // applies to all run configurations + configureEach { workingDirectory project.file('run') + // Recommended logging data for a userdev environment + // The markers can be added/remove as needed separated by commas. // "SCAN": For mods scan. // "REGISTRIES": For firing of registry events. // "REGISTRYDUMP": For getting the contents of all registries. - property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' + property 'forge.logging.markers', 'REGISTRIES' + + // Recommended logging level for the console + // You can set various levels here. + // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels property 'forge.logging.console.level', 'debug' property 'mixin.env.remapRefMap', 'true' property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" - property 'mixin.debug.verbose', 'true' - property 'mixin.debug.export', 'true' - - // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. - property 'forge.enabledGameTestNamespaces', 'biomancy' // Hot-Swapping via JBR, includes schema changes - // Guide: https://forge.gemwire.uk/wiki/Hotswap#Applying_schema_changes + // https://forge.gemwire.uk/wiki/Hotswap#Applying_schema_changes jvmArgs '-XX:+IgnoreUnrecognizedVMOptions', '-XX:+AllowEnhancedClassRedefinition' mods { - biomancy { + "${mod_id}" { source sourceSets.main - source sourceSets.api } } } + client { + // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. + property 'forge.enabledGameTestNamespaces', mod_id + } + client2 { parent runs.client args '--username', 'Dev2' } server { - workingDirectory project.file('run') - - property 'forge.logging.markers', 'REGISTRIES' - property 'forge.logging.console.level', 'debug' - - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" - property 'mixin.debug.verbose', 'true' - - property 'forge.enabledGameTestNamespaces', 'biomancy' - - mods { - biomancy { - source sourceSets.main - source sourceSets.api - } - } + property 'forge.enabledGameTestNamespaces', mod_id + args '--nogui' } - // This run config launches GameTestServer and runs all registered game tests, then exits. - // By default, the server will crash when no game tests are provided. - // The game test system is also enabled by default for other run configs under the /test command. + // This run config launches GameTestServer and runs all registered gametests, then exits. + // By default, the server will crash when no gametests are provided. + // The gametest system is also enabled by default for other run configs under the /test command. gameTestServer { - workingDirectory project.file('run') - - property 'forge.logging.markers', 'REGISTRIES' - property 'forge.logging.console.level', 'debug' - - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" - - property 'forge.enabledGameTestNamespaces', 'biomancy' - - mods { - biomancy { - source sourceSets.main - source sourceSets.api - } - } + property 'forge.enabledGameTestNamespaces', mod_id } data { - workingDirectory project.file('run') - property 'forge.logging.markers', 'REGISTRIES' - property 'forge.logging.console.level', 'debug' + // example of overriding the workingDirectory set in configureEach above + workingDirectory project.file('run-data') - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" - - // Specify the mod-id for data generation, where to output the resulting resource, and where to look for existing resources - args '--mod', 'biomancy', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') - - mods { - biomancy { - source sourceSets.main - source sourceSets.api - source sourceSets.datagen - } - } + // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. + args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } dataCI { parent runs.data - forceExit false } } } -//The mixin annotation processor doesn't have an obfuscation mapping when run through the IntelliJ compiler -if (System.getProperty("idea.sync.active") == "true") { - afterEvaluate { - tasks.withType(JavaCompile).all { - it.options.annotationProcessorPath = files() +sourceSets { + main { + resources { + srcDir 'src/generated/resources' // Include resources generated by data generators + exclude '.cache/' } } + datagen {} } mixin { add sourceSets.main, "mixins.biomancy.refmap.json" config 'mixins.biomancy.json' - // options for dev run configs dumpTargetOnFailure = true } repositories { - flatDir { - dirs 'libs' - } + // ForgeGradle automatically adds the Forge maven and Maven Central + + // flatDir { + // dir 'libs' + // } + maven { url = "https://dvs1.progwml6.com/files/maven/" } // JEI maven { url = "https://modmaven.k-4u.nl" } // JEI backup - maven { url = 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' } + maven { + name = 'Geckolib' + url = 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' + } maven { url = 'https://maven.blamejared.com' } maven { url "https://dl.cloudsmith.io/public/klikli-dev/mods/maven/" @@ -196,72 +165,91 @@ repositories { configurations { datagenImplementation.extendsFrom minecraft - apiImplementation.extendsFrom minecraft } dependencies { - minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}" - annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' + minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" -// runtimeOnly fg.deobf("curse.maven:debug_utils-783008:4302677") //minecraft 1.19.3 + if (!Boolean.getBoolean("idea.sync.active")) { + annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor" + } - implementation fg.deobf("software.bernie.geckolib:geckolib-forge-1.19:3.1.40") - datagenImplementation fg.deobf("software.bernie.geckolib:geckolib-forge-1.19:3.1.40") + implementation fg.deobf("software.bernie.geckolib:geckolib-forge-${minecraft_version}:${geckolib_version}") + datagenImplementation fg.deobf("software.bernie.geckolib:geckolib-forge-${minecraft_version}:${geckolib_version}") //https://h2database.com/html/mvstore.html minecraftLibrary(group: "com.h2database", name: "h2-mvstore", version: "2.2.224") jarJar(group: "com.h2database", name: "h2-mvstore", version: "[2.2.220,3.0.0)") - implementation fg.deobf("com.klikli_dev:modonomicon-${mc_version}:1.34.0") - datagenImplementation fg.deobf("com.klikli_dev:modonomicon-${mc_version}:1.34.0") + compileOnly fg.deobf("com.klikli_dev:modonomicon-${minecraft_version}-common:${modonomicon_version}") + implementation fg.deobf("com.klikli_dev:modonomicon-${minecraft_version}-forge:${modonomicon_version}") + datagenCompileOnly fg.deobf("com.klikli_dev:modonomicon-${minecraft_version}-common:${modonomicon_version}") + datagenImplementation fg.deobf("com.klikli_dev:modonomicon-${minecraft_version}-forge:${modonomicon_version}") - compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}") - compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}") // compile against the JEI API but do not include it at runtime - runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}") // at runtime, use the full JEI jar + compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}") + compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}") // compile against the JEI API but do not include it at runtime + runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}") // at runtime, use the full JEI jar - implementation fg.deobf("com.simibubi.create:create-${mc_version}:${create_version}:slim") { transitive = false } - implementation fg.deobf("com.jozufozu.flywheel:flywheel-forge-${mc_version}:${flywheel_version}") + implementation fg.deobf("com.simibubi.create:create-${minecraft_version}:${create_version}:slim") { transitive = false } + implementation fg.deobf("com.jozufozu.flywheel:flywheel-forge-${minecraft_version}:${flywheel_version}") implementation fg.deobf("com.tterrag.registrate:Registrate:${registrate_version}") -// runtimeOnly fg.deobf("curse.maven:farmers_delight-398521:4525646") //1.2.1 -// runtimeOnly fg.deobf("curse.maven:cultural_delights-574622:4000179") - - runtimeOnly fg.deobf("curse.maven:alexs_mobs-426558:4159154") //1.21.1 - runtimeOnly fg.deobf("curse.maven:citadel-331936:4132623") - datagenImplementation fg.deobf("curse.maven:alexs_mobs-426558:4159154") //1.21.1 + runtimeOnly fg.deobf("maven.modrinth:alexs-mobs:1.22.7") + runtimeOnly fg.deobf("maven.modrinth:citadel:2.4.9") + datagenImplementation fg.deobf("maven.modrinth:alexs-mobs:1.22.7") - compileOnly fg.deobf("maven.modrinth:pehkui:3.6.2+1.19.2-forge") // 3.6.2+1.19.2-forge + compileOnly fg.deobf("maven.modrinth:pehkui:3.7.12+1.20.1-forge") //needs to be compileOnly for datagen to work -> temporarily change to implementation for gameplay testing -// implementation fg.deobf("se.mickelus.mutil:mutil:1.19.2-5.1.0") - compileOnly fg.deobf("curse.maven:tetra-289712:4738567") // 1.19.2-5.5.0 +// implementation fg.deobf("se.mickelus.mutil:mutil:1.20.1-6.1.1") + compileOnly fg.deobf("maven.modrinth:tetra:6.1.0") -// runtimeOnly fg.deobf("maven.modrinth:nerb:ANmCMdMt") //NERB 0.3 - - //TODO: Morph Mod Integration? -// implementation fg.deobf("curse.maven:identity-391390:3807264") // https://www.curseforge.com/minecraft/mc-mods/identity -// runtimeOnly fg.deobf("curse.maven:architectury-419699:4040966") - - implementation sourceSets.api.output datagenImplementation sourceSets.main.output - datagenImplementation sourceSets.api.output } -processResources { +// This block of code expands all declared replace properties in the specified resource targets. +// A missing property will result in an error. Properties are expanded using ${} Groovy notation. +// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments. +// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html +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 : mod_version, + mod_authors : mod_authors, + mod_credits : mod_credits, + mod_description : mod_description, + + geckolib_version : geckolib_version, geckolib_version_range: geckolib_version_range, + jei_version : jei_version, jei_version_range: jei_version_range, + create_version : create_version, create_version_range: create_version_range + ] + inputs.properties replaceProperties + + filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) { + expand replaceProperties + [project: project] + } + exclude '**/*.psd' exclude '**/*.bbmodel' exclude '**/*.pdn' + doLast { minifyJsons(processResources.outputs.files.asPath) } } -void minifyJsons(String fdir) { +private void minifyJsons(String fdir) { print "minmizing jsons..." long startTime = System.nanoTime() for (File file in fileTree(dir: fdir, include: "**/*.json")) { try { - file.text = groovy.json.JsonOutput.toJson(new groovy.json.JsonSlurper().parse(file)) + file.text = JsonOutput.toJson(new JsonSlurper().parse(file)) } catch (Exception e) { throw new Exception("Failed to minimize " + file, e) } @@ -270,48 +258,47 @@ void minifyJsons(String fdir) { printf "%7s sec, %s ms \n", (int) (ms / 1000), ms % 1000 } -tasks.jarJar { +tasks.jarJar.configure { archiveClassifier = '' - from sourceSets.api.output from { ["CREDITS.md", "LICENSE.txt", "3RD_PARTY_LICENSE.txt"] } //copy files from the repository root into the jar + + finalizedBy 'reobfJarJar' } -jar { +tasks.named('jar', Jar).configure { archiveClassifier = "slim" - from sourceSets.api.output - // manifest properties for reading on runtime manifest { - attributes(["Specification-Title" : "biomancy", - "Specification-Vendor" : "Elenterius", - "Specification-Version" : "2", - "Implementation-Title" : project.name, - "Implementation-Version" : project.jar.archiveVersion, - "Implementation-Vendor" : "Elenterius", - "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), - "MixinConfigs" : "mixins.biomancy.json"]) + attributes([ + 'Specification-Title' : mod_id, + 'Specification-Vendor' : mod_vendor, + 'Specification-Version' : '2', + 'Implementation-Title' : project.name, + 'Implementation-Version' : project.jar.archiveVersion, + 'Implementation-Vendor' : mod_vendor, + 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), + 'MixinConfigs' : "mixins.biomancy.json" + ]) } from { ["CREDITS.md", "LICENSE.txt"] } //copy files from the repository root into the jar -} -reobf { - jarJar {} + finalizedBy 'reobfJar' } -//jar.finalizedBy('reobfJar') -tasks.build.dependsOn tasks.jarJar -jar.finalizedBy('reobfJarJar') +tasks.build.configure { + dependsOn 'jarJar' +} publishing { publications { - mavenJava(MavenPublication) { + register('mavenJava', MavenPublication) { artifact jar } } repositories { maven { - url "file:///${project.projectDir}/mcmodsrepo" + url "file://${project.projectDir}/mcmodsrepo" } } } diff --git a/gradle.properties b/gradle.properties index 2dd9ffcd9..cf03acdf8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,14 +2,35 @@ # This is required to provide enough memory for the Minecraft decompilation process. org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false -# MDK -mc_version=1.19.2 -forge_version=43.2.13 -parchment_version=2022.11.27 -# Dependencies -## "Create" Mod -create_version=0.5.1.b-30 -flywheel_version=0.6.8.a-14 -registrate_version=MC1.19-1.1.5 -## Just Enough Items (JEI) Mod -jei_version=11.5.0.297 \ No newline at end of file +## Environment Properties +minecraft_version=1.20.1 +minecraft_version_range=[1.20.1,1.20.2) +forge_version=47.2.19 +forge_version_range=[47,) +loader_version_range=[47,) +mapping_channel=parchment +mapping_version=2023.09.03-1.20.1 +mixin_version=0.8.5 +## Mod Properties +mod_id=biomancy +mod_name=Biomancy 2 +mod_license=MIT & CC-BY-NC-4.0 +mod_group_id=com.github.elenterius.biomancy +mod_vendor=Elenterius +mod_authors=\u00A72Elenterius\u00A7r, \u00A76RhinoW\u00A7r +mod_credits=\u00A77RhinoW, The Shroome, Shorepion, Kitteh6660, ZeoMaddox, ItsLumine, RuskieThe3rd, M4rc3ll0 +mod_description=\u00A77Biopunk and Flesh Magic inspired tech-magic mod that has a fleshy art theme. +## Dependencies +### Geckolib Mod +geckolib_version=4.4 +geckolib_version_range=[4.4,) +### Modonomicon +modonomicon_version=1.54.4 +### "Create" Mod +create_version=0.5.1.e-22 +create_version_range=[0.5.1.e,) +flywheel_version=0.6.10-7 +registrate_version=MC1.20-1.3.3 +### Just Enough Items (JEI) Mod +jei_version=15.2.0.27 +jei_version_range=[15.2.0,) \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f2..c1962a79e 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae04661ee..a36387743 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index c53aefaa5..aeb74cbb4 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,10 +32,10 @@ # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: # * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». # # Important for patching: # @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -143,12 +140,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in @@ -205,6 +210,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd32c..93e3f59f1 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/mod_version.json b/mod_version.json index ce6f3182f..6ab09ad2b 100644 --- a/mod_version.json +++ b/mod_version.json @@ -1,4 +1,4 @@ { "major": "2", - "semantic": "3.1.0" + "semantic": "2.1.0" } \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 846ca6ad3..ad67ed0d1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,4 +5,8 @@ pluginManagement { maven { url = 'https://maven.parchmentmc.org' } maven { url = 'https://repo.spongepowered.org/repository/maven-public/' } } +} + +plugins { + id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0' } \ No newline at end of file diff --git a/src/generated/resources/assets/biomancy/lang/en_us.json b/src/generated/resources/assets/biomancy/lang/en_us.json index 97f702403..0c3832c00 100644 --- a/src/generated/resources/assets/biomancy/lang/en_us.json +++ b/src/generated/resources/assets/biomancy/lang/en_us.json @@ -142,8 +142,6 @@ "block.biomancy.bio_forge.tooltip": "Crafting Station", "block.biomancy.bio_lab": "Bio-Lab", "block.biomancy.bio_lab.tooltip": "Bio-alchemical Brewer", - "block.biomancy.voice_box": "[PH] Modular Larynx", - "block.biomancy.voice_box.tooltip": "", "block.biomancy.tongue": "Tongue", "block.biomancy.tongue.tooltip": "Extracts up to 3 items of the same type every 24 ticks from containers it's attached to, and drops them on the ground.", "block.biomancy.maw_hopper": "Maw Hopper", diff --git a/src/api/java/com/github/elenterius/biomancy/api/serum/Serum.java b/src/main/java/com/github/elenterius/biomancy/api/serum/Serum.java similarity index 100% rename from src/api/java/com/github/elenterius/biomancy/api/serum/Serum.java rename to src/main/java/com/github/elenterius/biomancy/api/serum/Serum.java diff --git a/src/api/java/com/github/elenterius/biomancy/api/serum/SerumContainer.java b/src/main/java/com/github/elenterius/biomancy/api/serum/SerumContainer.java similarity index 100% rename from src/api/java/com/github/elenterius/biomancy/api/serum/SerumContainer.java rename to src/main/java/com/github/elenterius/biomancy/api/serum/SerumContainer.java diff --git a/src/api/java/com/github/elenterius/biomancy/api/serum/SerumInjector.java b/src/main/java/com/github/elenterius/biomancy/api/serum/SerumInjector.java similarity index 100% rename from src/api/java/com/github/elenterius/biomancy/api/serum/SerumInjector.java rename to src/main/java/com/github/elenterius/biomancy/api/serum/SerumInjector.java diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index ec7dcfdbb..be25581b5 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,52 +1,66 @@ modLoader = "javafml" -loaderVersion = "[43,)" #This is typically bumped every Minecraft version by Forge -license = "MIT & CC-BY-NC-4.0" -issueTrackerURL = "https://github.com/Elenterius/Biomancy/issues" #optional +loaderVersion = "${loader_version_range}" +license = "${mod_license}" +issueTrackerURL = "https://github.com/Elenterius/Biomancy/issues" showAsResourcePack = false [[mods]] -modId = "biomancy" -version = "${file.jarVersion}" -displayName = "Biomancy 2" +modId = "${mod_id}" +version = "${mod_version}" +displayName = "${mod_name}" updateJSONURL = "https://api.modrinth.com/updates/uAAuyU4M/forge_updates.json" -displayURL = "https://modrinth.com/mod/biomancy" #optional -logoFile = "text_logo_small.png" #optional +displayURL = "https://modrinth.com/mod/biomancy" +logoFile = "text_logo_small.png" logoBlur = false -credits = "\u00A77RhinoW, The Shroome, Shorepion, Kitteh6660, ZeoMaddox, ItsLumine, RuskieThe3rd, M4rc3ll0" -authors = "\u00A72Elenterius\u00A7r, \u00A76RhinoW\u00A7r" -description = '''§7Biopunk and Flesh Magic inspired tech-magic mod that has a fleshy art theme.''' +credits = "${mod_credits}" +authors = "${mod_authors}" +description = '''${mod_description}''' -[[dependencies.biomancy]] -modId = "geckolib3" +# Display Test controls the display for your mod in the server connection screen +# MATCH_VERSION means that your mod will cause a red X if the versions on client and server differ. This is the default behaviour and should be what you choose if you have server and client elements to your mod. +# IGNORE_SERVER_VERSION means that your mod will not cause a red X if it's present on the server but not on the client. This is what you should use if you're a server only mod. +# IGNORE_ALL_VERSION means that your mod will not cause a red X if it's present on the client or the server. This is a special case and should only be used if your mod has no server component. +# NONE means that no display test is set on your mod. You need to do this yourself, see IExtensionPoint.DisplayTest for more information. You can define any scheme you wish with this value. +# IMPORTANT NOTE: this is NOT an instruction as to which environments (CLIENT or DEDICATED SERVER) your mod loads on. Your mod should load (and maybe do nothing!) whereever it finds itself. +#displayTest="MATCH_VERSION" # MATCH_VERSION is the default if nothing is specified (#optional) + +[[dependencies.${ mod_id }]] +modId = "forge" +mandatory = true +versionRange = "${forge_version_range}" +ordering = "NONE" +side = "BOTH" # BOTH, CLIENT or SERVER + +[[dependencies.${ mod_id }]] +modId = "minecraft" +mandatory = true +versionRange = "${minecraft_version_range}" +ordering = "NONE" +side = "BOTH" + +[[dependencies.${ mod_id }]] +modId = "geckolib" mandatory = true -versionRange = "[3.1.39,4.0)" +versionRange = "${geckolib_version_range}" ordering = "BEFORE" side = "BOTH" -[[dependencies.biomancy]] +[[dependencies.${ mod_id }]] modId = "jei" mandatory = false -versionRange = "[11.5.0,)" +versionRange = "${jei_version_range}" ordering = "BEFORE" side = "BOTH" -[[dependencies.biomancy]] +[[dependencies.${ mod_id }]] modId = "create" mandatory = false -versionRange = "[0.5.0,)" +versionRange = "${create_version_range}" ordering = "NONE" side = "BOTH" -[[dependencies.biomancy]] -modId = "forge" -mandatory = true -versionRange = "[43.2.0,)" -ordering = "NONE" -side = "BOTH" # BOTH, CLIENT or SERVER - -[[dependencies.biomancy]] -modId = "minecraft" -mandatory = true -versionRange = "[1.19.2,1.19.3)" -ordering = "NONE" -side = "BOTH" +# Features are specific properties of the game environment, that you may want to declare you require. This example declares +# that your mod requires GL version 3.2 or higher. Other features will be added. They are side aware so declaring this won't +# stop your mod loading on the server for example. +#[features.${mod_id}] +#openGLVersion="[3.2,)" diff --git a/src/main/resources/mixins.biomancy.json b/src/main/resources/mixins.biomancy.json index b8d757ffd..b49567b9f 100644 --- a/src/main/resources/mixins.biomancy.json +++ b/src/main/resources/mixins.biomancy.json @@ -2,7 +2,7 @@ "required": true, "package": "com.github.elenterius.biomancy.mixin", "compatibilityLevel": "JAVA_17", - "minVersion": "0.8.4", + "minVersion": "0.8.5", "refmap": "mixins.biomancy.refmap.json", "injectors": { "defaultRequire": 1 diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index 91b249934..f4a7d55b9 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,8 @@ { - "pack": { - "description": "biomancy resources", - "pack_format": 9 - } -} + "pack": { + "description": { + "text": "${mod_id} resources" + }, + "pack_format": 15 + } +} \ No newline at end of file