Correctly return the resource pack status from Player#getResourcePackStatus()
when the resource pack was send and accepted during the configuration stage.
This implements a solution that preemptively exits the tick loop if we have already marked the connection as disconnecting. This avoids changing the result of Connection#isConnected in order to avoid other possibly unintentional changes. Fundamentally it should be investigated if closing the connection async is really still needed.
This also additionally removes the login disconnecting logic for server stopping, as this was also a possible issue in the config stage but also shouldn't be an issue as connections are closed on server stop very early.
Additionally, do not check for isConnecting() on VERIFYING, as that seemed to be an old diff originally trying to resolve this code, however isConnected is not updated at this point so it pretty much was useless.
We are already using the dropped stack to determine the type, we
might as well also use it for the count, given that plugins can already
mutate the type, might as well let them mess with the amount.
Fixes#12745
That cooked is mildly cooked and should be fixed differently, e.g. a custom loot context param, but reverting the recent change in this line works for now
If the player dies, then they are removed from the world and
as a result are not present in the world entity map.
To guarantee that the player entity scheduler is ticked, we can
tick all schedulers for players in the server player list, and
then skip all players we find in the world entity map.
This problem is not present on Folia since Folia must guarantee
that the player remains in the world.
The ServerLevel#getAllEntities function only returns entities which
are accessible. FeatureHooks#getAllEntities will return all
entities, whether or not they are accessible.
Use the new hook in the EntityCommand, which allows server admins
to inspect entities in unloaded chunks.
Use the hook as well for ticking the EntityScheduler. This fixes
an issue whether unloaded entities did not have their scheduler ticked.
Send more keepalives, record all transactions within the last minute.
We send more keepalives so that the latency calculation is more
accurate. Since we send more keepalives, we track all pending
keepalives in case multiple end up in flight.
Additionally, replace the latency calculation with a true
average over the last 5 seconds of keepalive transactions.
We add the change to guarantee that the player position moves
in-sync with the vehicle's. As a result, it should be teleporting
the player using the new position of the vehicle rather than the
old.
Vanilla does not increment ticket timeouts if the chunk is
progressing in generation. They made this change in 1.21.6
so that the ender pearl ticket does not expire if the chunk
fails to generate before the timeout expires. Rather than
blindly adjusting the entire system behavior to fix this
small issue, we instead add non-expirable tickets to keep
ender pearls ticking.
This option should probably be removed as its a descendant of an option that allows "old tnt cannon" behavior before ~1.9 But this improves the fix so properly update the velocity/position rather than the questionable way it was doing it before.
This more properly implement spigot's fix for teleportation area effect clouds, now however supporting many other entity types specified in this bug report.
Currently, this is not an issue for (all) hanging blocks since they have a fix identical to this inside of setPos. Note however the client does not nicely support moving these entities anyways.
Ports the follow commits from spigot to paper.
All credits to go the respective commit authors listed below.
CraftBukkit: 3b4fd5b321f4440a2b3a67f3945739b45e6e687f
By: md_5 <git@md-5.net>