9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-28 11:29:11 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0096-Purpur-Configurable-server-mod-name.patch
Dreeam 9a4efaa230 Drop patch that causes performance regression
Originally vanilla logic is to use stream, and Mojang switched it to Guava's Collections2
since 1.21.4. It is much faster than using stream or manually adding to a new ArrayList.
Manually adding to a new ArrayList requires allocating a new object array. However, the Collections2
lazy handles filter condition on iteration, so much better.
2025-08-04 19:25:56 +08:00

22 lines
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Mon, 17 Jul 2023 08:31:51 +0800
Subject: [PATCH] Purpur: Configurable server mod name
Original license: MIT
Original project: https://github.com/PurpurMC/Purpur
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index b4c4e18e27fd2f520c122cf3418c8861e60d90ab..7b4437c06c2ede0be7dd58b42863e88b4b205106 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1840,7 +1840,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {
- return io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper
+ return org.dreeam.leaf.config.modules.misc.ServerBrand.serverModName; // Paper // Leaf - Configurable server mod name
}
public SystemReport fillSystemReport(SystemReport systemReport) {