-
-
Notifications
You must be signed in to change notification settings - Fork 623
feat: InventoryPreset for InventoryManager #5938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: nextgen
Are you sure you want to change the base?
feat: InventoryPreset for InventoryManager #5938
Conversation
|
i need help to implement [InventoryPresetsValue] to [ModuleInventoryCleaner] |
|
I think I've implemented it, but I'm sure the old inv manager & chest stealer code needs to be cleaned up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. This will be a great and long awaited addition to the client!
Frontend
The UI looks promising. I think there are still some problems with the current iteration of the design. In order to reduce configuration breaking changes we should also add other planned configuration features in this update.
Note that the following ideas are not specific instructions! As long as you address the problems you can use your own designs and ideas.
What behavior should the user expect from this configuration?

Why would the user add multiple presets at once? If you want the user to be able to between presets, then there should be an option to select an active preset.
The "throws" menu does not represent the real world complexity yet. The users often want to select how many items of a specific type they want to have or want to configure to throw out everything above a certain threshold.

This is my suggested UI. It is a list of rules. The higher the rule, the higher the priority (could be indicated by numbers). The 'I's are items. The slider on the left could be used to move rules around and change their priority. There can be multiple items in a single group. Since that might be ambiguous one could consider adding an option like group (all counts of all items in that group are compared against the limit) vs. each (the given constraints are applied per item). The slider on the right selects what number items should be kept at minimum and when it should start throwing items out, regardless of other rules. This may also just be a slider with a single value since both settings are pretty similar.
The item selection could also profit from some more customizability. Currently only one item or item type can be assigned to a specific item slot. There are common situations where you need more though. For example if you want to ignite another player you would probably have preferences like lava bucket > flint and steel > firecharge. Or sometimes some items have similar functions (like eggs or snowballs).

Therefore I propose this design. Again, there are prioritized rules (from top to bottom). If a higher rule cannot be satisfied, the lower will apply (for example this will try to fill the slot with an ender pearl, if that is not possible, it will try to fill it with a rod, eggs or snowballs. If that is again not possible, it will fill the slot with blocks). Additionally the user can select multiple specific items per group. If the user selects an item group, they cannot add additional items to that group though (for example you cannot have a rule that states "blocks or enderpearls"). Pressing "+" would bring the user to the next dialog.
The dialog to edit such a rule could look like this:

I removed the "common items" category because I think it is distracting while offering not much benefit. I added radio boxes to show the user that they have to decide between selecting specific items and item categories.
As I said, those proposals are just suggestions.
Backend
I think that some major changes to the current Inventory Cleaner backend will be necessary. And I also see that your implementation tries to address this and I know that you probably invested some time and effort into making this. Nevertheless, there are some severe issues:
- The Inventory Cleaner now doesn't manage armor waste management anymore
- The inventory cleaner is much less flexible now
- The current item rating system is used in many modules. There is no point in having two seperate rating systems with the same code.
- The current inv cleaner system has planning and execution separated. This is a feature which should be preserved.
- The InventoryCleaner module had that name for quite some time now. Renaming it will confuse users even though there is an alias.
- Never change a running system. The current backend is designed with something like this in mind. Only a few changes would be required to change this to support your and all of my proposed configuration changes.
I could do the necessary changes in the current implementation to make the configuration work if you want.
Summary
The backend code will not make it into the final patch. The frontend code is good work. You proofed that you know how to create UIs, so I know that you will be able to bring this configuration to perfection ;D
src-theme/src/routes/clickgui/setting/inventoryPresets/ItemImage.svelte
Outdated
Show resolved
Hide resolved
src-theme/src/routes/clickgui/setting/inventoryPresets/config/PresetDeleteButton.svelte
Outdated
Show resolved
Hide resolved
src-theme/src/routes/clickgui/setting/inventoryPresets/ItemImage.svelte
Outdated
Show resolved
Hide resolved
src-theme/src/routes/clickgui/setting/inventoryPresets/ItemImage.svelte
Outdated
Show resolved
Hide resolved
src/main/kotlin/net/ccbluex/liquidbounce/features/inventoryPresets/items/ToolsPresetItem.kt
Outdated
Show resolved
Hide resolved
src-theme/src/routes/clickgui/setting/inventoryPresets/config/PresetModal.svelte
Show resolved
Hide resolved
|
I don't like radio buttons, the names better reflect the essence and say choose one of two. |
@superblaubeere27 I will try to take into account your wishes in the very setup and implementation of the frontend in particular, but yes, I need help in implementing the backend, I will be very grateful if you help me |
|
upd: The @superblaubeere27 i think i implemented what you wanted
but this requires implementation directly in the inventory manager & chest stealer itself |
ok, so that is the same idea of allowing multiple choices for a single hotbar slot. I find this behavior quite unintuitive though. When I saw it for the first time and you asked me what multiple presets do then this behavior wouldn't have been in my first guesses. Is that functionality equivalent with giving the user multiple choices per item?
“A user interface is like a joke. If you have to explain it, it’s not that good”. — Martin Leblanc “If you find an element of your interface requires instructions, then you need to redesign it.” — Dan Rubin
That's ok as long as the user understands that they can only select either specific items or item categories.
I will implement every feature this PR needs from the
Looks great 👍🏻 |
I'm looking forward to it. Please take this into account:Hotbar:
Limits:if |
maybe.. yes, but I have absolutely no idea how... it can be designed
I am not a designer and will never position myself as a web developer. It literally gives me nothing. |
also i'm from Russia, i don't even know them indirectly. |
I thought up your idea and how to implement it, yes, it is still worth abandoning the system with multiple presets (which are dynamically combined at the sorting stage). simply adding the ability to select several candidates for a particular slot. |
|
upd: my implementation in InventoryCleaner was also removed (but I didn't change the name back) Candidates priority:
the number in slot 4 (in the candidate preview) is limited to 9, i.e. |
|
I think the frontend part is completely ready, waiting for news from @superblaubeere27. |
|
I have implemented it on a local branch. I will merge it soon. |
good 👍 |
|
@superblaubeere27 well how are things there? |
|
I pushed my changes. I don't know why it does not work yet. Can you try to debug the frontend? |
src/main/kotlin/net/ccbluex/liquidbounce/features/inventoryPreset/FrontendSlotPreference.kt
Fixed
Show fixed
Hide fixed
src/main/kotlin/net/ccbluex/liquidbounce/features/inventoryPreset/FrontendSlotPreference.kt
Fixed
Show fixed
Hide fixed
src/main/kotlin/net/ccbluex/liquidbounce/features/inventoryPreset/FrontendSlotPreference.kt
Fixed
Show fixed
Hide fixed
...n/net/ccbluex/liquidbounce/features/module/modules/player/invcleaner/CleanupPlanGenerator.kt
Fixed
Show fixed
Hide fixed
...in/net/ccbluex/liquidbounce/features/module/modules/player/invcleaner/CleanupPlanTemplate.kt
Fixed
Show fixed
Hide fixed
maybe okay. but. please, revert yr changes & create pull request on my repo |
|
Why? |
|
well then if it already works then I think it's not necessary anymore. sorry, but I don't have time for this at all, next weekend I'll do it again. |
|
i dont like these icons on commit 2adae94 |
For context, these icons: |
|
@SenkJu, whats up? |
|
Sorry, I have not forgotten about this pull request. I am unfortunately still very busy and reviewing and possibly refactoring 3000 lines of code will take a while. I will try to get to it as soon as possible. |
|
@SenkJu sorry for the ping, but r u still very busy? |
|
I have started working on it. Please refrain from pushing any further adjustments until I am done refactoring. |
|
whats new? |
|
@SenkJu left us 😔 |
|
😞✊🏻 |
|
is @SenkJu died? |
He does that a lot |
|
No, this is still planned to be worked on by @SenkJu. While the Kotlin side looks fine to me, the Svelte side does not seem to be up to standard, and @SenkJu has stated that the Svelte code needs to be rewritten. He is working on it, but he is taking his time to do it properly - he just doesn't communicate much on GitHub, preferring to do so on our private Discord server. |
|
LiquidBounce/src/main/kotlin/net/ccbluex/liquidbounce/utils/item/ItemCategorizations.kt Lines 60 to 98 in 9471bf6
|
|
Who wanna continue this? |
|
no 😭
|
there is no only theme changes |
Start a new branch after #7402 Move the changed files to the new branch. And split them into multiple PRs if possible. |
src/main/kotlin/net/ccbluex/liquidbounce/utils/sorting/ComparatorChain.kt
Show resolved
Hide resolved
|
I decide to continue this (probably) |
655b164 to
2cd0235
Compare
2cd0235 to
f599161
Compare
|
thank you cuz i wanna to close it |
|
Maybe I need to cherrypick or redesign, too many conflicts |






all new icons was taken from svgrepo.com
closes #5937
closes #3764
Images