Jump to content

OSX case sensitive filesystem can't run my mod


kberg

Recommended Posts

I'm noticing that my OSX workstation isn't playing happily with Minecraft because it is a case sensitive filesystem.

 

For example, when loading the language file, it finally gets to FolderResourcePack.validatePath, it hits this line:

>>>         return s.endsWith(p_191384_1_);

 

Looking at a debugger, here are the values of s and p_19blah

/Users/<redacted>/src/forge/bin/assets/konigsmod/lang/en_US.lang

assets/konigsmod/lang/en_us.lang

 

So because their cases do not match, the path is not valid.

 

But it's not just there, I have a file a json file that has the same problem, because I describe my items in mixedCase.

 

Is it possible you could replace s.endsWith(p_191384_1_) with s.toLowerCase().endsWith(p_191384_1_1.toLowerCase());? That's not i18n friendly, but if the system already deals with encodings, it gets simpler.

 

Why does that check even exist, anyway?

 

In the meantime, I plan to switch my resource names to lowercase. Hopefully that'll help.

 

Thanks,

Robert

Link to comment
Share on other sites

Which Minecraft version are you using? 1.11+ requires all resource file names to be lowercase.

 

If you don't have a pack.mcmeta file or you do and it sets pack_format to 2, lang files will be loaded with the old mixed-case names (e.g. en_US.lang) because Forge wraps your mod's IResourcePack in a LegacyV2Adapter.

 

If you have a pack.mcmeta file that sets pack_format to 3 (the current resource pack version), lang files will be loaded with the new lower-case names (e.g. en_us.lang).

 

It's best to convert to pack_format 3 and lowercase names now in case Forge stops special-casingpack_format 2 resource packs in a future version.

  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

OK. I'm using 1.12. May I suggest that instead of 

 

 return s.endsWith(p_191384_1_);

 

It ends with

 

boolean valid = s.endsWith(p_191384_1_);
if (!valid) {

  whateverLogger.log("Invalid filename: %s, is it mixed case?", s);

}
return valid;

 

Thanks,

Robert

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.