Skip to content

Commit

Permalink
Paper: Fix: move to jline-terminal-ffm on java 22+ and fall back to j…
Browse files Browse the repository at this point in the history
…ni on 21
  • Loading branch information
Dreeam-qwq committed Nov 28, 2024
1 parent b361294 commit a3f3dba
Show file tree
Hide file tree
Showing 31 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MiniDigger | Martin <admin@minidigger.dev>
Date: Sun, 17 Nov 2024 20:31:50 +0100
Subject: [PATCH] Paper: Fix: move to jline-terminal-ffm on java 22+ and fall
back to jni on 21

Original license: GPLv3
Original project: https://github.com/PaperMC/Paper
Paper pull request: https://github.com/PaperMC/Paper/pull/11631

Ported from Paper 1.21.3
Also see Leaf's Fix-console-freeze-above-JAVA-22.patch

ffm requires 1) native access allowed (the jdk cracks down on undocumented native access in 22) and 2) reverting the default console back to java.base, so the internal jline doesnt take over

diff --git a/build.gradle.kts b/build.gradle.kts
index 068ec805a51764fbe22b91578797e553a7bca1f8..572af93c43a66e6ae17b4aee219a87c5168e3dfa 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -31,7 +31,8 @@ dependencies {
// Leaf end - Libraries

// Paper start
- implementation("org.jline:jline-terminal-jansi:3.27.1") // Leaf - Bump Dependencies
+ implementation("org.jline:jline-terminal-ffm:3.27.1") // Paper - use ffm on java 22+
+ implementation("org.jline:jline-terminal-jni:3.27.1") // Paper - fall back to jni on java 21
implementation("net.minecrell:terminalconsoleappender:1.3.0")
implementation("net.kyori:adventure-text-serializer-ansi:4.17.0") // Keep in sync with adventureVersion from Paper-API build file
/*
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] EMC: Don't use snapshots for TileEntity::getOwner
Original license: MIT
Original project: https://github.com/starlis/empirecraft

Also see EMC-Default-don-t-use-blockstate-snapshots.patch
Also see Leaf's EMC-Default-don-t-use-blockstate-snapshots.patch

diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
index 73c9f91457683e8e6bd8293b4393ccbd984eddb7..7b38835bdac33dce9ed7ca1c0b3d43fdc2224d0c 100644
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This issue caused by inconsistent fluid count, because of a condition change
in LevelChunkSection#setBlockState, introduced by Moonrise's block count optimisation

diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 976d72b611011cccf4b4efadc9772ce1c68ef5ee..1309fa679b4e73645fac6ae04044709915092574 100644
index 6a19390aff7c8f7170467d2c6306b00779f23082..d0bbbd2044809bdb1273248297f5d9fb87011189 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4797,7 +4797,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
Expand Down
File renamed without changes.

0 comments on commit a3f3dba

Please sign in to comment.