Project MMO

Project MMO

10M Downloads

PMMO Overwriting Minecolonies' interface screen.

SomewhatDamaged opened this issue · 7 comments

commented

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:

  1. Open builder hut interface
  2. Select Minimum Stock and click Add
  3. In the provided text box, try to type Pickaxe
  4. 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

commented

The Glossary hotkey is watched in two ways.

  1. Forge's Keypress Event, which it nests under a screen == null check
  2. 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.

commented

Touching base with the MineColonies discord's bug reporting folk. Hopefully they're setting some kind of flag that can be checked.

commented

The interface looks like this, and it does indeed have item tooltips in it:

image

commented

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.

commented

Apparently this is the library they use for making UIs: https://github.com/ldtteam/BlockUI

commented

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?

commented

Guis don't have a modid attached to them. So there's no way to whitelist a gui. My recommendation for people using minecolonies is to rebind the glossary to a character or number that you won't use in the search.