mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 10:27:44 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: df0d7b0d Update upstream CB 6ea3c2cf [CI-SKIP] Rebuild patches d7bed4cb Heavily optimise random block ticking (#2914) b66d9ff8 Update upstream CB ba71c5d6 Stop stripping private use block Unicode from signs 28d9dcfc Entity Jump API (#1587) 9976a768 Fix PlayerNaturallySpawnCreaturesEvent boolean inversion 054e20da Clean up imports on ThrownEggHatchEvent a8984ccb Add ThrownEggHatchEvent (#1982) 9f24d495 Allow nerfed blazes, endermen to take water damage (#2847)
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
From 9d111c00f2bbadee62ebce15c894ce547fffe2a8 Mon Sep 17 00:00:00 2001
|
||||
From 2525246c4031a373ab3af59725a2586a66d40044 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 11 Oct 2019 00:17:39 -0500
|
||||
Subject: [PATCH] Alternative Keepalive Handling
|
||||
|
||||
---
|
||||
.../server/PacketPlayInKeepAlive.java | 1 +
|
||||
.../minecraft/server/PlayerConnection.java | 28 +++++++++++++++++++
|
||||
.../minecraft/server/PlayerConnection.java | 27 +++++++++++++++++++
|
||||
.../java/net/pl3x/purpur/PurpurConfig.java | 5 ++++
|
||||
3 files changed, 34 insertions(+)
|
||||
3 files changed, 33 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayInKeepAlive.java b/src/main/java/net/minecraft/server/PacketPlayInKeepAlive.java
|
||||
index 8e93f1540..470f92c4f 100644
|
||||
@@ -22,7 +22,7 @@ index 8e93f1540..470f92c4f 100644
|
||||
return this.a;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index d99a2837c..36b4fb28c 100644
|
||||
index d897c7fd4..1f8826206 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -74,6 +74,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -33,7 +33,7 @@ index d99a2837c..36b4fb28c 100644
|
||||
// CraftBukkit start - multithreaded fields
|
||||
private volatile int chatThrottle;
|
||||
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
||||
@@ -245,6 +246,21 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -247,6 +248,21 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
long currentTime = SystemUtils.getMonotonicMillis();
|
||||
long elapsedTime = currentTime - this.getLastPing();
|
||||
|
||||
@@ -55,7 +55,7 @@ index d99a2837c..36b4fb28c 100644
|
||||
if (this.isPendingPing()) {
|
||||
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
|
||||
PlayerConnection.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getName()); // more info
|
||||
@@ -2667,6 +2683,18 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -2669,6 +2685,17 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
@Override
|
||||
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
|
||||
@@ -70,16 +70,15 @@ index d99a2837c..36b4fb28c 100644
|
||||
+ }
|
||||
+ } else
|
||||
+ // Purpur end
|
||||
+
|
||||
//PlayerConnectionUtils.ensureMainThread(packetplayinkeepalive, this, this.player.getWorldServer()); // CraftBukkit // Paper - This shouldn't be on the main thread
|
||||
if (this.awaitingKeepAlive && packetplayinkeepalive.b() == this.h) {
|
||||
int i = (int) (SystemUtils.getMonotonicMillis() - this.lastKeepAlive);
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 40b5db9e0..e7805ad1c 100644
|
||||
index b4cd05d18..7b2564d4f 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -167,6 +167,11 @@ public class PurpurConfig {
|
||||
useBetterMending = getBoolean("settings.use-better-mending", useBetterMending);
|
||||
@@ -157,6 +157,11 @@ public class PurpurConfig {
|
||||
packetRateLimitKickMessage = getString("settings.packet-limiter.kick-message", packetRateLimitKickMessage);
|
||||
}
|
||||
|
||||
+ public static boolean useAlternateKeepAlive = false;
|
||||
@@ -87,9 +86,9 @@ index 40b5db9e0..e7805ad1c 100644
|
||||
+ useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
|
||||
+ }
|
||||
+
|
||||
public static boolean updatePermissionsOnWorldChange = false;
|
||||
private static void updatePermissionsOnWorldChange() {
|
||||
updatePermissionsOnWorldChange = getBoolean("settings.update-perms-on-world-change", updatePermissionsOnWorldChange);
|
||||
public static boolean dontSendUselessEntityPackets = false;
|
||||
public static boolean fixItemPositionDesync = false;
|
||||
private static void dontSendUselessEntityPackets() {
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user