Well, the gui Open find via Keybind, but only when it is the currently selected item in hotbar. I need to to be opened whenever the player presses corresponding keybind.
Project @ GitHub: https://github.com/p455w0rd/WirelessCraftingTerminal
I did try replacing KeyInputEvent with ClientTickEvent and responding only on Phase.END, and it does open the Gui, but it seems only for a single tick before closing. If you want more of the code I can provide it, but there is a lot and I figured this would be enough to figure out where I'm going wrong. The container/gui are fine since they open fine via right-click and via keybind when the item is the current player#getHeldItem. I have tested this using deobf server/client as well as single player with same result.