BlazingTwist / ItemCounts

Adds the total amount of items in your inventory to the hotbar.
Apache License 2.0
2 stars 1 forks source link

[Request] Options to only show hotbar counts if needed #1

Closed supersaiyansubtlety closed 2 years ago

supersaiyansubtlety commented 2 years ago

It'd be useful to have some options to only show item counts on the hotbar if certain conditions where met. showOnHotbar could be changed from a boolean to an enum of NEVER, ALWAYS, WHEN_MORE_THAN_ONE, or WHEN_MORE_THAN_HOTBAR_STACK.

A new showOnSelectedSlot option would also be nice, taking the same enum as showOnHotbar. It would be like showOnHotbar except override showOnHotbar's behavior for the currently selected hotbar slot.

BlazingTwist commented 2 years ago

I really don't like the way Autoconfig displays enums, which is why I stuck with booleans originally. You're right though, enums would be much better suited for the kind of configuration I want to provide.

Unfortunately, I don't hate autoconfig enough to build my own system. (been there, done that, won't do it again... yet) So here's a pre-release https://github.com/BlazingTwist/ItemCounts/releases/tag/1.0.1 (1.18.1) Added the option to show durability while I was at it.

edit: just noticed that showOnSelectedSlot is supposed to be different from the 3 existing options. It technically is the same as showActiveItemCount, except that displays the text relative to the crosshair... hmm

supersaiyansubtlety commented 2 years ago

Thanks, the pre-release looks great!

Not sure what you mean in your edit about showOnSelectedSlot. What I was envisioning for showOnSelectedSlot was just like showOnHotBar, why would it have different options?

BlazingTwist commented 2 years ago

With "the 3 existing options" I meant showActiveItemCount, showOffhandItemCount, showOnHotbar I initially read the issue as "replace the boolean with an enum for showOnHotbar and showActiveItemCount", but then noticed that showOnSelectedSlot would be a 4th option instead.

I'm assuming that showOnSelectedSlot should include the off-hand slot as well?

supersaiyansubtlety commented 2 years ago

You can't select the offhand slot so I wouldn't think so?

*edit: maybe the offhand should have another config (same enum)?

I've also noticed that there are two "Show durability for offhand tool" options in 1.0.1, is that intentional?

BlazingTwist commented 2 years ago

I've also noticed that there are two "Show durability for offhand tool" options in 1.0.1, is that intentional?

Hmm, I'm not seeing that on my end. There should be 5 options and a dropdown for each type.

supersaiyansubtlety commented 2 years ago

offhand-durability-1 offhand-durability-2

supersaiyansubtlety commented 2 years ago

Is it supposed to be "Show durability of hotbar tools"?

BlazingTwist commented 2 years ago

oh, lol. copy paste.

BlazingTwist commented 2 years ago

Alright, one effectively complete re-write later. The code got a bit nicer and everything should be supported now. https://github.com/BlazingTwist/ItemCounts/releases/tag/1.0.2

supersaiyansubtlety commented 2 years ago

Nice!

The categories and toggles are definitely a nice touch.

supersaiyansubtlety commented 2 years ago

(guess this can be closed now)