[Suggestion] Handy Bag improvements
jesmores opened this issue · 6 comments
I just discovered the Handy Bag and this might just be my new favorite backpack item in modded minecraft now!
I hope it's ok to post suggestions here, so here goes:
- There's no documentation on the handy bag, so I'm not quite sure what some of the buttons do, e.g. "block quick actions" and "update items"
- I have one memory card for all my tools that I switch between, and then separate memory cards for block drops and mob drops. Given that use case, I was hoping that the "restock" and "pickup" mode buttons could be set on a per-memory card basis instead of for the whole bag, so I could set the mob drop and block drop to auto-pickup, but not the tools card.
- Related to the previous point, if the bag is in pickup (matching) mode, it will only pickup items that match the contents of the currently selected memory card, and not the others. So if I were running around killing mobs, but I had my tools memory card selected, it wasn't picking up the mob drops.
I'm using EnderUtilities-1,12,2-0.7.7
Block Quick Actions means that the card or card section you activate that for, does not get used by the bigger buttons, ie. the "quick actions" to move items to or from the bag. And if I remember right, it also blocks that card section from the auto-pickup and restock features.
"Update items" enables the bag to call the update method every game tick of all the items in the bag/on the card section it is enabled for. This is for items that may do something while on the player's inventory. I believe AA flying(?) rings or whatever they called are an example of such items. Another example is the Ender Utilities modular items/tools recharging from an Energy Bridge. However that feature also has somewhat of a performance penalty for the server, since it has to iterate through all the slots in the bag (on the selected card), switch each item temporarily to the player's inventory, call the update method on the item, and then move the item back to the bag. So unless you absolutely need to use that feature, I'd recommend leaving it disabled.
Hmm, restock and pickup are per-bag are they? I can definitely change that, and some of the other options are per-card or even per-card/bag section already.
And to your last point... Are you asking for the auto-pickup to use all cards in the bag? Unfortunately that's not currently possible with the way the bag works, as it loads and uses one inventory per memory card. And in my opinion that also goes against how the bag is supposed to work - only the currently selected card is used in any way, all the others are "unloaded". Also the more slots the code has to match for each item it handles, the slower the processing of the item becomes. Although now that I said that, there is probably an optimization I could do for this, hmm...
There is also an internal inventory refactor planned for the mod, which would affect especially the things that currently use the item memory cards. Maybe after that I could look into allowing the restock and pickup features to use any of the user-selected cards.
Ah I figured it was perf related since the whole "current card only" behavior was also happening to handy chests and their double click quick action feature. I hope you get a breakthrough as you're doing the inventory refactor :)
Actually, speaking of the Handy Chest, do they not look inside the Handy Bag to pull items when you double click them? I was doing some tests last night and it seems to only work from the player's inventory. I was hoping to quick-dump my mob and block drops cards from the bag, but even with the appropriate cards selected on both the bag and the chest, it wasn't happening.
The Chests do not pull from the Bag no. However the Handy Bag does have auto-dumping and pickup functionality on its side. Basically you have to set the bag into restock mode and sneak + right click with the bag on an inventory to dump stuff from the bag to that inventory, or to suck in stuff from the inventory you have to set it to pickup mode and then sneak + right click the inventory with the bag. This should work with any blocks with inventories (which have the Forge IItemHandler
capability).
I guess I was expecting them to work with each other since they both had "Handy" in their name :) - in any case, thanks for the help!
Well they should work together, but you just need to sneak + right click with the bag instead of the double click... Not sure if I want to add that either, as it might lead to a lot of cases where the player does not want to dump the bag contents but only their own inventory... hmm 🤔