KnightMiner / Inspirations

Mod adding various smaller features to Minecraft
MIT License
44 stars 18 forks source link

[Suggestion] Skip WARN/ERROR for failed init for mod items that are absent if mod not loaded #72

Closed Wabbit0101 closed 5 years ago

Wabbit0101 commented 6 years ago

Inspirations currently prints out several WARN and ERROR level messages during initialization for mods that are not present. The builtin integration is great, but if the mod is not present it's really isn't a warning or error that its items are not there...example snippets below for BoP and DefiledLands (the mods aren't in the game setup)...

I realize this is connected to the defaults for the bookOverrides and flowerOverrides config option so not sure if/how you might approach. Maybe just a better message as by default it's going to show errors?

[10:40:11] [main/WARN] [inspirations]: Unable to find item defiledlands:book_wyrm_raw:0 for override
[10:40:11] [main/WARN] [inspirations]: Unable to find item defiledlands:book_wyrm_cooked:0 for override
[10:40:11] [main/WARN] [inspirations]: Unable to find item defiledlands:book_wyrm_scale:0 for override
[10:40:11] [main/WARN] [inspirations]: Unable to find item defiledlands:book_wyrm_scale_golden:0 for override
[10:40:11] [main/WARN] [inspirations]: Unable to find item defiledlands:book_wyrm_analyzer:0 for override
[10:40:11] [main/ERROR] [inspirations]: Invalid override biomesoplenty:flower_0:-1:true: invalid item biomesoplenty:flower_0:-1
[10:40:11] [main/ERROR] [inspirations]: Invalid override biomesoplenty:flower_0:-1:true: invalid item biomesoplenty:flower_0:-1
[10:40:11] [main/WARN] [inspirations]: Unable to find item biomesoplenty:mushroom:-1 for override
[10:40:11] [main/ERROR] [inspirations]: Invalid override biomesoplenty:sapling_0:-1:true: invalid item biomesoplenty:sapling_0:-1
[10:40:11] [main/ERROR] [inspirations]: Invalid override biomesoplenty:sapling_1:-1:true: invalid item biomesoplenty:sapling_1:-1
[10:40:11] [main/ERROR] [inspirations]: Invalid override biomesoplenty:sapling_2:-1:true: invalid item biomesoplenty:sapling_2:-1
KnightMiner commented 6 years ago

Well, they should both be warnings, but the idea is I want it to be obvious if you add an item with the wrong name accidentally and are not sure why its not working. I could switch the level to debug though, so it only appears in the saved log and not the console.

Wabbit0101 commented 6 years ago

I just started integrating notenoughwands...I got messages like these (same general issue but indicated differently)...I thought they may be a useful example for your log output...

[09:08:22] [main/INFO] [notenoughwands]: Failed to load wrench class buildcraft.api.tools.IToolWrench (this is not an error)

In the inspiration mod's case it would also be INFO but would say "(this MIGHT be an error)"

KnightMiner commented 5 years ago

I went through awhile back during some rewrites and made most logging either info or debug unless its specifically invalid syntax. Let me know if it still happens anywhere