More patches for 1.14

Chunk related stuff will need to be revisted later
This commit is contained in:
Zach Brown
2019-04-27 19:23:53 -04:00
parent 9c7e369607
commit 10c24a8e61
41 changed files with 173 additions and 433 deletions

View File

@@ -15,12 +15,12 @@ also adding some additional logging in order to help work out what is causing
random disconnections for clients.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 5fa3268b59..0d87ddc0f5 100644
index 82dad99ef..62c0137a7 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
- PlayerConnectionUtils.ensureMainThread(packetplayinkeepalive, this, this.player.getWorldServer()); // CraftBukkit
+ //PlayerConnectionUtils.ensureMainThread(packetplayinkeepalive, this, this.player.getWorldServer()); // CraftBukkit // Paper - This shouldn't be on the main thread
@@ -29,11 +29,11 @@ index 5fa3268b59..0d87ddc0f5 100644
this.player.ping = (this.player.ping * 3 + i) / 4;
this.awaitingKeepAlive = false;
} else if (!this.player.getDisplayName().getString().equals(this.minecraftServer.G())) {
} else if (!this.isExemptPlayer()) {
- this.disconnect(new ChatMessage("disconnect.timeout", new Object[0]));
+ // Paper start - This needs to be handled on the main thread for plugins
+ minecraftServer.postToMainThread(() -> {
+ this.disconnect(new ChatMessage("disconnect.timeout", new Object[0]));
+ this.disconnect(new ChatMessage("disconnect.timeout"));
+ });
+ // Paper end
}