Yatopia/patches/server/0033-Send-more-packets-immediately.patch

30 lines
1.7 KiB
Diff
Raw Normal View History

2020-08-17 08:15:09 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrIvanPlays <ivan@mrivanplays.com>
Date: Mon, 17 Aug 2020 08:51:44 +0300
Subject: [PATCH] Send more packets immediately
Paper did some changes around packet sending by introducing a queue and making (most of) the PLAY packets
send synchronously. This is completely fine, however the are some people who want to have better experience
with "cosmetic" stuff such as boss bar's, title's and scoreboard's. We allow those packets to pass instantly,
as the server shouldn't really care about those packets - they're not related with overall gameplay.
Additionally, I'm thinking of making those packets send asynchronously.
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index fe123dc746c96b465393b2af788fae9519e5e55c..5b4901acf7d4661e52839a7ab0ebe24b93bec0d6 100644
2020-08-17 08:15:09 +02:00
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
2020-08-18 07:57:24 +02:00
@@ -229,7 +229,11 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
2020-08-17 08:15:09 +02:00
return networkManager.isPending || networkManager.protocol != EnumProtocol.PLAY ||
packet instanceof PacketPlayOutKeepAlive ||
packet instanceof PacketPlayOutChat ||
- packet instanceof PacketPlayOutTabComplete;
+ packet instanceof PacketPlayOutTabComplete || // Yatopia
+ // Yatopia start
+ packet instanceof PacketPlayOutBoss ||
2020-08-18 07:57:24 +02:00
+ packet instanceof PacketPlayOutTitle;
2020-08-17 08:15:09 +02:00
+ // Yatopia end
}
// Paper end
}