forked from GeyserMC/Geyser
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes: * Implement a transaction based system for resolving inventory changes. A new transaction is created which has all the actions to resolve it, with each action optionally requiring a confirmation step. For example all Click/Drops should only proceed after receiving an associated confirm packet otherwise out of order updates occur. This is also done asynchronously. * Provide better support for overriding functionality in child inventory translator classes by splitting the steps of resolution out separately. * Provide better support of refreshing of inventory by using an invalid click and then rejecting the returned packet after syncing the inventory. * Remove the forced refresh from all translators as they now take care of their updates in an ordered fashion. The only refresh left is now used only when the resolution system knows it may leak items (for example picking up an arbitrary amount from the furnace output is not supported on java). * Support resolving inventory changes that have more than 2 actions. This may resolve crafting recipes on some platforms and handle large inventory changes better * If geysers knowledge of an inventory item does not match that of the server and it is rejected we will resync before the retrying the action. * Added more documentation on whats happening in the inventory resolution. Note that this is a required merge for GeyserMC#536 which will have this merged in already. There are further optimizations that can be done and are in general marked with a @todo once the current resolution system is tested enough.
- Loading branch information
Showing
27 changed files
with
1,183 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.