PMMO Overwriting Minecolonies' interface screen.
SomewhatDamaged opened this issue · 7 comments
Describe the bug
Block-picking interfaces in hut interfaces are having an interaction with Project MMO.
Trying to type into the (for example) Minimum Stock text field, and starting the string with a P, opens the Project MMO interface.
I am unsure if this is a Project MMO issue or if it is a Minecolonies issue, so will be cross-posting to both Gits.
Expected behavior
Pressing the interface key for PMMO should not cause it to come up.
To Reproduce
Steps to reproduce the behavior:
- Open builder hut interface
- Select
Minimum Stock
and clickAdd
- In the provided text box, try to type
Pickaxe
- The Project MMO interface will pop up
Versions:
Minecraft: 1.20.1
Forge: 47.1.0
BlockUI: 1.20.1-0.0.84
Domum Ornamentum: 1.20.1-1.0.104
Multipiston: 1.20.1-1.2.31
Minecolonies: 1.20.1-1.1.9
Project MMO: 1.20.1-1.0.2
Additional context
Asked over on MineColonies Discord, one of their helpers had this to say:
it sounds like mostly a bug on their side; they shouldn't be reacting to hotkeys while a gui is open. having said that, our gui does not use the standard text entry control, which they might have been checking for
—Mirality
The Glossary hotkey is watched in two ways.
- Forge's Keypress Event, which it nests under a
screen == null
check - Forge's Tooltip Event, which it uses
InputConstants#isKeyDown
since the keybinds aren't watched in that event like they were in previous MC versions.
I suspect No.2 is where this is happening, but I don't understand enough of minecolonies to know if a tooltip is present at this screen to predicate the logic.
Touching base with the MineColonies discord's bug reporting folk. Hopefully they're setting some kind of flag that can be checked.
That's what's doing it then. I can't check for no screen because then you'd never be able to view items from the glossary and that is necessary for NBT items to show their actual values.
Apparently this is the library they use for making UIs: https://github.com/ldtteam/BlockUI
Perhaps using a whitelist of what mods' windows to allow the intrusion on? Like, the X-enough items mods are certainly the main ones you want to be able to do this, and the player's inventory (which would be open when they are). Maybe only allow the tooltip-intrusion when player inventory is open?