geforkt von Mirrors/Paper
f37381ea8a
Removes synchronization from sending packets Makes normal packet sends no longer need to be wrapped and queued like it use to work. Adds more packet queue immunities on top of keep alive to let the following scenarios go out without delay: - Keep Alive - Chat - Kick - All of the packets during the Player Joined World event Hoping that latter one helps join timeout issues more too for slow connections. Removes processing packet queue off of main thread - for the few cases where it is allowed, order is not necessary nor should it even be happening concurrently in first place (handshaking/login/status) Ensures packets sent asynchronously are dispatched on main thread This helps ensure safety for ProtocolLib as packet listeners are commonly accessing world state. This will allow you to schedule a packet to be sent async, but itll be dispatched sync for packet listeners to process. This should solve some deadlock risks This may provide a decent performance improvement because thread synchronization incurs a cache reset so by avoiding ever entering a synchronized block, we get to avoid that, and packet sending is a really hot activity.
25 Zeilen
962 B
Diff
25 Zeilen
962 B
Diff
From 35120b7369791696840251d9cf452ccb8a3911b9 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Thu, 2 Apr 2020 19:31:16 -0400
|
|
Subject: [PATCH] Dead Player's shouldn't be able to move
|
|
|
|
This fixes a lot of game state issues where packets were delayed for processing
|
|
due to 1.15's new queue but processed while dead.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
index 61c9e030a10..c4d43343050 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
@@ -978,7 +978,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|
|
|
@Override
|
|
protected boolean isFrozen() {
|
|
- return super.isFrozen() || this.isSleeping();
|
|
+ return super.isFrozen() || this.isSleeping() || dead || !valid; // Paper - player's who are dead or not in a world shouldn't move...
|
|
}
|
|
|
|
@Override
|
|
--
|
|
2.26.2
|
|
|