diff --git a/build.gradle.kts b/build.gradle.kts index bd9ab54f6..51bb3a498 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,10 +3,10 @@ plugins { `maven-publish` // Nothing special about this, just keep it up to date - id("com.github.johnrengelman.shadow") version "7.1.2" apply false + id("com.github.johnrengelman.shadow") version "8.1.1" apply false // In general, keep this version in sync with upstream. Sometimes a newer version than upstream might work, but an older version is extremely likely to break. - id("io.papermc.paperweight.patcher") version "1.4.0" + id("io.papermc.paperweight.patcher") version "1.5.7" } val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" @@ -20,8 +20,8 @@ repositories { dependencies { remapper("net.fabricmc:tiny-remapper:0.8.6:fat") // Must be kept in sync with upstream - decompiler("net.minecraftforge:forgeflower:2.0.605.1") // Must be kept in sync with upstream - paperclip("io.papermc:paperclip:3.0.2") // You probably want this to be kept in sync with upstream + decompiler("net.minecraftforge:forgeflower:2.0.627.2") // Must be kept in sync with upstream + paperclip("io.papermc:paperclip:3.0.3") // You probably want this to be kept in sync with upstream } allprojects { diff --git a/gradle.properties b/gradle.properties index 829d5adbf..931dcc51b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ group=com.example.paperfork -version=1.19.3-R0.1-SNAPSHOT +version=1.20.2-R0.1-SNAPSHOT -mcVersion=1.19.3 -paperRef=adb8e499dbc6050abf4a690d369cf506bc3ac318 +mcVersion=1.20.2 +paperRef=29a02095754a8bc76f996f53e1da1cc04b5fd167 org.gradle.caching=true org.gradle.parallel=true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbfa..7f93135c4 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 f398c33c4..3fa8f862f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68d6..1aa94a426 100755 --- a/gradlew +++ b/gradlew @@ -83,10 +83,8 @@ done # 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"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -144,7 +145,7 @@ 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 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# 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 -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# 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, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/patches/server/0001-Build-changes.patch b/patches/server/0001-Build-changes.patch index aee63fb64..9b406f0ba 100644 --- a/patches/server/0001-Build-changes.patch +++ b/patches/server/0001-Build-changes.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Build changes diff --git a/build.gradle.kts b/build.gradle.kts -index d5d49bb2b47c889e12d17dc87b8c439a60b3fe67..9589280a949570426931f4e6d788588f0f325454 100644 +index c187641f0ec6444a10e0e1583e1697d07e8f0267..d9fffa8be70d465149a6c555c74ae1b7c0898fbe 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -7,8 +7,8 @@ plugins { - } +@@ -13,8 +13,8 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { + val alsoShade: Configuration by configurations.creating dependencies { - implementation(project(":paper-api")) @@ -19,7 +19,7 @@ index d5d49bb2b47c889e12d17dc87b8c439a60b3fe67..9589280a949570426931f4e6d788588f // Paper start implementation("org.jline:jline-terminal-jansi:3.21.0") implementation("net.minecrell:terminalconsoleappender:1.3.0") -@@ -61,7 +61,7 @@ tasks.jar { +@@ -72,7 +72,7 @@ tasks.jar { attributes( "Main-Class" to "org.bukkit.craftbukkit.Main", "Implementation-Title" to "CraftBukkit", @@ -28,7 +28,7 @@ index d5d49bb2b47c889e12d17dc87b8c439a60b3fe67..9589280a949570426931f4e6d788588f "Implementation-Vendor" to date, // Paper "Specification-Title" to "Bukkit", "Specification-Version" to project.version, -@@ -133,7 +133,7 @@ fun TaskContainer.registerRunTask( +@@ -156,7 +156,7 @@ fun TaskContainer.registerRunTask( name: String, block: JavaExec.() -> Unit ): TaskProvider = register(name) { @@ -38,10 +38,10 @@ index d5d49bb2b47c889e12d17dc87b8c439a60b3fe67..9589280a949570426931f4e6d788588f standardInput = System.`in` workingDir = rootProject.layout.projectDirectory diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 710ca7d3a5659953f64bc6dccdd93b43300961cc..57e0aa0341b359442e562ef4e213b1c785841788 100644 +index 97745f0bab8d82d397c6c2a5775aed92bca0a034..b17a72020615e790d8f81c52774cbfa3fd703a2b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1654,7 +1654,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop