stopgap fix for opus icons on newer MC #59
Reference in New Issue
Block a user
Delete Branch "Merith-TK/develop-1.8"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Opus
Utils.getVersionresults in returning1.1rather than anything newer when on the 1.100.x CC versions (fabric and forge)this is an stop gap fix, and yes, If I knew how I would tweak the matchers to make it work, but I dont so this will do, because whoever is on CC 1.1... needs to get off it,
I think this might break again when CC:T 1.110.0 is released, here are some other ideas I had:
Here are all the usages of Util.getVersion(): https://github.com/kepler155c/opus/search?q=getVersion https://github.com/kepler155c/opus-apps/search?q=getVersion
well, as the commit says, and the file comments I put in, this is an stopgap, not pretty, and definitely could use improvement, but it gets the job done without being too invasive on the code
so... any ideas for an better implementation of an fix?
I think Anavrins mentioned at one point that returning multiple values could be a good implementation. I can try working on that (this is somewhat urgent now, since SwitchCraft 2 is literally going away in 12 minutes, and the new version will be on SC3 so more people will run into this bug; if anybody who isn't currently online is seeing this comment right now, please join!)
With the release of SC3 this fix would be very much needed so icons can actually render
Closing — superseded by #62
This issue was properly resolved by PR #62 (Kan18), which refactored Util.getVersion() to return a (major, minor) tuple using the pattern (%d+)%.(%d+). That correctly parses 1.100 as major=1, minor=100, and introduced Util.compareVersion() and Util.supportsExtChars() to replace all the fragile >= 1.76 float comparisons.
Thanks @Merith-TK for identifying the problem — the regex only matching two digits after the decimal was definitely the root cause. The proper fix is now merged on both develop-1.8 and main.
Pull request closed