3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 13:30:05 +01:00

apply a couple network patches

Dieser Commit ist enthalten in:
Jake Potrebic 2023-06-08 09:09:43 -07:00
Ursprung f80338725e
Commit 1a0280ccc0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 27CC63F7CBC866C7
666 geänderte Dateien mit 41 neuen und 60 gelöschten Zeilen

Datei anzeigen

@ -28,7 +28,7 @@ and then catch exceptions and close if they fire.
Part of this commit was authored by: Spottedleaf, sandtechnology
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index e1eea381a2ebcc32424d31c42a45287d2a1cb16a..ca9a36e357e73b1b518ebb5c937314269655de32 100644
index 38b3934b4a81972285c1c2bd0297c4458aa08e41..5308f016baf3001ffd1468633cde446493ca581e 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -118,6 +118,10 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@ -271,7 +271,7 @@ index e1eea381a2ebcc32424d31c42a45287d2a1cb16a..ca9a36e357e73b1b518ebb5c93731426
// Spigot End
if (this.channel.isOpen()) {
this.channel.close(); // We can't wait as this may be called from an event loop.
@@ -481,7 +622,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@@ -484,7 +625,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
public void handleDisconnection() {
if (this.channel != null && !this.channel.isOpen()) {
if (this.disconnectionHandled) {
@ -280,7 +280,7 @@ index e1eea381a2ebcc32424d31c42a45287d2a1cb16a..ca9a36e357e73b1b518ebb5c93731426
} else {
this.disconnectionHandled = true;
if (this.getDisconnectedReason() != null) {
@@ -489,7 +630,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@@ -492,7 +633,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
} else if (this.getPacketListener() != null) {
this.getPacketListener().onDisconnect(Component.translatable("multiplayer.disconnect.generic"));
}
@ -289,7 +289,7 @@ index e1eea381a2ebcc32424d31c42a45287d2a1cb16a..ca9a36e357e73b1b518ebb5c93731426
// Paper start - Add PlayerConnectionCloseEvent
final PacketListener packetListener = this.getPacketListener();
if (packetListener instanceof net.minecraft.server.network.ServerGamePacketListenerImpl) {
@@ -529,6 +670,18 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@@ -532,6 +673,18 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@Nullable
final PacketSendListener listener;

Datei anzeigen

@ -474,7 +474,7 @@ index 52eb3176437113f9a0ff85d10ce5c2415e1b5570..b54ddd0ba0b001fbcb1838a838ca4890
}
}
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index 38b3934b4a81972285c1c2bd0297c4458aa08e41..077950ba6da2af1afc6edbf4449b37fb0893088a 100644
index 5308f016baf3001ffd1468633cde446493ca581e..1b6d090afea5b0a49b601b73cefeedc0b832ba9d 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -64,13 +64,13 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@ -494,7 +494,7 @@ index 38b3934b4a81972285c1c2bd0297c4458aa08e41..077950ba6da2af1afc6edbf4449b37fb
});
private final PacketFlow receiving;
private final Queue<Connection.PacketHolder> queue = Queues.newConcurrentLinkedQueue();
@@ -194,7 +194,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@@ -199,7 +199,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
}
}
@ -540,7 +540,7 @@ index 4a8d4c92ba97d224d8ccd6a9232623ec66ef40a9..e065a559a0ccccf76c27bc4651370164
}
// Paper end
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
index 776528e50a5abc0e02d9de99231fb47352aa4f43..4017c15a62ce1048a61f55f46f915fd516496181 100644
index fbf375534e2b8bd6ef052c4625764f4f8feb2ed6..bb9e65eee7e0ca0f715cd5791c47579a57b1b577 100644
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
@@ -51,10 +51,10 @@ public class ServerConnectionListener {

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen