BlazingTwist / ItemCounts

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

feature request: add an option to replace/hide the existing stack count of items in the hotbar #15

Closed K-91 closed 1 year ago

K-91 commented 1 year ago

one of the mods i have is to replenish a stack before it empties in your hand if you have extra blocks. combining this with the item counts has made it so my hotbar effectively has one very large stack, and i would like to hide the default stack counter and replace it with the item counts one. 2023-07-20_17 21 59 2023-07-20_17 22 27 edit: pictures to show what it is currently and what i mean

BlazingTwist commented 1 year ago

Yeah, I can do that. I think the easiest solution would be to add an option "hide vanilla toolbar counts" = ["NEVER", "IF_ITEMCOUNT_VISIBLE", "ALWAYS"]

Then you can disable the vanilla count and adjust the itemCounts anchor accordingly. Sound good?

K-91 commented 1 year ago

yeah, that sounds brilliant. i assume this will mimic the behavour of single items not having a number? glad to see it. edit: found out about MORE_THAN_ONE

BlazingTwist commented 1 year ago

edit: found out about MORE_THAN_ONE

Yeah, exactly that. Basically you could turn off the vanilla count and configure item counts to behave just like the vanilla count.

Anyways, upon closer inspection, I'm not actually sure that's possible with Fabric Mixins (at least not without giving me a lot of 'points of failure', which I am not willing to maintain, to be honest) So this might take a while to get done.

K-91 commented 1 year ago

not a problem at all, it's not like this is your job. keep up the good work and thanks a bunch. i'll leave this open so it can be closed if/when you sort it

BlazingTwist commented 1 year ago

I decided to ditch the enum for simplicities sake. wiki update: https://github.com/BlazingTwist/ItemCounts/wiki/Configuring-an-Overlay#disabling-the-vanilla-counts

I still need to update the remaining versions (1.18 to 1.19.4), CurseForge will get these releases eventually. Until then, you can check out the pre-release https://github.com/BlazingTwist/ItemCounts/releases/tag/1.4.0

K-91 commented 1 year ago

it seems to cause mixin errors and crashes on my side. would you like crash logs or to contact me? thanks again for this.

BlazingTwist commented 1 year ago

Currently looking into it - starts fine with gradle, but absolutely refuses to start through the launcher. AAAAAH~

BlazingTwist commented 1 year ago

Okay, found the issue - it was my fault, hooray. My mixin had remap = false which is used when targeting methods that are not obfuscated - but the method I was targeting was obfuscated so that's obviously wrong. Presumably, it was working when starting with gradle because the obfuscated classes were remapped (thusly not obfuscated at runtime) to make debugging easier.

Uploaded fixed mod to curseforge with version 1.4.1.