Jump to content

Recommended Posts

Posted

I am in the process of updating my 1.10 mod to 1.11. I used uppercase and lowercase letters for model and texture names, but as of 1.11 it all needs to be lowercase (for some reason...)

I found a program that could bulk rename all the files to lowercase, so that is done. Now I *just* need to change all the contents of the files to lowercase.

Do you know of any program/command that can convert entire folder contents to lowercase?

I have like 1 million model files, so editing them all by hand would be a pain...

 

 

Posted
2 hours ago, Tschipp said:

as of 1.11 it all needs to be lowercase (for some reason...)

Mojang is enforcing it because Capitilization screws things up.  Windows sees Uppercase and lowercase as being The Same Thing, but the zip format (jar files are zip files with a different extension) does not.  By enforcing lower case and only lower case, this problem goes away magically.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
2 minutes ago, Draco18s said:

Mojang is enforcing it because Capitilization screws things up.  Windows sees Uppercase and lowercase as being The Same Thing, but the zip format (jar files are zip files with a different extension) does not.  By enforcing lower case and only lower case, this problem goes away magically.

Ah, I see. Yes, that has actually happened to me. I had named some files differently while working on them, but when I built it into a jar the textures didn't show up ingame.

Posted

Note, the CONTENTS of resources don't need to be lowercase, just the file path.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted
21 hours ago, LexManos said:

Note, the CONTENTS of resources don't need to be lowercase, just the file path.

You are talking about the file path in the model files, right? Because that would mean that I have to change every file, as I said.

 

Anyway, I have already written a script that does the job just fine.

  • 1 year later...
Posted

Have a look at this article for how to read from files in Java - you can read each character and then convert it to lower case.

 

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;

public class ReadFile_Files_ReadAllBytes {
  public static void main(String [] pArgs) throws IOException {
    String fileName = "c:\\temp\\sample-10KB.txt";
    File file = new File(fileName);

    byte [] fileBytes = Files.readAllBytes(file.toPath());
    char singleChar;
    char singleCharLower;
    for(byte b : fileBytes) {
      singleChar = (char) b;
      singleCharLower = Character.toLowerCase(singleChar);
      System.out.print(singleCharLower);
    }
  }
}

 

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.