SuperMartijn642 / PackedUp

3 stars 6 forks source link

[Bug] Conflict with Flow, menu cannot be closed anymore #68

Closed DZAladan closed 7 months ago

DZAladan commented 7 months ago

Version Info

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.

SuperMartijn642 commented 7 months ago

It seems like Flow is specifically cancelling the closing of screens, so it seems like this is something on their side. Please report the issue to them, not much I can do about it.

IMB11 commented 5 months ago

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.

SuperMartijn642 commented 5 months ago

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

IMB11 commented 5 months ago

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 :)