aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0985-Optimize-Network-Manager-and-add-advanced-packet-sup.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0985-Optimize-Network-Manager-and-add-advanced-packet-sup.patch')
-rw-r--r--patches/server/0985-Optimize-Network-Manager-and-add-advanced-packet-sup.patch17
1 files changed, 9 insertions, 8 deletions
diff --git a/patches/server/0985-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/patches/server/0985-Optimize-Network-Manager-and-add-advanced-packet-sup.patch
index 2e8076eb2e..9bfb7e9376 100644
--- a/patches/server/0985-Optimize-Network-Manager-and-add-advanced-packet-sup.patch
+++ b/patches/server/0985-Optimize-Network-Manager-and-add-advanced-packet-sup.patch
@@ -333,13 +333,14 @@ index c399625a342ffd61102bb96a97ac24b0669e8e17..16eb94eb1f40485daef2713f740f6e0b
+ // Paper end - Optimize network
}
diff --git a/src/main/java/net/minecraft/network/protocol/Packet.java b/src/main/java/net/minecraft/network/protocol/Packet.java
-index cc658a61065d5c0021a4b88fa58b40211b94f8ec..da11266a0a23f446196e6facf2c358cfcc18070f 100644
+index c920bf67002f1ca969b5e1559cdfdc2704dead4b..f82702c9b1aefedb3c3ce35d4f93836ec24b488f 100644
--- a/src/main/java/net/minecraft/network/protocol/Packet.java
+++ b/src/main/java/net/minecraft/network/protocol/Packet.java
-@@ -11,6 +11,30 @@ public interface Packet<T extends PacketListener> {
- void handle(T listener);
-
- // Paper start
+@@ -21,6 +21,31 @@ public interface Packet<T extends PacketListener> {
+ default boolean packetTooLarge(net.minecraft.network.Connection manager) {
+ return false;
+ }
++
+ /**
+ * @param player Null if not at PLAY stage yet
+ */
@@ -364,9 +365,9 @@ index cc658a61065d5c0021a4b88fa58b40211b94f8ec..da11266a0a23f446196e6facf2c358cf
+ default java.util.List<Packet<?>> getExtraPackets() {
+ return null;
+ }
- default boolean packetTooLarge(net.minecraft.network.Connection manager) {
- return false;
- }
+ // Paper end
+
+ default boolean isSkippable() {
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
index 4f330a44c77a7ec3237a86fda04921a8c4a1c00f..a4a29a7ea0035ecf4c61ee8547a9eb24acb667d0 100644
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java