Add FastNetworkManager & cleanup - #174
kalibrieren wants to merge 31 commits into
Conversation
|
Can you elaborate on this PR? I'm guessing this makes packet ordering a lot more consistent |
This is a way more robust packet queue system. We also have writePacketLazily for when we need it like for the EntityPlayer destroy packet to keep the order. |
|
Nice! That's a good idea This replaces Tuinity's controlled flush patch, correct? |
…hread/AsyncPacketThread.java
…hread/CombatThread.java
| } | ||
| } | ||
|
|
||
| public void writePacketLazily(Packet<?> packet, boolean flush) { |
There was a problem hiding this comment.
What is the point of this method with flush enabled?
If flushing, why not just use dispatchPacket in NetworkManager?
|
|
||
| // FalchusSpigot start | ||
| public static int threadSize; | ||
| private static void threadSize() { |
There was a problem hiding this comment.
Seems like there's a queue for each entity tracking thread, so wouldn't the thread size just be the tracking threads?
| for (EntityPlayer player : MinecraftServer.getServer().getPlayerList().players) { | ||
| PlayerConnection connection = player.playerConnection; | ||
| if (connection != null) { | ||
| connection.networkManager.disableAutomaticFlush(); |
There was a problem hiding this comment.
Good that this is replaced, I took a look and the tuinity patch implementation seemed very broken.
| Packet<?> packet = this.c(); | ||
| if (packet == null) return; // FalchusSpigot | ||
|
|
||
| this.trackedPlayerMap.put(entityplayer, true); // PaperBukkit // FalchusSpigot - after null check |
There was a problem hiding this comment.
| this.trackedPlayerMap.put(entityplayer, true); // PaperBukkit // FalchusSpigot - after null check | |
| this.trackedPlayerMap.put(entityplayer, true); // Paper // FalchusSpigot - after null check |
Good catch moving this after
| // FalchusSpigot start - async kb | ||
| // based on https://github.com/Argarian-Network/NachoSpigot/tree/async-kb-hit | ||
| if (WindSpigotConfig.asyncKnockback && (packet instanceof PacketPlayOutEntityVelocity || packet instanceof PacketPlayOutPosition)) { | ||
| fastNetworkManager.writePacketLazily(packet, true); |
There was a problem hiding this comment.
I agree the "async kb" needed to be removed
What is the benefit of this method over dispatchPacket?
Uh oh!
There was an error while loading. Please reload this page.