-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't reopen GUIs on update when not necessary to prevent flickering #220
Conversation
Bumps paper-nms-maven-plugin from 1.2 to 1.2.1. --- updated-dependencies: - dependency-name: ca.bkaw:paper-nms-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…some logic from NamedGui to Gui to support Beacon GUIs, fixed double opening for Workbench GUIs
Thank you for your PR. I've changed the base to version 0.10.7, since I need more time to look at this and want to get an update out to add support for Minecraft 1.19. |
I see. If you want me to change anything let me know |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay in getting to this. There are some guis that don't behave properly with these changes. In particular:
- The AnvilGui doesn't place items back in the player inventory after updating the gui. An item on the cursor is also only visible after the gui has been updated.
- In the BeaconGui, when you pick up an item from the player inventory, it becomes invisible/disappears.
- For the CartographyTableGui, when you take an item from the top inventory the item is duplicated, but when you take an item form the bottom inventory it disappears.
- In the CraftingTableGui, items in the player inventory aren't visible.
- In the EnchantingTableGui taking an item causes it to become invisible/disappear.
- In the GrindstoneGui when you take an item it is duplicated.
- And for the StonecutterGui you cannot take any items, even if the event for this item is not cancelled.
The other guis seem to be working correctly.
This was closed automatically along the deletion of the |
A current problem with IF is that with each GUI update, even when only items are changed, it reopens the inventory which causes some kinds of flickering.
For a static GUI or one that updates rarely this is not a big concern. However, as stated in the issue #205, it becomes a bigger problem in GUIs that need to be updated more frequently.
This PR is intended to correct the problem without changing the external use of the API, now Gui#update will judge itself if it is necessary to reopen the GUI depending on whether it is considered dirty or not.