mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-01-23 16:41:48 +01:00
Send more packets immediately
This commit is contained in:
parent
442b82662a
commit
525f7dc261
@ -93,6 +93,7 @@ # Patches
|
||||
| server | Remove a few more streams | Sotr | |
|
||||
| server | Remove stream for ender teleport | Sotr | |
|
||||
| server | Remove vanilla profiler callers | Sotr | |
|
||||
| server | Send more packets immediately | MrIvanPlays | |
|
||||
| server | Skip events if there's no listeners | William Blake Galbreath | |
|
||||
| server | Snowman drop and put back pumpkin | William Blake Galbreath | |
|
||||
| server | Squid EAR immunity | William Blake Galbreath | |
|
||||
|
30
patches/server/0034-Send-more-packets-immediately.patch
Normal file
30
patches/server/0034-Send-more-packets-immediately.patch
Normal file
@ -0,0 +1,30 @@
|
||||
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 72a62b9be5e1767f64991fc0614fc82967daad18..a54e7d8a9e6a60726e4ed986a04199fa80c4ff64 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -229,7 +229,12 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
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 ||
|
||||
+ packet instanceof PacketPlayOutTitle ||
|
||||
+ packet instanceof PacketPlayOutScoreboardDisplayObjective;
|
||||
+ // Yatopia end
|
||||
}
|
||||
// Paper end
|
||||
}
|
Loading…
Reference in New Issue
Block a user