Compare commits

...

9 Commits

Author SHA1 Message Date
github-actions[bot]
f0db903bb5 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@bf92f3e Updated Upstream (Bukkit/CraftBukkit)
2023-03-30 13:57:03 +00:00
github-actions[bot]
8a333120da Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@1924a57 Updated Upstream (Paper)
2023-03-30 07:08:13 +00:00
AlphaKR93
424e876c7c Updated Upstream (Paper) 2023-03-30 12:56:38 +09:00
github-actions[bot]
e5e84f55ab Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@32875b4 8948: Nag when timings is enabled or a plugin creates a new Timing
2023-03-29 19:54:35 +00:00
github-actions[bot]
2bfa77be48 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@f5a789d Updated Upstream (Paper)
2023-03-28 04:52:02 +00:00
IPECTER 이팩터
8578903621 Port MemoryLeakFix (#39) 2023-03-28 12:53:31 +09:00
github-actions[bot]
6a3b842b90 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@5c78e77 Fix api checking banned ips (#9026)
2023-03-28 03:36:17 +00:00
github-actions[bot]
6c345e6680 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@ce2a36d Fix PluginMeta#getDisplayName (#9038)
PaperMC/Paper@9940019 Deprecate public Timings classes for removal (#8949)
2023-03-28 03:24:49 +00:00
github-actions[bot]
60b13b6213 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@bd62f2c Fix chat messages being logged without formatting to console (#9058)
2023-03-27 17:37:40 +00:00
12 changed files with 115 additions and 86 deletions

View File

@@ -1,2 +1,2 @@
purpurCommit = 7e014a84b540a14073eccd62152d886eaebd5099
pufferfishCommit = d032415ca6fd0736d7cb0da28e3134b957fb83a0
purpurCommit = 1924a57cc7a547de392686dc18fd0b1e137e95b1
pufferfishCommit = 751dfb0338e2c09519313ffaca04084dc3140b80

View File

@@ -85,8 +85,6 @@ paperweight {
}
val upstreamTask = tasks.register("updateUpstream") {
finalizedBy("applyPatches")
val tempDir = layout.cacheDir("updateUpstream");
val file = "gradle.properties";

View File

@@ -1,7 +1,7 @@
group = org.plazmamc.plazma
version = 1.19.4-R0.1-SNAPSHOT
paperCommit = fbf74ba0ac016c408bbec28e7da317b68a81e2e1
paperCommit = bf92f3e4db44d17dab7411b0a5474a6b2fabc3b5
org.gradle.caching = true
org.gradle.parallel = true

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Mon, 27 Mar 2023 06:56:27 +0000
Date: Thu, 30 Mar 2023 06:56:29 +0000
Subject: [PATCH] Pufferfish API Changes
Original: Kevin Raneri <kevin.raneri@gmail.com>

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Mon, 27 Mar 2023 06:58:48 +0000
Date: Thu, 30 Mar 2023 06:58:47 +0000
Subject: [PATCH] Purpur API Changes
Original: PurpurMC
@@ -38,10 +38,10 @@ index b83e2c5a0a094002d12aee55ec0cf8d12bf33f3e..b5835fa536f90b7f88a5ee4df78733cf
options.overview = "src/main/javadoc/overview.html"
options.use()
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
index 34e43e56ccc663e05b9cae36643e8df5eee5cb17..2c15b67149d014fdce2dd74a550013d83b6e44c8 100644
index 8f29c1561ba5916cb5634392edd8bd2a5a294a51..6fbc64e0f214d0c8e5afcbe385e414a4e1fe1c72 100644
--- a/src/main/java/co/aikar/timings/TimedEventExecutor.java
+++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java
@@ -76,9 +76,9 @@ public class TimedEventExecutor implements EventExecutor {
@@ -77,9 +77,9 @@ public class TimedEventExecutor implements EventExecutor {
executor.execute(listener, event);
return;
}
@@ -54,10 +54,10 @@ index 34e43e56ccc663e05b9cae36643e8df5eee5cb17..2c15b67149d014fdce2dd74a550013d8
@Override
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
index a21e5ead5024fd0058c5e3302d8201dd249d32bc..505908e987a032a801ae03d7fb020dfb662bf81b 100644
index 7514fad26f955329f8bf17ff17db75f0c8301ee5..1d866e980abc542bdfee1ce082cd9cdd7761e9f7 100644
--- a/src/main/java/co/aikar/timings/Timing.java
+++ b/src/main/java/co/aikar/timings/Timing.java
@@ -36,6 +36,7 @@ public interface Timing extends AutoCloseable {
@@ -39,6 +39,7 @@ public interface Timing extends AutoCloseable {
* @return Timing
*/
@NotNull
@@ -65,7 +65,7 @@ index a21e5ead5024fd0058c5e3302d8201dd249d32bc..505908e987a032a801ae03d7fb020dfb
Timing startTiming();
/**
@@ -43,6 +44,7 @@ public interface Timing extends AutoCloseable {
@@ -46,6 +47,7 @@ public interface Timing extends AutoCloseable {
*
* Will automatically be called when this Timing is used with try-with-resources
*/
@@ -73,7 +73,7 @@ index a21e5ead5024fd0058c5e3302d8201dd249d32bc..505908e987a032a801ae03d7fb020dfb
void stopTiming();
/**
@@ -53,6 +55,7 @@ public interface Timing extends AutoCloseable {
@@ -56,6 +58,7 @@ public interface Timing extends AutoCloseable {
* @return Timing
*/
@NotNull
@@ -81,7 +81,7 @@ index a21e5ead5024fd0058c5e3302d8201dd249d32bc..505908e987a032a801ae03d7fb020dfb
Timing startTimingIfSync();
/**
@@ -62,12 +65,14 @@ public interface Timing extends AutoCloseable {
@@ -65,12 +68,14 @@ public interface Timing extends AutoCloseable {
*
* But only if we are on the primary thread.
*/
@@ -96,7 +96,7 @@ index a21e5ead5024fd0058c5e3302d8201dd249d32bc..505908e987a032a801ae03d7fb020dfb
void abort();
/**
@@ -79,5 +84,6 @@ public interface Timing extends AutoCloseable {
@@ -82,5 +87,6 @@ public interface Timing extends AutoCloseable {
TimingHandler getTimingHandler();
@Override
@@ -104,10 +104,10 @@ index a21e5ead5024fd0058c5e3302d8201dd249d32bc..505908e987a032a801ae03d7fb020dfb
void close();
}
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
index dd72a34eaa4bedd9ea0b92eaa79091b00eb4dd09..759e9cbcedb50894821dcb6dcc602af4f0c3453e 100644
index 9812d668ad945aba486fbf6d5bf83c4292cb5d03..187672fdcb77081653335d20537fbd795c026245 100644
--- a/src/main/java/co/aikar/timings/Timings.java
+++ b/src/main/java/co/aikar/timings/Timings.java
@@ -114,7 +114,7 @@ public final class Timings {
@@ -124,7 +124,7 @@ public final class Timings {
@NotNull
public static Timing ofStart(@NotNull Plugin plugin, @NotNull String name, @Nullable Timing groupHandler) {
Timing timing = of(plugin, name, groupHandler);
@@ -117,10 +117,10 @@ index dd72a34eaa4bedd9ea0b92eaa79091b00eb4dd09..759e9cbcedb50894821dcb6dcc602af4
}
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
index 3132dc98d26c54c5e46162e53aaed195d7335c8d..b461b5c50f97f11cb9ef68abc520271bb72440fa 100644
index e801e79fa57c44b2e5d359647c920f88064826f1..1abfcee0f6d632f4cd8d74b4994a90c9ea9d254c 100644
--- a/src/main/java/co/aikar/timings/TimingsCommand.java
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
@@ -44,7 +44,7 @@ public class TimingsCommand extends BukkitCommand {
@@ -45,7 +45,7 @@ public class TimingsCommand extends BukkitCommand {
public TimingsCommand(@NotNull String name) {
super(name);
this.description = "Manages Spigot Timings data to see performance of the server.";
@@ -129,21 +129,22 @@ index 3132dc98d26c54c5e46162e53aaed195d7335c8d..b461b5c50f97f11cb9ef68abc520271b
this.setPermission("bukkit.command.timings");
}
@@ -53,6 +53,13 @@ public class TimingsCommand extends BukkitCommand {
@@ -54,8 +54,12 @@ public class TimingsCommand extends BukkitCommand {
if (!testPermission(sender)) {
return true;
}
- if (false) {
- sender.sendMessage(Timings.deprecationMessage());
+ if (true) {
+ net.kyori.adventure.text.minimessage.MiniMessage mm = net.kyori.adventure.text.minimessage.MiniMessage.miniMessage();
+ sender.sendMessage(mm.deserialize("<gold>Purpur has removed timings to save your performance. Please use <click:suggest_command:'/spark'><grey>/spark</grey></click> instead"));
+ sender.sendMessage(mm.deserialize("<gold>For more information, view its documentation at"));
+ sender.sendMessage(mm.deserialize("<gold><click:open_url:'https://spark.lucko.me/docs/Command-Usage'>https://spark.lucko.me/docs/Command-Usage</click>"));
+ return true;
+ }
}
if (args.length < 1) {
sender.sendMessage(text("Usage: " + this.usageMessage, NamedTextColor.RED));
return true;
@@ -111,7 +118,7 @@ public class TimingsCommand extends BukkitCommand {
@@ -115,7 +119,7 @@ public class TimingsCommand extends BukkitCommand {
Preconditions.checkNotNull(args, "Arguments cannot be null");
Preconditions.checkNotNull(alias, "Alias cannot be null");
@@ -4062,7 +4063,7 @@ index 0000000000000000000000000000000000000000..38483d908ed830e97883733bee2370f8
+ }
+}
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
index 123647bb10fc89508437d7a0bd3fd31d58ee7c82..ce209668dd7f11b284bd7f5688191a0b3ae86a09 100644
index 12946bd55fcf7c40d39081779a7fa30049ee6165..9c2d605c50cbf9aefa56ec209df9f6cea1392e89 100644
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
@@ -61,7 +61,7 @@ public final class CustomTimingsHandler {

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Mon, 27 Mar 2023 06:56:27 +0000
Date: Thu, 30 Mar 2023 06:56:29 +0000
Subject: [PATCH] Pufferfish Server Changes
Original: Kevin Raneri <kevin.raneri@gmail.com>
@@ -77,10 +77,10 @@ index 9cf389defdaeb887e9cad4f0fed3f3b95667b238..b41b186397d013c19436c345be98b785
"Specification-Title" to "Bukkit",
"Specification-Version" to project.version,
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
index 06bff37e4c1fddd3be6343049a66787c63fb420c..2cc44fbf8e5bd436b6d4e19f6c06b351e750cb31 100644
index c07eb451a576811a39021f6f97103c77488fd001..5af15c85fab72034b97ac210ff775e0a8fa0be78 100644
--- a/src/main/java/co/aikar/timings/TimingsExport.java
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
@@ -241,7 +241,8 @@ public class TimingsExport extends Thread {
@@ -242,7 +242,8 @@ public class TimingsExport extends Thread {
parent.put("config", createObject(
pair("spigot", mapAsJSON(Bukkit.spigot().getSpigotConfig(), null)),
pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)),
@@ -1502,10 +1502,10 @@ index 6efb8b10f17c70b05128039376d254e6beda3841..57e8c6673c7cfe447a75f15506e80000
public static long getCoordinateKey(final ChunkPos pair) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4450d825a5474da211f0e83f845d8c7129fa08aa..a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b 100644
index 9f15d9dbdfa74a0640b1a2b4ff695609d4758a4c..644a7f020afd26017543056fd9378868b1874fe8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -313,6 +313,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -314,6 +314,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public volatile boolean abnormalExit = false; // Paper
public boolean isIteratingOverLevels = false; // Paper
@@ -1514,7 +1514,7 @@ index 4450d825a5474da211f0e83f845d8c7129fa08aa..a4c64b1cc11955fb279b8ed0fb7d2668
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
Thread thread = new io.papermc.paper.util.TickThread(() -> { // Paper - rewrite chunk system
@@ -1681,7 +1683,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1682,7 +1684,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {
@@ -1523,7 +1523,7 @@ index 4450d825a5474da211f0e83f845d8c7129fa08aa..a4c64b1cc11955fb279b8ed0fb7d2668
}
public SystemReport fillSystemReport(SystemReport details) {
@@ -2266,6 +2268,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2267,6 +2269,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public ProfilerFiller getProfiler() {
@@ -1786,7 +1786,7 @@ index 5a5ff40df37db9cbd53c584ed26a3ce4888b29c0..ff2862bf1f511196d1e911e2584262ed
this.getRandomBlockPosition(j, 0, k, 15, blockposition);
int normalY = chunk.getHeight(Heightmap.Types.MOTION_BLOCKING, blockposition.getX() & 15, blockposition.getZ() & 15) + 1;
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 2d8488b9aa088b6d5f0c7e557b8ad0b29bc4cd88..24d48fb4a63c2db19c7f957ad2260415fe1db9fe 100644
index d587b2c4e39bce7e098aa9fab361230f72770658..e6e1c46a01961d47a774e34e430c8eacda22d558 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1206,6 +1206,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1797,7 +1797,7 @@ index 2d8488b9aa088b6d5f0c7e557b8ad0b29bc4cd88..24d48fb4a63c2db19c7f957ad2260415
// Paper start
if (!this.cserver.isPrimaryThread()) {
List<String> pageList = packet.getPages();
@@ -2346,6 +2347,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2347,6 +2348,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
private boolean updateChatOrder(Instant timestamp) {

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Mon, 27 Mar 2023 06:58:47 +0000
Date: Thu, 30 Mar 2023 06:58:47 +0000
Subject: [PATCH] Purpur Server Changes
Original: PurpurMC
@@ -1049,10 +1049,10 @@ index 9ec6145fe04ec64bbee8ec6a837719caebdbc6f5..358d610ad020cada1bb83e393deeeaae
public ClientboundSetTimePacket(long time, long timeOfDay, boolean doDaylightCycle) {
this.gameTime = time;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af33612294 100644
index 644a7f020afd26017543056fd9378868b1874fe8..46b9aed8ab46bd4bfdcf44a392ffc34e26da0f5f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -249,7 +249,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -250,7 +250,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private boolean allowFlight;
@Nullable
private String motd;
@@ -1061,7 +1061,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
private int playerIdleTimeout;
public final long[] tickTimes;
// Paper start
@@ -295,6 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -296,6 +296,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
//public ConsoleReader reader; // Paper
public static int currentTick = 0; // Paper - Further improve tick loop
@@ -1069,7 +1069,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
public Commands vanillaCommandDispatcher;
@@ -304,10 +305,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -305,10 +306,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public static final int TPS = 20;
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
private static final int SAMPLE_INTERVAL = 20; // Paper
@@ -1083,7 +1083,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
public volatile Thread shutdownThread; // Paper
public volatile boolean abnormalExit = false; // Paper
@@ -339,13 +342,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -340,13 +343,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
super("Server");
SERVER = this; // Paper - better singleton
@@ -1103,7 +1103,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
this.random = RandomSource.create();
this.port = -1;
this.levels = Maps.newLinkedHashMap();
@@ -926,7 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -927,7 +930,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
shutdownThread = Thread.currentThread();
org.spigotmc.WatchdogThread.doStop(); // Paper
if (!isSameThread()) {
@@ -1112,7 +1112,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
while (this.getRunningThread().isAlive()) {
this.getRunningThread().stop();
try {
@@ -936,13 +939,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -937,13 +940,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// Paper end
// CraftBukkit end
@@ -1136,7 +1136,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -1024,6 +1035,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1025,6 +1036,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.safeShutdown(waitForShutdown, false);
}
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
@@ -1145,7 +1145,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
this.isRestarting = isRestarting;
this.hasLoggedStop = true; // Paper
if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper
@@ -1050,6 +1063,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1051,6 +1064,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
private long lastTick = 0;
private long catchupTime = 0;
@@ -1153,7 +1153,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
public final RollingAverage tps1 = new RollingAverage(60);
public final RollingAverage tps5 = new RollingAverage(60 * 5);
public final RollingAverage tps15 = new RollingAverage(60 * 15);
@@ -1150,35 +1164,46 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1151,35 +1165,46 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
{
final long diff = curTime - tickSection;
java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
@@ -1211,7 +1211,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
this.isReady = true;
JvmProfiler.INSTANCE.onServerTick(this.averageTickTime);
}
@@ -1339,7 +1364,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1340,7 +1365,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
@@ -1220,7 +1220,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
super.doRunTask(ticktask);
}
@@ -1382,15 +1407,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1383,15 +1408,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public void onServerExit() {}
public void tickServer(BooleanSupplier shouldKeepTicking) {
@@ -1239,7 +1239,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
// Paper end
new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper
@@ -1406,7 +1431,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1407,7 +1432,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (playerSaveInterval < 0) {
playerSaveInterval = autosavePeriod;
}
@@ -1248,7 +1248,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
try {
this.isSaving = true;
@@ -1421,20 +1446,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1422,20 +1447,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} finally {
this.isSaving = false;
}
@@ -1273,7 +1273,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
long j = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
this.averageTickTime = this.averageTickTime * 0.8F + (float) j / 1000000.0F * 0.19999999F;
@@ -1446,9 +1471,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1447,9 +1472,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
tickTimes60s.add(this.tickCount, j);
// Paper end
this.frameTimer.logFrameDuration(k - i);
@@ -1285,7 +1285,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
}
private ServerStatus buildServerStatus() {
@@ -1480,26 +1505,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1481,26 +1506,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void tickChildren(BooleanSupplier shouldKeepTicking) {
@@ -1321,7 +1321,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
// Send time updates to everyone, it will get the right time from the world the player is in.
// Paper start - optimize time updates
for (final ServerLevel world : this.getAllLevels()) {
@@ -1508,7 +1533,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1509,7 +1534,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
long worldTime = world.getGameTime();
final ClientboundSetTimePacket worldPacket = new ClientboundSetTimePacket(worldTime, dayTime, doDaylight);
for (Player entityhuman : world.players()) {
@@ -1330,7 +1330,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
continue;
}
ServerPlayer entityplayer = (ServerPlayer) entityhuman;
@@ -1519,38 +1544,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1520,38 +1545,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
// Paper end
@@ -1379,7 +1379,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
} catch (Throwable throwable) {
// Spigot Start
CrashReport crashreport;
@@ -1566,33 +1593,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1567,33 +1594,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
throw new ReportedException(crashreport);
}
@@ -1425,7 +1425,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
}
private void synchronizeTime(ServerLevel world) {
@@ -1600,7 +1627,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1601,7 +1628,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void forceTimeSynchronization() {
@@ -1434,7 +1434,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
Iterator iterator = this.getAllLevels().iterator();
while (iterator.hasNext()) {
@@ -1609,7 +1636,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1610,7 +1637,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.synchronizeTime(worldserver);
}
@@ -1443,7 +1443,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
}
public boolean isNetherEnabled() {
@@ -1683,7 +1710,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1684,7 +1711,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {
@@ -1452,7 +1452,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
}
public SystemReport fillSystemReport(SystemReport details) {
@@ -1876,17 +1903,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1877,17 +1904,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public net.kyori.adventure.text.Component getComponentMotd() {
@@ -1472,7 +1472,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
}
public boolean isStopped() {
@@ -2268,7 +2290,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2269,7 +2291,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public ProfilerFiller getProfiler() {
@@ -1481,7 +1481,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
return this.profiler;
}
@@ -2508,7 +2530,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2509,7 +2531,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit end
private void startMetricsRecordingTick() {
@@ -1490,7 +1490,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, this.isDedicatedServer()), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
this.executeBlocking(() -> {
this.saveDebugReport(path.resolve("server"));
@@ -2518,40 +2540,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2519,40 +2541,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.willStartRecordingMetrics = false;
}
@@ -1543,7 +1543,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
}
public Path getWorldPath(LevelResource worldSavePath) {
@@ -2600,15 +2622,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2601,15 +2623,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public boolean isTimeProfilerRunning() {
@@ -1562,7 +1562,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
return EmptyProfileResults.EMPTY;
} else {
ProfileResults methodprofilerresults = this.debugCommandProfiler.stop(Util.getNanos(), this.tickCount);
@@ -2638,6 +2660,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2641,6 +2663,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon(true).setNameFormat("Async Chat Thread - #%d").setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build()); // Paper
public ChatDecorator getChatDecorator() {
@@ -1578,7 +1578,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
// Paper start - moved to ChatPreviewProcessor
return ChatDecorator.create((sender, commandSourceStack, message) -> {
final io.papermc.paper.adventure.ChatDecorationProcessor processor = new io.papermc.paper.adventure.ChatDecorationProcessor(this, sender, commandSourceStack, message);
@@ -2772,7 +2803,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2775,7 +2806,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return;
}
@@ -1587,7 +1587,7 @@ index a4c64b1cc11955fb279b8ed0fb7d2668a7b90d2b..2cc20cc768bbbd386972c426d3a131af
try {
for (;;) {
boolean moreTasks = this.tickMidTickTasks();
@@ -2799,7 +2830,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2802,7 +2833,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
} finally {
@@ -3026,7 +3026,7 @@ index 877498729c66de9aa6a27c9148f7494d7895615c..acd7468ee3c86d3456e96e4ec3d7e6a4
Util.logAndPauseIfInIde("Detected setBlock in a far chunk [" + i + ", " + j + "], pos: " + pos + ", status: " + this.generatingStatus + (this.currentlyGenerating == null ? "" : ", currently generating: " + (String) this.currentlyGenerating.get()));
hasSetFarWarned = true;
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b431b6fc5 100644
index e6e1c46a01961d47a774e34e430c8eacda22d558..dd53bc05595c6ea7afff23f11e0f54e90078684f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -261,6 +261,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3307,7 +3307,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
player.getBukkitEntity().setResourcePackStatus(packStatus);
this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packStatus)); // CraftBukkit
// Paper end
@@ -2353,7 +2444,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2354,7 +2445,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
do {
instant1 = (Instant) this.lastChatTimeStamp.get();
if (timestamp.isBefore(instant1)) {
@@ -3316,7 +3316,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
}
} while (!this.lastChatTimeStamp.compareAndSet(instant1, timestamp));
@@ -2490,7 +2581,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2491,7 +2582,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
}
// Paper End
@@ -3325,7 +3325,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
@@ -2500,7 +2591,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2501,7 +2592,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.cserver.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@@ -3334,7 +3334,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
return;
}
@@ -2513,7 +2604,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2514,7 +2605,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
return;
} finally {
@@ -3343,7 +3343,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
}
}
// CraftBukkit end
@@ -2779,6 +2870,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2780,6 +2871,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
AABB axisalignedbb = entity.getBoundingBox();
if (axisalignedbb.distanceToSqr(this.player.getEyePosition()) < ServerGamePacketListenerImpl.MAX_INTERACTION_DISTANCE) {
@@ -3351,7 +3351,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
packet.dispatch(new ServerboundInteractPacket.Handler() {
private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit
ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand);
@@ -2792,6 +2884,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2793,6 +2885,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
ServerGamePacketListenerImpl.this.cserver.getPluginManager().callEvent(event);
@@ -3360,7 +3360,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
// Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
entity.getEntityData().resendPossiblyDesyncedEntity(player); // Paper - The entire mob gets deleted, so resend it.
@@ -3343,6 +3437,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3344,6 +3438,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
}
}
@@ -3373,7 +3373,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
boolean flag1 = packet.getSlotNum() >= 1 && packet.getSlotNum() <= 45;
boolean flag2 = itemstack.isEmpty() || itemstack.getDamageValue() >= 0 && itemstack.getCount() <= 64 && !itemstack.isEmpty();
@@ -3449,11 +3549,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3450,11 +3550,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
for (int i = 0; i < signText.size(); ++i) {
FilteredText filteredtext = (FilteredText) signText.get(i);
@@ -3394,7 +3394,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
}
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.player.getBukkitEntity(), lines);
this.cserver.getPluginManager().callEvent(event);
@@ -3475,6 +3581,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3476,6 +3582,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
@@ -3411,7 +3411,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
//PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // CraftBukkit // Paper - This shouldn't be on the main thread
if (this.keepAlivePending && packet.getId() == this.keepAliveChallenge) {
int i = (int) (Util.getMillis() - this.keepAliveTime);
@@ -3525,6 +3641,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3526,6 +3642,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister");
private static final ResourceLocation MINECRAFT_BRAND = new ResourceLocation("brand"); // Paper - Brand support
@@ -3419,7 +3419,7 @@ index 24d48fb4a63c2db19c7f957ad2260415fe1db9fe..ae3c1bd67c144fe971d4df6df2ca171b
@Override
public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {
@@ -3549,6 +3666,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3550,6 +3667,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex);
this.disconnect("Invalid payload UNREGISTER!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); // Paper - kick event cause
}
@@ -19072,7 +19072,7 @@ index b91effe91dad2e1aeea0ea31140f7432833b343f..bb628bd3fe8b185f356968697b17e1c4
if (!world.addFreshEntity(entitywither, SpawnReason.BUILD_WITHER)) {
return;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
index 2a786c9fd29dc2139cf487fa645cd43345d60167..507b3756238ec3054232b805a9b689be6ea12e25 100644
index a3f073066f6e2eea8964461ad2b0409ade202f35..5cd7b4e7065070bf9fcc34b621dba2ccba99a573 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
@@ -44,6 +44,7 @@ import net.minecraft.world.level.Level;

View File

@@ -175,10 +175,10 @@ index c6fa6bcd66d61359124a8426b919493c6ec43f06..e0eaa847526431ac58d00f18f0fca6b1
/* CraftBukkit start - Replace everything
OptionParser optionparser = new OptionParser();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2cc20cc768bbbd386972c426d3a131af33612294..b81f8207348992761eac2aca8bae370c9b39f0f3 100644
index 46b9aed8ab46bd4bfdcf44a392ffc34e26da0f5f..62ccafc3df9e2d25dbe7e2ad9322f306f8df8061 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -929,7 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -930,7 +930,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
shutdownThread = Thread.currentThread();
org.spigotmc.WatchdogThread.doStop(); // Paper
if (!isSameThread()) {

View File

@@ -169,10 +169,10 @@ index f6b9d216c24d8858802f85209fe1a869e5a9be31..746fdd880862e7dd8b53dec99b07ae62
+ // Plazma end
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index b81f8207348992761eac2aca8bae370c9b39f0f3..9ba8bf1cc91494651a1855d12415f4ac3586cf9d 100644
index 62ccafc3df9e2d25dbe7e2ad9322f306f8df8061..abf904a1d0dc7a5943cdba540c2b76eb0577954d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -308,6 +308,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -309,6 +309,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public final double[] recentTps = new double[ 4 ]; // Purpur
// Spigot end
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
@@ -180,7 +180,7 @@ index b81f8207348992761eac2aca8bae370c9b39f0f3..9ba8bf1cc91494651a1855d12415f4ac
public static long currentTickLong = 0L; // Paper
public boolean lagging = false; // Purpur
protected boolean upnp = false; // Purpur
@@ -414,6 +415,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -415,6 +416,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper end
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
this.paperConfigurations = services.paperConfigurations(); // Paper

View File

@@ -18,10 +18,10 @@ index e5ea9f27a1936ed9e329e74317c91c5df89b9fbd..7e7a4d872983cd2efdc575bc33353f94
private long lastFill = -1;
private long nextRefill = -1;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9ba8bf1cc91494651a1855d12415f4ac3586cf9d..17cd928af104d74704d61ca26084bd60014af800 100644
index abf904a1d0dc7a5943cdba540c2b76eb0577954d..62507bb72288a01f15068aaaee5ae40f0655112c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -693,7 +693,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -694,7 +694,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ChunkPos chunkcoordintpair = new ChunkPos(chunkproviderserver.randomState().sampler().findSpawnPosition());
// CraftBukkit start
if (world.generator != null) {

View File

@@ -71,10 +71,10 @@ index efcee39cd7154493de04ca903edbd32b5901b191..a398b71c52817bd68a05613ec037ed6d
protected boolean convertOldUsers() {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index dee076d1e6e30f108a79565546182b4751737baa..c18f953950fd2c00a3880fa20c9904a940191666 100644
index d40ef5f2961a13572705a0fff8a5e0e9ab6a67bd..b2043528c3cfe1078b5d732cbbea8fbe2f4b5a2c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2224,10 +2224,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2225,10 +2225,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void send(Packet<?> packet) {

View File

@@ -0,0 +1,30 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Tue, 28 Mar 2023 12:42:17 +0900
Subject: [PATCH] Implement MemoryLeakFix
Original: fxmorin/MemoryLeakFix
Copyright (C) 2023 fxmorin
diff --git a/src/main/java/net/minecraft/world/level/biome/Biome.java b/src/main/java/net/minecraft/world/level/biome/Biome.java
index ed439b7e94646141c93a7dd3704d1cdeb5c27e16..2bddcaf8762ee7834c32622402a976bfad12d127 100644
--- a/src/main/java/net/minecraft/world/level/biome/Biome.java
+++ b/src/main/java/net/minecraft/world/level/biome/Biome.java
@@ -67,7 +67,7 @@ public final class Biome {
private final MobSpawnSettings mobSettings;
private final BiomeSpecialEffects specialEffects;
// Pufferfish start - use our cache
- private final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> {
+ private static final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> { // Plazma - MemoryLeakFix
return Util.make(() -> {
/*
Long2FloatLinkedOpenHashMap long2FloatLinkedOpenHashMap = new Long2FloatLinkedOpenHashMap(1024, 0.25F) {
@@ -125,7 +125,7 @@ public final class Biome {
public float getTemperature(BlockPos blockPos) {
long l = blockPos.asLong();
// Pufferfish start
- gg.airplane.structs.Long2FloatAgingCache cache = this.temperatureCache.get();
+ gg.airplane.structs.Long2FloatAgingCache cache = temperatureCache.get(); // Plazma - MemoryLeakFix
float f = cache.getValue(l);
if (!Float.isNaN(f)) {
return f;