In general, the client now has an acknowledgment system that will cause block changes made by the client to be reverted correctly.
Essentially:
The client enters a "prediction" stage, where any block changes made will have its old blockstate captured (this is referred to as "server state").
If you update blocks during this stage, the client will update this captured server state as long as they're still currently predicting.
After prediction is done (via an ack packet) all captured blockstates are reverted to their captured server state.
This means that if the server actually updated a block and send a block update packet, it's correctly set, while if a block wasn't updated on the server but WAS updated on the client (server state wasn't updated), that change will be reverted.
It should be noted that this system does not yet support block entities, so those still need to be resynced when needed.
I discovered this when noticing that blocks broken outside of the player's valid interaction distance are still properly reverted, even though the server doesn't send any block updates, only an ack packet.
* Updates documentation in EntityEquopment.java to reflect behavior mentioned in issue #9867
* rebase and squash patches
---------
Co-authored-by: schwaa96 <schwaa96@mi.fu-berlin.de>
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
96340858 PR-938: Various Sound API improvements
cbfe0ff0 PR-937: Minor improvements to World#rayTrace documentation
e979ee95 PR-935: Change Consumer and Predicates to super
27ae46dc SPIGOT-3641, SPIGOT-7479, PR-931: Add missing values to EntityEffect
0616ec8b Add eclipse .factorypath file to .gitignore
CraftBukkit Changes:
8e162d008 PR-1301: Various Sound API improvements
eeb7dfc2d SPIGOT-7520: Attribute LootTableSeed missing for generated containers with attached LootTable
d433f086d PR-1297: Change Consumer and Predicates to super
864f616da SPIGOT-7518: Fix NullPointerException when calling Block#applyBoneMeal()
5a2d905af Add eclipse .factorypath file to .gitignore
7c6bf15d4 Fix SkullMeta configuration serialization / deserialization with note block sound
Spigot Changes:
7de1049b Rebuild patches
For each player on each tick, enter block triggers are invoked, and these create loot contexts that are promptly thrown away since the trigger doesn't pass the predicate
To avoid this, we now lazily create the LootContext if the criterion passes the predicate AND if any of the listener triggers require a loot context instance