Skip to content

Clean log and fix mod incompatibility#135

Open
anastarawneh wants to merge 2 commits intoAsoDesu:mainfrom
anastarawneh:main
Open

Clean log and fix mod incompatibility#135
anastarawneh wants to merge 2 commits intoAsoDesu:mainfrom
anastarawneh:main

Conversation

@anastarawneh
Copy link
Copy Markdown

Almost did it before the release, oh well...

All this does is clean the log up a little, the warnings are spammed whenever the resources reload, which happens a lot on Island. Not sure if there's a better way of doing this, it's just the way I previously did it.

@anastarawneh anastarawneh changed the title Prevent "Failed to load builder" warnings from spamming the log Clean log and fix mod incompatibility May 18, 2024
case "_fonts/tooltips/hair.png" -> CosmeticState.HAIR_COMP = comp;
case "_fonts/medals.png" -> LevelTimer.medalCharacter = character;
case "_fonts/medals.png" -> {
if (MccIslandState.isOnline() && LevelTimer.medalCharacter.isEmpty()) LevelTimer.medalCharacter = character;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is certainly a solution, but it is also an edge case
i'm gonna take a look at it and see if there's a bit of a better, more concrete solution that won't make this susceptible to happening again with a different character.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to have a similar implementation and extract the real characters without a dummy resource pack, which should negate the need for any changes on your end. I coded this as a quick fix since I can't release an update for some time. The medal is the only character I'm using that conflicts with IslandUtils.

On second thought, however, I think my pack loaded after because of alphabetical order, so other mods might potentially still cause similar conflicts. I tried to find a way to check the origin resource pack of the glyph but I got nowhere.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently I did something that can fix this issue a while ago, and I completely forgot about it:

https://github.com/anastarawneh/MCCINametagMod/blob/e220774376f366bd981f023927827676c104ba78/src/main/java/me/anastarawneh/mccinametagmod/util/Util.java

You can read the actual font/icon.json file and parse it manually. The chances that another mod is also using the same mcc:fonts/icon.json identifier is incredibly low, so there should be no overlap.

Regardless, I fixed the issue on my end, and I will upload an updated version soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants