Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Commit

Permalink
Revert "java 8"
Browse files Browse the repository at this point in the history
This reverts commit cea262e.
  • Loading branch information
Titaniumtown committed May 13, 2021
1 parent 89549aa commit b1d79de
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pipeline {
stages {
stage('Cleanup') {
tools {
jdk "OpenJDK 8"
jdk "OpenJDK 11"
}
steps {
scmSkip(deleteBuild: true, skipPattern:'.*\\[CI-SKIP\\].*')
Expand All @@ -29,7 +29,7 @@ pipeline {
}
stage('Init project & submodules') {
tools {
jdk "OpenJDK 8"
jdk "OpenJDK 11"
}
steps {
withMaven(
Expand All @@ -43,7 +43,7 @@ pipeline {
}
stage('Decompile & apply patches') {
tools {
jdk "OpenJDK 8"
jdk "OpenJDK 11"
}
steps {
withMaven(
Expand All @@ -60,7 +60,7 @@ pipeline {
}
stage('Build') {
tools {
jdk "OpenJDK 8"
jdk "OpenJDK 11"
}
steps {
withMaven(
Expand Down
2 changes: 2 additions & 0 deletions PATCHES.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,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 | |
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ subprojects {
}

java {
if(JavaVersion.VERSION_1_8 > JavaVersion.current()){
error("This build must be run with Java 8 or later")
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()
}
Expand Down
21 changes: 21 additions & 0 deletions patches/api/0009-java-11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Simon Gardling <titaniumtown@gmail.com>
Date: Fri, 23 Apr 2021 11:11:13 -0400
Subject: [PATCH] java 11


diff --git a/pom.xml b/pom.xml
index 9bbb946a378fb6d70ee5c1fbd5214a232c638d9b..3fec0a71912a7b229c787304813f040aea749d5b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,8 +19,8 @@

<properties>
<!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<adventure.version>4.7.0</adventure.version> <!-- Paper - When updating this make sure to update the linked JavaDocs on the homepage as well! -->
</properties>
6 changes: 3 additions & 3 deletions patches/server/0068-C2ME-Port.patch
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ index 0000000000000000000000000000000000000000..215010825a18881f84d94ead66314b94
\ No newline at end of file
diff --git a/src/main/java/org/yatopiamc/c2me/common/util/AsyncCombinedLock.java b/src/main/java/org/yatopiamc/c2me/common/util/AsyncCombinedLock.java
new file mode 100644
index 0000000000000000000000000000000000000000..f83238b6a7fa6da29bd94ad3276f6b61ce1fd310
index 0000000000000000000000000000000000000000..9e34b74d9abecae4b386d49514ceb0d1f333e271
--- /dev/null
+++ b/src/main/java/org/yatopiamc/c2me/common/util/AsyncCombinedLock.java
@@ -0,0 +1,88 @@
Expand Down Expand Up @@ -505,7 +505,7 @@ index 0000000000000000000000000000000000000000..f83238b6a7fa6da29bd94ad3276f6b61
+ ChunkCoordIntPair name = names[i];
+ final LockEntry entry = new LockEntry(name, this.lock.tryLock(name));
+ tryLocks[i] = entry;
+ if (!entry.lockToken.isPresent()) {
+ if (entry.lockToken.isEmpty()) {
+ allAcquired = false;
+ break;
+ }
Expand All @@ -522,7 +522,7 @@ index 0000000000000000000000000000000000000000..f83238b6a7fa6da29bd94ad3276f6b61
+ for (LockEntry entry : tryLocks) {
+ if (entry == null) continue;
+ entry.lockToken.ifPresent(AsyncLock.LockToken::releaseLock);
+ if (!triedRelock && !entry.lockToken.isPresent()) {
+ if (!triedRelock && entry.lockToken.isEmpty()) {
+ this.lock.acquireLock(entry.name).thenCompose(lockToken -> {
+ lockToken.releaseLock();
+ return CompletableFuture.runAsync(this::tryAcquire, lockWorker);
Expand Down
58 changes: 58 additions & 0 deletions patches/server/0072-java-11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Simon Gardling <titaniumtown@gmail.com>
Date: Fri, 23 Apr 2021 11:11:20 -0400
Subject: [PATCH] java 11


diff --git a/pom.xml b/pom.xml
index b75799ab4c158203b3903428c6403c55b2322806..6ffc6c652dbac0cde12d77f290f378fa4c4b27d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,8 +14,8 @@
<bt.name>git</bt.name>
<minecraft.version>1.16.5</minecraft.version>
<minecraft_version>1_16_R3</minecraft_version>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
</properties>

<parent>
diff --git a/src/main/java/io/papermc/paper/util/PaperJvmChecker.java b/src/main/java/io/papermc/paper/util/PaperJvmChecker.java
index c6ea429819c07e7f4bc257cad73463a030767825..3fdca3afeefdb7f850934f9b1b5312f8979b50f3 100644
--- a/src/main/java/io/papermc/paper/util/PaperJvmChecker.java
+++ b/src/main/java/io/papermc/paper/util/PaperJvmChecker.java
@@ -28,21 +28,17 @@ 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("************************************************************");
+ // Yatopia end
}
}
}

0 comments on commit b1d79de

Please sign in to comment.