9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-04 15:41:40 +00:00

Paper: Fix: move to jline-terminal-ffm on java 22+ and fall back to jni on 21

This commit is contained in:
Dreeam
2024-11-28 16:34:29 -05:00
parent b361294778
commit a3f3dbab2f
31 changed files with 31 additions and 2 deletions

View File

@@ -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
/*

View File

@@ -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

View File

@@ -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