diff --git a/PATCHES.md b/PATCHES.md index c4d5dd138..e06e8db1d 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -434,6 +434,8 @@ This is an overview over all patches that are currently used. | server | Zombie horse naturally spawn | William Blake Galbreath | | | server | add config for logging login location | Simon Gardling | | | server | dont load chunks for physics | Aikar | | +| server | java 11 | Simon Gardling | | +| api | java 11 | Simon Gardling | | | server | lithium DataTrackerMixin | JellySquid | tr7zw | | server | lithium HashedList | JellySquid | | | server | lithium MixinBox | JellySquid | | diff --git a/build.gradle.kts b/build.gradle.kts index 6de486f1f..a9b9efdb6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -59,10 +59,10 @@ subprojects { } java { - if(JavaVersion.VERSION_1_8 > JavaVersion.current()){ - error("This build must be run with Java 8 or better") + if(JavaVersion.VERSION_11 > JavaVersion.current()){ + error("This build must be run with Java 11 or later") } - sourceCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.current() withSourcesJar() } diff --git a/patches/api/0009-java-11.patch b/patches/api/0009-java-11.patch new file mode 100644 index 000000000..334a3b2a6 --- /dev/null +++ b/patches/api/0009-java-11.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Simon Gardling +Date: Fri, 23 Apr 2021 11:11:13 -0400 +Subject: [PATCH] java 11 + + +diff --git a/pom.xml b/pom.xml +index 4689aa0788afb7fe5b7c8d1a906373bef2744e91..da706aedb9926a95db6d4e72047b24efbda57447 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -19,8 +19,8 @@ + + + +- 1.8 +- 1.8 ++ 11 ++ 11 + UTF-8 + + diff --git a/patches/server/0076-java-11.patch b/patches/server/0076-java-11.patch new file mode 100644 index 000000000..2fbd9dc2a --- /dev/null +++ b/patches/server/0076-java-11.patch @@ -0,0 +1,59 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Simon Gardling +Date: Fri, 23 Apr 2021 11:11:20 -0400 +Subject: [PATCH] java 11 + + +diff --git a/pom.xml b/pom.xml +index f0a73238612327d71cf78801df816823d80893a0..57a87372c039fb410c97eaa00227b429b90da2b1 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -14,8 +14,8 @@ + git + 1.16.5 + 1_16_R3 +- 1.8 +- 1.8 ++ 11 ++ 11 + + + +diff --git a/src/main/java/io/papermc/paper/util/PaperJvmChecker.java b/src/main/java/io/papermc/paper/util/PaperJvmChecker.java +index c6ea429819c07e7f4bc257cad73463a030767825..b64ffe8240409e038c80a0384c5938e5141bc838 100644 +--- a/src/main/java/io/papermc/paper/util/PaperJvmChecker.java ++++ b/src/main/java/io/papermc/paper/util/PaperJvmChecker.java +@@ -28,21 +28,18 @@ public class PaperJvmChecker { + public static void checkJvm() { + if (getJvmVersion() < 11) { + final Logger logger = LogManager.getLogger(); +- logger.warn("************************************************************"); +- logger.warn("* WARNING - YOU ARE RUNNING AN OUTDATED VERSION OF JAVA."); +- logger.warn("* PAPER WILL STOP BEING COMPATIBLE WITH THIS VERSION OF"); +- logger.warn("* JAVA WHEN MINECRAFT 1.17 IS RELEASED."); +- logger.warn("*"); +- logger.warn("* Please update the version of Java you use to run Paper"); +- logger.warn("* to at least Java 11. When Paper for Minecraft 1.17 is"); +- logger.warn("* released support for versions of Java before 11 will"); +- logger.warn("* be dropped."); +- logger.warn("*"); +- logger.warn("* Current Java version: {}", System.getProperty("java.version")); +- logger.warn("*"); +- logger.warn("* Check this forum post for more information: "); +- logger.warn("* https://papermc.io/java11"); +- logger.warn("************************************************************"); ++ // Yatopia start - require java 11+ ++ // Note - no clue how someone would run a jar built for java 11 on a java version lower than 11, but doesn't hurt to update this warning I guess. ++ logger.fatal("************************************************************"); ++ logger.fatal("* ERROR - YOU ARE RUNNING AN OUTDATED VERSION OF JAVA."); ++ logger.fatal("* YOU NEED TO BE RUNNING JAVA 11 OR HIGHER"); ++ logger.fatal("* In order to achieve Yatopia's high performance,"); ++ logger.fatal("* Yatopia uses features only found in Java 11 or higher."); ++ logger.fatal("* If you do not know how to install Java 11 or have any other questions,"); ++ logger.fatal("* Join our discord server (https://discord.io/YatopiaMC) and ask for support in #yatopia-help"); ++ logger.fatal("************************************************************"); ++ System.exit() ++ // Yatopia end + } + } + }