[Suggestion] Pinning total stats
Hexgineer opened this issue ยท 4 comments
What is this suggestion for?
Mod Itself
Suggestion
I think it would be nice if you could pin the stat totals you can see in the items tab. I'm working on digging out a large area and I like seeing the stats for blocks broken but it would be nice if I could pin the total times mined stat at the bottom of the items tab instead of pinning times used for my pick and shovel for example.
Thank you for the time and effort you put into making this mod!
Code of Conduct
- I agree that I will be available later for any follow-up questions to help with implementing the suggested thing.
Hello, and thanks a lot for the suggestion! That sounds like an interesting idea.
I also just realized that vanilla Minecraft does not have a "General stat" for "Total blocks mined" or something like that. Come to think of it, quite strange how a game about mining blocks doesn't have a stat for "Total blocks mined" ngl. If they did, it'd've been as simple as just pinning the "General stat" for "Total blocks mined" (in the latest BSS version).
Anyway, onto the suggestion.. I do see one small barrier to implementing this; and that is the fact that counting up all item's stats and updating the HUD as you mine blocks may have a bigger impact on performance, especially if the game has 1000s of modded-in items. Fun fact: Older versions of this mod (like the one you seem to be using) have this exact issue, but in the BSS screen menu, where if you open the "Items" tab while in a modded environment with like over 10k modded items, the game would just halt and lag spike for a while, as BSS takes time to process all those items (that issue was resolved in latest BSS versions). I fear a similar issue could take place if the HUD were to somehow try to count up each item every time the HUD updates.
I suppose one workaround to this could be modding in an optional feature that adds the "Total blocks mined" general stat, that increments when players mine blocks. That way BSS wouldn't have to process thousands of items and lag-spiking the game each time it does so.
It's a great idea nonetheless. I guess I'll try to think of some solution if I do decide on implementing this. Thanks again for the suggestion, and thanks for liking the mod. Have a great day!
I appreciate you taking the time to get back to me!
Hmmm the summation of all the items causing lag was something that seems so obvious now that you mention it. I wonder if it would be possible to use something mimicking the data storage method of DVD's where they only store data for things that have changed since the last frame to save space, but use it to save lag. Store the previous total, check if each stat has changed, total the net change of changed stats, and then add that to the previous total. Not sure if something like that would actually end up saving lag or not. I'm not familiar with the programming for Minecraft stuff unfortunately. Maybe make general stats like that not have an option for them to update in real time, maybe have selectable update intervals, or give warnings if someone tries to set it to that letting them know it will cause lag?
Your suggestion for adding a general stat would probably be much easier, I wonder how hard it would be to make a mod/addon that does that. I'll have to look into custom stats.
Thank you for the information! I hope you have a great day as well!
any updates?
Hello.
Not really, no. I ended up setting this idea aside, as I got distracted by a bunch of other things (including those unrelated to BSS).
For now my idea is, I wanna eventually somehow implement an "Advancements tab" feature, as quite some people requested it. The idea here is, since "Hostile creatures" and "Food & drinks" are tabs, people now want a helpful feature that'll show them detailed progresses for all advancements, and I think that idea is neat. I am still yet to learn how advancements work however, as I noticed they're a bit tricky to deal with, and aren't as simple as statistics, so I can't really promise that feature either.
As for this idea, maybe I do implement it as well someday. I don't 100% know if I will, but I'll def. keep it in mind.