Skip to content

Commit

Permalink
88bo1
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Dec 13, 2024
1 parent 72bd644 commit b2300f0
Show file tree
Hide file tree
Showing 14 changed files with 2,414 additions and 2,413 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ From: Kevin Raneri <kevin.raneri@gmail.com>
Date: Thu, 2 Jun 2022 19:54:09 -0500
Subject: [PATCH] Pufferfish: Entity TTL

Removed since Leaf 1.21.3, Paper 1.21.3 included it

Original license: GPL v3
Original project: https://github.com/pufferfish-gg/Pufferfish

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Subject: [PATCH] Paper PR: Reduce work done in CraftMapCanvas.drawImage by
limiting size of image and using System.arraycopy instead of for loops and
use bitwise operations to do bounds checks.

Removed since Leaf 1.21.3, Paper 1.21.3 included it

Original license: GPLv3
Original project: https://github.com/PaperMC/Paper
Paper pull request: https://github.com/PaperMC/Paper/pull/11000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Thu, 31 Oct 2024 20:36:41 -0700
Subject: [PATCH] Paper: Improve performance of RecipeManager#removeRecipe

Removed since Leaf 1.21.3, Paper 1.21.3 included it

Original license: GPLv3
Original project: https://github.com/PaperMC/Paper
Paper pull request: https://github.com/PaperMC/Paper/pull/11547
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ 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

Removed since Leaf 1.21.3, Paper 1.21.3 included it

Original license: GPLv3
Original project: https://github.com/PaperMC/Paper
Paper pull request: https://github.com/PaperMC/Paper/pull/11631
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ From: Taiyou06 <kaandindar21@gmail.com>
Date: Fri, 8 Nov 2024 04:07:25 +0100
Subject: [PATCH] Better inline world height

Removed since Leaf 1.21.3, Paper 1.21.3 included it

diff --git a/src/main/java/ca/spottedleaf/moonrise/common/util/WorldUtil.java b/src/main/java/ca/spottedleaf/moonrise/common/util/WorldUtil.java
index af9623240ff2d389aa7090623f507720e7dbab7d..a286c8989f8c53fb896be7a3a8e15f850ece1df8 100644
Expand Down
30 changes: 15 additions & 15 deletions patches/server/0001-Rebrand.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ Subject: [PATCH] Rebrand


diff --git a/build.gradle.kts b/build.gradle.kts
index 5ebc35cadc960d428e8a91642ddce0875078d790..4426855192b7dcc58b16d41b8a9d44bbbed3b55f 100644
index 579877ba9bf17f40313c05ad5b1b219cf4b59ab3..a32417619cf253f25f060266a36e895c2e8b623e 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
val alsoShade: Configuration by configurations.creating
@@ -25,7 +25,7 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
// Paper end - configure mockito agent that is needed in newer java versions

dependencies {
- implementation(project(":gale-api")) // Gale start - project setup - Depend on own API
+ implementation(project(":leaf-api")) // Gale start - project setup - Depend on own API // Leaf
// Paper start
implementation("org.jline:jline-terminal-jansi:3.21.0")
implementation("net.minecrell:terminalconsoleappender:1.3.0")
@@ -95,14 +95,14 @@ tasks.jar {
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
@@ -109,14 +109,14 @@ tasks.jar {
val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
Expand All @@ -38,7 +38,7 @@ index 5ebc35cadc960d428e8a91642ddce0875078d790..4426855192b7dcc58b16d41b8a9d44bb
"Build-Time" to Instant.now().toString(),
"Git-Branch" to gitBranch, // Paper
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
index ac23c85f17e0a5cd9702888a873cc470428b3e34..6c5c0cc59ff9901b22288f3cd62228c1e52794c5 100644
index f21106b0897dd6e373970f32f5dd269418528977..6d8634caade010a31a8e1c59684e9bb0e5546380 100644
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
@@ -593,7 +593,7 @@ public class Metrics {
Expand Down Expand Up @@ -162,10 +162,10 @@ index 4d037e899e0b5548be406ad55acd2062603b7da1..379b36944ddb149e2f48221aa39ad090
DamageSource damageSource = this.cloneInstance();
damageSource.customEventDamager = entity;
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 11cf6a20550e252501a92be5bdffafcff007cbf9..54f7aa95cfbcf39bb86ad1b4eb0f9ff2f8526030 100644
index cbeebb98622025d35557125e784cd8f0b4fbb751..79aca7e7cd2f860464657e77e935391642981fad 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -182,7 +182,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -294,7 +294,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
We do not want people to report thread issues to Paper,
but we do want people to report thread issues to Gale.
*/
Expand All @@ -175,24 +175,24 @@ index 11cf6a20550e252501a92be5bdffafcff007cbf9..54f7aa95cfbcf39bb86ad1b4eb0f9ff2
}

diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index bdfb969f88e68d89a5cad4b145bbc1441a110bac..fba0558f46516f65c678635359f305f865336d3a 100644
index f6bc955c3496b52cda1a20aabd78769803ef471f..bbeb271fb19091897e99970198a8a110a4aa0858 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -492,7 +492,7 @@ public class CraftScheduler implements BukkitScheduler {
@@ -491,7 +491,7 @@ public class CraftScheduler implements BukkitScheduler {
this.parsePending();
} else {
// this.debugTail = this.debugTail.setNext(new CraftAsyncDebugger(currentTick + CraftScheduler.RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper
// this.debugTail = this.debugTail.setNext(new CraftAsyncDebugger(this.currentTick + CraftScheduler.RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper
- task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to Gale"); // Paper // Gale - branding changes
+ task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to Leaf"); // Paper // Gale - branding changes // Leaf
// We don't need to parse pending
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 4d0de69b730599d7a89903dd862b89d51ba79e1b..ebf68793373b128e63960e1c60a22d71a46a6b4e 100644
index e57be8cbe35fdc2ae41b3a0278d244672a303059..6f9aecffd821e041f8edc8b8af419b2617c297fc 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -489,7 +489,7 @@ public final class CraftMagicNumbers implements UnsafeValues {

@@ -505,7 +505,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
// Paper start
@Override
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
- return new org.galemc.gale.version.GaleVersionFetcher(); // Gale - branding changes - version fetcher
Expand Down
14 changes: 7 additions & 7 deletions patches/server/0003-Leaf-Config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Add per world config
Add config reload

diff --git a/build.gradle.kts b/build.gradle.kts
index c3790a8ebeeaaa395449e30ab69f1abfa9637034..a56ff254fb752030600fdf1d4ce62ff7ec14765d 100644
index a32417619cf253f25f060266a36e895c2e8b623e..2fddb2f371b5b901be668fb60dbf871830ec571f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -14,6 +14,13 @@ val alsoShade: Configuration by configurations.creating
@@ -26,6 +26,13 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {

dependencies {
implementation(project(":leaf-api")) // Gale start - project setup - Depend on own API // Leaf
Expand All @@ -26,10 +26,10 @@ index c3790a8ebeeaaa395449e30ab69f1abfa9637034..a56ff254fb752030600fdf1d4ce62ff7
+ // Leaf end - Leaf Config
+
// Paper start
implementation("org.jline:jline-terminal-jansi:3.21.0")
implementation("net.minecrell:terminalconsoleappender:1.3.0")
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 278adb48400ca9d4fd37bff040b37d4a8dd47282..759b22fc6f949829cef757232357368ef80d0d34 100644
index d3219e3d36ef96bb43c2cb7d86f14ef7a702fcac..c7b5429910df7e3c4cfe1ac2f095845fd493c9b1 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -124,6 +124,7 @@ public class Main {
Expand All @@ -41,10 +41,10 @@ index 278adb48400ca9d4fd37bff040b37d4a8dd47282..759b22fc6f949829cef757232357368e
DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(optionset); // CraftBukkit - CLI argument support

diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4efbd656c57672b84c5d90f987bd57c67fc0c550..05f805c7e7a6ff6d40b9f86aaac5362ab516be3f 100644
index 24b9711dca7223dd12b24c36cd76f50fbd96fc68..40c2dd482a8e10f1d5262d365841c968dda847cc 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1221,6 +1221,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1242,6 +1242,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
org.spigotmc.WatchdogThread.tick();
// Paper end - Improved Watchdog Support
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0004-Leaf-Bootstrap.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Subject: [PATCH] Leaf Bootstrap
org.bukkit.craftbukkit.Main#main -> LeafBootstrap -> PaperBootstrap -> ...

diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index c1e88c31910e96ef07cece05046c0b55e708b52d..c63dfc0b740ce2e544ad920188d7d7dfc2ae3e04 100644
index be0d38544395a9b3befb898bb961f34e32fe9509..50a2b6e73ba4d8ad65582b2544fa409fd44f36d5 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -278,7 +278,8 @@ public class Main {

System.setProperty("jdk.console", "java.base"); // Paper - revert default console provider back to java.base so we can have our own jline
//System.out.println("Loading libraries, please wait...");
//net.minecraft.server.Main.main(options);
- io.papermc.paper.PaperBootstrap.boot(options);
Expand Down
Loading

0 comments on commit b2300f0

Please sign in to comment.