Update to 1.16.4 ^_^

This commit is contained in:
William Blake Galbreath
2020-11-03 01:27:33 -06:00
parent 0fa478d031
commit 03654a6880
58 changed files with 472 additions and 477 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Alternative Keepalive Handling
diff --git a/src/main/java/net/minecraft/server/PacketPlayInKeepAlive.java b/src/main/java/net/minecraft/server/PacketPlayInKeepAlive.java
index 8e93f1540..470f92c4f 100644
index 8e93f1540b..470f92c4fb 100644
--- a/src/main/java/net/minecraft/server/PacketPlayInKeepAlive.java
+++ b/src/main/java/net/minecraft/server/PacketPlayInKeepAlive.java
@@ -22,6 +22,7 @@ public class PacketPlayInKeepAlive implements Packet<PacketListenerPlayIn> {
@@ -17,10 +17,10 @@ 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 8b2f7d1f8..307ffb21d 100644
index c783d583f0..22e17944ae 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -77,6 +77,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -83,6 +83,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
private long lastKeepAlive = SystemUtils.getMonotonicMillis(); private void setLastPing(long lastPing) { this.lastKeepAlive = lastPing;}; private long getLastPing() { return this.lastKeepAlive;}; // Paper - OBFHELPER
private boolean awaitingKeepAlive; private void setPendingPing(boolean isPending) { this.awaitingKeepAlive = isPending;}; private boolean isPendingPing() { return this.awaitingKeepAlive;}; // Paper - OBFHELPER
private long h; private void setKeepAliveID(long keepAliveID) { this.h = keepAliveID;}; private long getKeepAliveID() {return this.h; }; // Paper - OBFHELPER
@@ -28,7 +28,7 @@ index 8b2f7d1f8..307ffb21d 100644
// CraftBukkit start - multithreaded fields
private volatile int chatThrottle;
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
@@ -205,6 +206,21 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -216,6 +217,21 @@ public class PlayerConnection implements PacketListenerPlayIn {
long currentTime = SystemUtils.getMonotonicMillis();
long elapsedTime = currentTime - this.getLastPing();
@@ -50,7 +50,7 @@ index 8b2f7d1f8..307ffb21d 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
@@ -2723,6 +2739,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2817,6 +2833,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
@@ -68,7 +68,7 @@ index 8b2f7d1f8..307ffb21d 100644
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 6ff5e0783..f1d6c32fd 100644
index 6ff5e07834..f1d6c32fde 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -154,6 +154,11 @@ public class PurpurConfig {