[Bug] Conflict with Flow, menu cannot be closed anymore
DZAladan opened this issue ยท 4 comments
Version Info
- Minecraft, 1.20.4
- Packed Up, 1.0.30c
- Core lib, Fabric
Description of the Bug
There's a conflict with the mod Flow (adds an upwards sliding animation to menus). Due to this, if the backpack menu is opened, it won't close anymore no matter what key is pressed, forcing the player to close the game entirely.
I actually do not expect this to be fixed, but I thought it was necessary warning people in case they were to encounter the same issue like me and don't know how to solve it.
Steps to Reproduce
Install Flow 1.4.0, and open the backpack in any way (keybind or right-click).
Screenshots
Not available.
What needs to be done to add compatability? I only cancel the close
method to prevent this.client.setScreen(null) and some other rendering things to be canceled.
Not sure really, all I do is call #onClose
whenever the inventory key or esc is pressed. With Flow installed that seems to have no effect.
https://github.com/SuperMartijn642/SuperMartijn642sCoreLib/blob/fb3ddd7b7411d2f8ed3ab68175a4c78864c9ef92/src/main/java/com/supermartijn642/core/gui/WidgetContainerScreen.java#L204
It seems I need to call this.widget.discard(), however I'm going to be rewriting the way flow plays animations for vanilla-like screens soon so I'll just hold off for now.
The new animation system will be capturing the final state of the UI in a new buffer and just re-rendering it after the screen has closed logically, allowing players to move and look around :)