diff --git a/build.gradle b/build.gradle index 50e8f4b..993dd0a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { - id "org.jetbrains.kotlin.jvm" version "1.5.31" - id "org.jetbrains.kotlin.plugin.serialization" version "1.5.31" + id "org.jetbrains.kotlin.jvm" version "1.8.10" + id "org.jetbrains.kotlin.plugin.serialization" version "1.8.10" } repositories { @@ -8,8 +8,7 @@ repositories { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.31" - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0" implementation "org.kohsuke:github-api:1.135" implementation "org.dom4j:dom4j:2.1.3" } diff --git a/generator.config.json b/generator.config.json index fd564eb..7837edc 100644 --- a/generator.config.json +++ b/generator.config.json @@ -48,7 +48,9 @@ "pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml" }, "FORGE_LOADER_MAJOR": "36", - "MIXIN_COMPAT_LEVEL": "JAVA_8" + "MIXIN_COMPAT_LEVEL": "JAVA_8", + "FORGE_EXPLOSION_EVENT_PACKAGE": "net.minecraftforge.event.world", + "FORGE_EXPLOSION_EVENT_GET_LEVEL": "getWorld" } }, "1.16.5-forge-fabric": { @@ -124,7 +126,9 @@ "pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml" }, "FORGE_LOADER_MAJOR": "37", - "MIXIN_COMPAT_LEVEL": "JAVA_16" + "MIXIN_COMPAT_LEVEL": "JAVA_16", + "FORGE_EXPLOSION_EVENT_PACKAGE": "net.minecraftforge.event.world", + "FORGE_EXPLOSION_EVENT_GET_LEVEL": "getWorld" } }, "1.17.1-forge-fabric": { @@ -200,7 +204,9 @@ "pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml" }, "FORGE_LOADER_MAJOR": "39", - "MIXIN_COMPAT_LEVEL": "JAVA_17" + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "FORGE_EXPLOSION_EVENT_PACKAGE": "net.minecraftforge.event.world", + "FORGE_EXPLOSION_EVENT_GET_LEVEL": "getWorld" } }, "1.18.1-forge-fabric": { @@ -274,7 +280,9 @@ "pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml" }, "FORGE_LOADER_MAJOR": "40", - "MIXIN_COMPAT_LEVEL": "JAVA_17" + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "FORGE_EXPLOSION_EVENT_PACKAGE": "net.minecraftforge.event.world", + "FORGE_EXPLOSION_EVENT_GET_LEVEL": "getWorld" } }, "1.18.2-forge-fabric": { @@ -473,7 +481,9 @@ "pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml" }, "FORGE_LOADER_MAJOR": "41", - "MIXIN_COMPAT_LEVEL": "JAVA_17" + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "FORGE_EXPLOSION_EVENT_PACKAGE": "net.minecraftforge.event.world", + "FORGE_EXPLOSION_EVENT_GET_LEVEL": "getWorld" } }, "1.19-forge-fabric": { @@ -672,7 +682,9 @@ "pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml" }, "FORGE_LOADER_MAJOR": "43", - "MIXIN_COMPAT_LEVEL": "JAVA_17" + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "FORGE_EXPLOSION_EVENT_PACKAGE": "net.minecraftforge.event.level", + "FORGE_EXPLOSION_EVENT_GET_LEVEL": "getLevel" } }, "1.19.2-forge-fabric": { @@ -851,6 +863,408 @@ "MIXIN_COMPAT_LEVEL": "JAVA_17", "__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT" } + }, + "1.19.3-forge": { + "description": "1.19.3 Forge Template", + "templates": [ + "templates/forge" + ], + "tokens": { + "MINECRAFT": "1.19.3", + "JAVA_VERSION": "#JAVA_17", + "COMPILE_JAVA": "#COMPILE_JAVA_17", + "MCMETA_FORMAT": "12", + "YARN_MAPPINGS": { + "filter": "1\\.19\\.3\\+build\\..*", + "pom": "https://maven.fabricmc.net/net/fabricmc/yarn/maven-metadata.xml" + }, + "FORGE": { + "filter": "1\\.19\\.3-.*", + "pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml" + }, + "FORGE_LOADER_MAJOR": "44", + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "FORGE_EXPLOSION_EVENT_PACKAGE": "net.minecraftforge.event.level", + "FORGE_EXPLOSION_EVENT_GET_LEVEL": "getLevel" + } + }, + "1.19.3-forge-fabric": { + "description": "1.19.3 Forge-Fabric Template", + "templates": [ + "templates/architectury", + "templates/architectury_fabric", + "templates/api_new" + ], + "tokens": { + "MINECRAFT": "1.19.3", + "COMMON_MOD_LOADERS": "fabric,forge", + "INCLUDE_FABRIC_OR_QUILT": "include(\"fabric\")", + "JAVA_VERSION": "#JAVA_17", + "COMPILE_JAVA": "#COMPILE_JAVA_17_ARCH", + "__FABRIC_LOADER": "#FABRIC_LOADER", + "__FABRIC_LOADER_PROP": "#FABRIC_LOADER_PROP", + "MCMETA_FORMAT": "12", + "ARCHITECTURY_GROUP": "dev.architectury", + "ARCHITECTURY_PACKAGE": "dev.architectury", + "ARCHITECTURY_API": { + "filter": "7\\..*", + "pom": "https://maven.architectury.dev/dev/architectury/architectury/maven-metadata.xml" + }, + "YARN_MAPPINGS": { + "filter": "1\\.19\\.3\\+build\\..*", + "pom": "https://maven.fabricmc.net/net/fabricmc/yarn/maven-metadata.xml" + }, + "__FABRIC_API": { + "filter": ".*\\+1\\.19\\.3", + "pom": "https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api/maven-metadata.xml" + }, + "__FABRIC_API_PROP": "#FABRIC_API_PROP", + "FORGE": { + "filter": "1\\.19\\.3-.*", + "pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml" + }, + "FORGE_LOADER_MAJOR": "44" + } + }, + "1.19.3-forge-fabric-mixin": { + "description": "1.19.3 Forge-Fabric Template with Mixins", + "templates": [ + "templates/architectury", + "templates/architectury_fabric", + "templates/api_new", + "templates/mixin", + "templates/mixin_fabric" + ], + "inherit_tokens": ["1.19.3-forge-fabric"], + "tokens": { + "__MIXIN_FABRIC_BLOCK": "#MIXIN_FABRIC_BLOCK", + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT" + } + }, + "1.19.3-forge-quilt": { + "description": "1.19.3 Forge-Quilt Template", + "templates": [ + "templates/architectury", + "templates/architectury_quilt", + "templates/api_new" + ], + "inherit_tokens": ["1.19.3-forge-fabric"], + "tokens": { + "COMMON_MOD_LOADERS": "quilt,forge", + "INCLUDE_FABRIC_OR_QUILT": "include(\"quilt\")", + "__FABRIC_LOADER_PROP": "", + "__FABRIC_LOADER": "", + "__FABRIC_API_PROP": "", + "__FABRIC_API": "", + "__QUILT_LOADER_PROP": "#QUILT_LOADER_PROP", + "__QUILT_LOADER": "#QUILT_LOADER", + "__QUILT_FABRIC_API_PROP": "#QUILT_FABRIC_API_PROP", + "__QUILT_FABRIC_API": { + "filter": ".*\\-1\\.19\\.3", + "pom": "https://maven.quiltmc.org/repository/release/org/quiltmc/quilted-fabric-api/quilted-fabric-api/maven-metadata.xml" + } + } + }, + "1.19.3-forge-quilt-mixin": { + "description": "1.19.3 Forge-Quilt Template with Mixins", + "templates": [ + "templates/architectury", + "templates/architectury_quilt", + "templates/api_new", + "templates/mixin", + "templates/mixin_quilt" + ], + "inherit_tokens": ["1.19.3-forge-quilt"], + "tokens": { + "__MIXIN_QUILT_BLOCK": "#MIXIN_QUILT_BLOCK", + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT" + } + }, + "1.19.3-forge-fabric-quilt": { + "description": "1.19.3 Forge-Fabric-Quilt Template", + "templates": [ + "templates/architectury", + "templates/architectury_fabric", + "templates/architectury_quilt", + "templates/api_new" + ], + "inherit_tokens": ["1.19.3-forge-fabric"], + "tokens": { + "COMMON_MOD_LOADERS": "quilt,fabric,forge", + "INCLUDE_FABRIC_OR_QUILT": "include(\"fabric\")\ninclude(\"quilt\")", + "__QUILT_LOADER_PROP": "#QUILT_LOADER_PROP", + "__QUILT_LOADER": "#QUILT_LOADER", + "__QUILT_FABRIC_API_PROP": "#QUILT_FABRIC_API_PROP", + "__QUILT_FABRIC_API": { + "filter": ".*\\-1\\.19\\.3", + "pom": "https://maven.quiltmc.org/repository/release/org/quiltmc/quilted-fabric-api/quilted-fabric-api/maven-metadata.xml" + } + } + }, + "1.19.3-forge-fabric-quilt-mixin": { + "description": "1.19.3 Forge-Fabric-Quilt Template with Mixins", + "templates": [ + "templates/architectury", + "templates/architectury_fabric", + "templates/architectury_quilt", + "templates/api_new", + "templates/mixin", + "templates/mixin_fabric", + "templates/mixin_quilt" + ], + "inherit_tokens": ["1.19.3-forge-fabric-quilt"], + "tokens": { + "__MIXIN_QUILT_BLOCK": "#MIXIN_QUILT_BLOCK", + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT" + } + }, + "1.19.3-forge-fabric-like": { + "description": "1.19.3 Forge-Fabric-Like Template", + "templates": [ + "templates/architectury", + "templates/architectury_fabric", + "templates/architectury_quilt", + "templates/architectury_fabric_like", + "templates/api_new" + ], + "inherit_tokens": ["1.19.3-forge-fabric"], + "tokens": { + "COMMON_MOD_LOADERS": "quilt,fabric,forge", + "INCLUDE_FABRIC_OR_QUILT": "include(\"fabric-like\")\ninclude(\"fabric\")\ninclude(\"quilt\")", + "__FABRIC_ADD_FABRICLIKE": "#FABRIC_ADD_FABRICLIKE", + "__QUILT_ADD_FABRICLIKE": "#QUILT_ADD_FABRICLIKE", + "__QUILT_LOADER_PROP": "#QUILT_LOADER_PROP", + "__QUILT_LOADER": "#QUILT_LOADER", + "__QUILT_FABRIC_API_PROP": "#QUILT_FABRIC_API_PROP", + "__QUILT_FABRIC_API": { + "filter": ".*\\-1\\.19\\.3", + "pom": "https://maven.quiltmc.org/repository/release/org/quiltmc/quilted-fabric-api/quilted-fabric-api/maven-metadata.xml" + } + } + }, + "1.19.3-forge-fabric-like-mixin": { + "description": "1.19.3 Forge-Fabric-Like Template with Mixins", + "templates": [ + "templates/architectury", + "templates/architectury_fabric", + "templates/architectury_quilt", + "templates/architectury_fabric_like", + "templates/api_new", + "templates/mixin", + "templates/mixin_fabric", + "templates/mixin_quilt" + ], + "inherit_tokens": ["1.19.3-forge-fabric-like"], + "tokens": { + "__MIXIN_FABRIC_BLOCK": "#MIXIN_FABRIC_BLOCK", + "__MIXIN_QUILT_BLOCK": "#MIXIN_QUILT_BLOCK", + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT" + } + }, + "1.19.4-forge": { + "description": "1.19.4 Forge Template", + "templates": [ + "templates/forge" + ], + "tokens": { + "MINECRAFT": "1.19.4", + "JAVA_VERSION": "#JAVA_17", + "COMPILE_JAVA": "#COMPILE_JAVA_17", + "MCMETA_FORMAT": "13", + "YARN_MAPPINGS": { + "filter": "1\\.19\\.4\\+build\\..*", + "pom": "https://maven.fabricmc.net/net/fabricmc/yarn/maven-metadata.xml" + }, + "FORGE": { + "filter": "1\\.19\\.4-.*", + "pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml" + }, + "FORGE_LOADER_MAJOR": "45", + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "FORGE_EXPLOSION_EVENT_PACKAGE": "net.minecraftforge.event.level", + "FORGE_EXPLOSION_EVENT_GET_LEVEL": "getLevel" + } + }, + "1.19.4-forge-fabric": { + "description": "1.19.4 Forge-Fabric Template", + "templates": [ + "templates/architectury", + "templates/architectury_fabric", + "templates/api_new" + ], + "tokens": { + "MINECRAFT": "1.19.4", + "COMMON_MOD_LOADERS": "fabric,forge", + "INCLUDE_FABRIC_OR_QUILT": "include(\"fabric\")", + "JAVA_VERSION": "#JAVA_17", + "COMPILE_JAVA": "#COMPILE_JAVA_17_ARCH", + "__FABRIC_LOADER": "#FABRIC_LOADER", + "__FABRIC_LOADER_PROP": "#FABRIC_LOADER_PROP", + "MCMETA_FORMAT": "13", + "ARCHITECTURY_GROUP": "dev.architectury", + "ARCHITECTURY_PACKAGE": "dev.architectury", + "ARCHITECTURY_API": { + "filter": "8\\..*", + "pom": "https://maven.architectury.dev/dev/architectury/architectury/maven-metadata.xml" + }, + "YARN_MAPPINGS": { + "filter": "1\\.19\\.4\\+build\\..*", + "pom": "https://maven.fabricmc.net/net/fabricmc/yarn/maven-metadata.xml" + }, + "__FABRIC_API": { + "filter": ".*\\+1\\.19\\.4", + "pom": "https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api/maven-metadata.xml" + }, + "__FABRIC_API_PROP": "#FABRIC_API_PROP", + "FORGE": { + "filter": "1\\.19\\.4-.*", + "pom": "https://maven.minecraftforge.net/net/minecraftforge/forge/maven-metadata.xml" + }, + "FORGE_LOADER_MAJOR": "45" + } + }, + "1.19.4-forge-fabric-mixin": { + "description": "1.19.4 Forge-Fabric Template with Mixins", + "templates": [ + "templates/architectury", + "templates/architectury_fabric", + "templates/api_new", + "templates/mixin", + "templates/mixin_fabric" + ], + "inherit_tokens": ["1.19.4-forge-fabric"], + "tokens": { + "__MIXIN_FABRIC_BLOCK": "#MIXIN_FABRIC_BLOCK", + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT" + } + }, + "1.19.4-forge-quilt": { + "description": "1.19.4 Forge-Quilt Template", + "templates": [ + "templates/architectury", + "templates/architectury_quilt", + "templates/api_new" + ], + "inherit_tokens": ["1.19.4-forge-fabric"], + "tokens": { + "COMMON_MOD_LOADERS": "quilt,forge", + "INCLUDE_FABRIC_OR_QUILT": "include(\"quilt\")", + "__FABRIC_LOADER_PROP": "", + "__FABRIC_LOADER": "", + "__FABRIC_API_PROP": "", + "__FABRIC_API": "", + "__QUILT_LOADER_PROP": "#QUILT_LOADER_PROP", + "__QUILT_LOADER": "#QUILT_LOADER", + "__QUILT_FABRIC_API_PROP": "#QUILT_FABRIC_API_PROP", + "__QUILT_FABRIC_API": { + "filter": ".*\\-1\\.19\\.4", + "pom": "https://maven.quiltmc.org/repository/release/org/quiltmc/quilted-fabric-api/quilted-fabric-api/maven-metadata.xml" + } + } + }, + "1.19.4-forge-quilt-mixin": { + "description": "1.19.4 Forge-Quilt Template with Mixins", + "templates": [ + "templates/architectury", + "templates/architectury_quilt", + "templates/api_new", + "templates/mixin", + "templates/mixin_quilt" + ], + "inherit_tokens": ["1.19.4-forge-quilt"], + "tokens": { + "__MIXIN_QUILT_BLOCK": "#MIXIN_QUILT_BLOCK", + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT" + } + }, + "1.19.4-forge-fabric-quilt": { + "description": "1.19.4 Forge-Fabric-Quilt Template", + "templates": [ + "templates/architectury", + "templates/architectury_fabric", + "templates/architectury_quilt", + "templates/api_new" + ], + "inherit_tokens": ["1.19.4-forge-fabric"], + "tokens": { + "COMMON_MOD_LOADERS": "quilt,fabric,forge", + "INCLUDE_FABRIC_OR_QUILT": "include(\"fabric\")\ninclude(\"quilt\")", + "__QUILT_LOADER_PROP": "#QUILT_LOADER_PROP", + "__QUILT_LOADER": "#QUILT_LOADER", + "__QUILT_FABRIC_API_PROP": "#QUILT_FABRIC_API_PROP", + "__QUILT_FABRIC_API": { + "filter": ".*\\-1\\.19\\.4", + "pom": "https://maven.quiltmc.org/repository/release/org/quiltmc/quilted-fabric-api/quilted-fabric-api/maven-metadata.xml" + } + } + }, + "1.19.4-forge-fabric-quilt-mixin": { + "description": "1.19.4 Forge-Fabric-Quilt Template with Mixins", + "templates": [ + "templates/architectury", + "templates/architectury_fabric", + "templates/architectury_quilt", + "templates/api_new", + "templates/mixin", + "templates/mixin_fabric", + "templates/mixin_quilt" + ], + "inherit_tokens": ["1.19.4-forge-fabric-quilt"], + "tokens": { + "__MIXIN_QUILT_BLOCK": "#MIXIN_QUILT_BLOCK", + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT" + } + }, + "1.19.4-forge-fabric-like": { + "description": "1.19.4 Forge-Fabric-Like Template", + "templates": [ + "templates/architectury", + "templates/architectury_fabric", + "templates/architectury_quilt", + "templates/architectury_fabric_like", + "templates/api_new" + ], + "inherit_tokens": ["1.19.4-forge-fabric"], + "tokens": { + "COMMON_MOD_LOADERS": "quilt,fabric,forge", + "INCLUDE_FABRIC_OR_QUILT": "include(\"fabric-like\")\ninclude(\"fabric\")\ninclude(\"quilt\")", + "__FABRIC_ADD_FABRICLIKE": "#FABRIC_ADD_FABRICLIKE", + "__QUILT_ADD_FABRICLIKE": "#QUILT_ADD_FABRICLIKE", + "__QUILT_LOADER_PROP": "#QUILT_LOADER_PROP", + "__QUILT_LOADER": "#QUILT_LOADER", + "__QUILT_FABRIC_API_PROP": "#QUILT_FABRIC_API_PROP", + "__QUILT_FABRIC_API": { + "filter": ".*\\-1\\.19\\.4", + "pom": "https://maven.quiltmc.org/repository/release/org/quiltmc/quilted-fabric-api/quilted-fabric-api/maven-metadata.xml" + } + } + }, + "1.19.4-forge-fabric-like-mixin": { + "description": "1.19.4 Forge-Fabric-Like Template with Mixins", + "templates": [ + "templates/architectury", + "templates/architectury_fabric", + "templates/architectury_quilt", + "templates/architectury_fabric_like", + "templates/api_new", + "templates/mixin", + "templates/mixin_fabric", + "templates/mixin_quilt" + ], + "inherit_tokens": ["1.19.4-forge-fabric-like"], + "tokens": { + "__MIXIN_FABRIC_BLOCK": "#MIXIN_FABRIC_BLOCK", + "__MIXIN_QUILT_BLOCK": "#MIXIN_QUILT_BLOCK", + "MIXIN_COMPAT_LEVEL": "JAVA_17", + "__LOOM_FORGE_EXT": "#LOOM_FORGE_EXT" + } } } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180..ccebba7 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 41dfb87..42defcc 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.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c787..79a61d4 100755 --- a/gradlew +++ b/gradlew @@ -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,10 +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##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # 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"' @@ -143,12 +143,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 @@ -205,6 +209,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 ac1b06f..6689b85 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/templates/architectury/build.gradle b/templates/architectury/build.gradle index c810525..5cb6e62 100644 --- a/templates/architectury/build.gradle +++ b/templates/architectury/build.gradle @@ -1,6 +1,6 @@ plugins { id "architectury-plugin" version "3.4-SNAPSHOT" - id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false + id "dev.architectury.loom" version "1.1-SNAPSHOT" apply false } architectury { diff --git a/templates/architectury/forge/build.gradle b/templates/architectury/forge/build.gradle index c2b0575..01da2f7 100644 --- a/templates/architectury/forge/build.gradle +++ b/templates/architectury/forge/build.gradle @@ -18,7 +18,7 @@ loom { configurations { common - shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. + shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files. compileClasspath.extendsFrom common runtimeClasspath.extendsFrom common developmentForge.extendsFrom common diff --git a/templates/architectury_fabric/fabric/build.gradle b/templates/architectury_fabric/fabric/build.gradle index ee7092d..ffd2d97 100644 --- a/templates/architectury_fabric/fabric/build.gradle +++ b/templates/architectury_fabric/fabric/build.gradle @@ -13,7 +13,7 @@ loom { configurations { common - shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. + shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files. compileClasspath.extendsFrom common runtimeClasspath.extendsFrom common developmentFabric.extendsFrom common diff --git a/templates/architectury_quilt/quilt/build.gradle b/templates/architectury_quilt/quilt/build.gradle index 48a716c..864e6b5 100644 --- a/templates/architectury_quilt/quilt/build.gradle +++ b/templates/architectury_quilt/quilt/build.gradle @@ -17,7 +17,7 @@ loom { configurations { common - shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. + shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files. compileClasspath.extendsFrom common runtimeClasspath.extendsFrom common developmentQuilt.extendsFrom common diff --git a/templates/forge/build.gradle b/templates/forge/build.gradle index 856bdb5..c72a7eb 100644 --- a/templates/forge/build.gradle +++ b/templates/forge/build.gradle @@ -1,5 +1,5 @@ plugins { - id "dev.architectury.loom" version "0.12.0-SNAPSHOT" + id "dev.architectury.loom" version "1.1-SNAPSHOT" id "maven-publish" } @@ -32,24 +32,6 @@ loom { // also, any names used in your access transformer will need to be // in SRG mapped ("func_" / "field_" with MCP class names) to work! // (both of these things may be subject to change in the future) - - // this will create a data generator configuration - // that you can use to automatically generate assets and data - // using architectury loom. Note that this currently *only* works - // for forge projects made with architectury loom! - dataGen { - mod project.mod_id - } - } - - // This allows you to modify your launch configurations, - // for example to add custom arguments. In this case, we want - // the data generator to check our resources directory for - // existing files. (see Forge's ExistingFileHelper for more info) - launches { - data { - arg "--existing", file("src/main/resources").absolutePath - } } } @@ -139,13 +121,7 @@ jar { publishing { publications { mavenJava(MavenPublication) { - // add all the jars that should be included when publishing to maven - artifact(remapJar) { - builtBy remapJar - } - artifact(sourcesJar) { - builtBy remapSourcesJar - } + from components.java } } diff --git a/templates/forge/src/main/java/com/example/examplemod/ExampleMod.java b/templates/forge/src/main/java/com/example/examplemod/ExampleMod.java index 4ea3931..590344e 100644 --- a/templates/forge/src/main/java/com/example/examplemod/ExampleMod.java +++ b/templates/forge/src/main/java/com/example/examplemod/ExampleMod.java @@ -3,7 +3,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.world.item.Items; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.world.ExplosionEvent; +import @FORGE_EXPLOSION_EVENT_PACKAGE@.ExplosionEvent; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @@ -41,7 +41,7 @@ public ExampleMod() { private void commonSetup(final FMLCommonSetupEvent event) { LOGGER.info("Hello from common setup! This is *after* registries are done, so we can do this:"); - LOGGER.info("Look, I found a {}!", Items.DIAMOND.getRegistryName()); + LOGGER.info("Look, I found a {}!", Items.DIAMOND); } private void clientSetup(final FMLClientSetupEvent event) { @@ -50,6 +50,6 @@ private void clientSetup(final FMLClientSetupEvent event) { @SubscribeEvent public void kaboom(ExplosionEvent.Detonate event) { - LOGGER.info("Kaboom! Something just blew up in {}!", event.getWorld()); + LOGGER.info("Kaboom! Something just blew up in {}!", event.@FORGE_EXPLOSION_EVENT_GET_LEVEL@()); } }