Ancient Warfare 2

Ancient Warfare 2

6M Downloads

Possibly a bug Re: NEI search lookup from within AW GUIs

Closed this issue ยท 3 comments

commented

When I open up any AW GUI and try to enter text in the NEI search box (at the bottom of my screen, just above the hotbar), entering the letter "E" exits me out of the inventory. The "E" key should exit me out of the NEI/Vanilla inventory at all times except when I'm entering text in the search bar.

I've tested this with vanilla inventories and many different AW inventories and so far it only applies to searching within AW GUIs (including NPC inventories). My NEI/vanilla inventory keybind is set to "E".

This means if I wish to look up the recipe for "research book" from with the Engineering Table, for example, I cannot. As soon as I type "e" into the search box, the GUI closes.

EDIT- Can you check the server log around 01:40 my time, please. (UTC+10). I was setting a filter in the warehouse interface and was unable to exit the GUI. Needed to force close Minecraft.

commented

The root cause comes down to NEI being a terrible hack, at best. He hacks a bunch of fields/elements into the base container/gui -- however I have no access to them/cannot tell if they are present/highlighted.
Thus, when I call closeGUI() when the 'e' (or whatever is bound to inventory), there is no way for me to test if NEI is active/selected (or even present/installed!) (this would be where I would pass the input to NEI rather than exit the GUI or process it manually).

Most of the time, this wouldn't matter -- you would just pass the input to NEI regardless. However -many- of my GUIs have 'sub guis' that pressing 'e' will return you to the parent/previous GUI. If I take the vanilla route and just pass all input to NEI, these GUIs will no longer return you to their parent -- they will exit the GUI chain completely.

So...your choices are:
1.) Correct functioning of AW GUIs.
2.) Correct functioning of a hacky as shit program (NEI).

-- I personally choose option 1. I -do- care if my GUIs function. I -don't- care if NEIs hacky bullshit falls apart. (he REALLY needs to make his mod not one giant hack).

However -- there -might- be one thing I can do -- it will be a terrible pain in the ass, a horrible workaround, and require constant maintenance to keep working -- but I might be able to proxy out some NEI accessors and 'hack' into his gui hacks to find out if his input box is selected. NOT an optimal option...but NEI is sub-optimal by design =\

commented

Ah. When you put it like that... I vote for whatever will get vehicles back faster :)
I'm not a good test subject to base design decisions off when it comes to GUIs, really. I'm terrible at using or even finding hot keys and short cuts. If there's a back button, I'll just keep using that, either out of habit or ignorance. And I can always swap around my keybinds so that "Q" is my inventory key.

commented

I - think - I have a solution in place. Will be present in the next release. Hopefully should allow for NEi to intercept keys though his hacky crap, and still allow me full control over closing the GUI / gui heirarchy. I suppose we'll see :). It works so far on the GUIs I've tested, but that is far from all of them.