You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for logoFile in neoforge.mods.toml on the Mod Files page makes no mention of the valid characters for logoFile. I was told on Discord the valid characters are lowercase letters, digits, dashes, periods, and underscores. Since uppercase letters were supported in Forge (in my experience), it may be beneficial to note what they are.
If you attempt to use uppercase letters in logoFile, Minecraft will crash when viewing the mod information with an error similar to:
java.lang.IllegalArgumentException: Illegal segment Mod_Logo.png in path [Mod_Logo.png]
at TRANSFORMER/[email protected]/net.minecraft.FileUtil.validatePath(FileUtil.java:175) ~[client-1.20.6-20240429.153634-srg.jar%23172!/:?] {re:classloading}
at TRANSFORMER/[email protected]/net.minecraft.server.packs.PathPackResources.getRootResource(PathPackResources.java:43) ~[client-1.20.6-20240429.153634-srg.jar%23172!/:?] {re:classloading}
...
This was tested in NeoForge 20.6.119 and 20.4.237.
The text was updated successfully, but these errors were encountered:
The reason uppercase characters worked in the past was because NeoForge used to have its own class net.neoforged.neoforge.resource.PathPackResources which powered the resource-handling for mod JARs, and was consequently used when getting the logo file from the mod JAR as a root resources.
However in #284 / 1.20.2, we removed that class in favor of vanilla's own implementation in net.minecraft.server.packs.PathPackResources. In doing so, we inherited the restrictions of the vanilla class, which includes enforcing essentially the same restrictions on regular resources (accessed by resource location) on root resources (accessed by string paths) -- only lowercase letters, digits, underscore, periods, and hyphens.
The documentation for
logoFile
inneoforge.mods.toml
on the Mod Files page makes no mention of the valid characters forlogoFile
. I was told on Discord the valid characters are lowercase letters, digits, dashes, periods, and underscores. Since uppercase letters were supported in Forge (in my experience), it may be beneficial to note what they are.If you attempt to use uppercase letters in
logoFile
, Minecraft will crash when viewing the mod information with an error similar to:This was tested in NeoForge 20.6.119 and 20.4.237.
The text was updated successfully, but these errors were encountered: