Jump to content

Ellian detectoir config files not detected?


Felina_Lain

Recommended Posts

So after posting some messages onto Ellian topic, I was told that the problem came from forge (http://www.minecraftforum.net/topic/193443-v162-ellians-materialdetector-v27/page__st__1760)(See LoRam100 answer at the bottom), and to complain here, which I came to do:

 

Every time I start the game, the config file isn't detected and I have to re input every of my setting for the Ellian detector mod.

Is there any way to fix this, or any planned update of forge to fix this?

 

Thanks in advance.

 

Link to comment
Share on other sites

Same problem here.

It happens with or without any other mods. (minus Forge... because no one should run without Forge.)

 

But it only happens with Ellian's Detector Mod or his Proximity Detector.

Config files are not saved/loaded/anything.

 

As advised from a forum member that it may be a Forge issue.

Running Forge .800 now, and LOVE Forge.

 

Just configs aren't being loaded for these two.

Any help?

Link to comment
Share on other sites

This has nothing to do with Forge. And everything to do with the horrible way that modder is getting the config directory.

2013-07-26 09:54:56 [iNFO] [sTDERR] java.io.FileNotFoundException: C:\Users\Lex\AppData\Roaming\config\EllianDetector.materials.settings (The system cannot find the path specified)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at java.io.FileOutputStream.open(Native Method)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at java.io.FileOutputStream.<init>(Unknown Source)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at java.io.FileOutputStream.<init>(Unknown Source)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at java.io.FileWriter.<init>(Unknown Source)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at elliandetector.EllianDetectorConfiguration.writeMaterials(EllianDetectorConfiguration.java:470)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at elliandetector.EllianDetector.saveMaterials(EllianDetector.java:435)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at EllianGuiMaterialScreen.addMaterial(EllianGuiMaterialScreen.java:162)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at EllianGuiMaterialEditorScreen.accept(EllianGuiMaterialEditorScreen.java:216)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at EllianGuiMaterialEditorScreen.func_73875_a(EllianGuiMaterialEditorScreen.java:108)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.gui.GuiScreen.func_73864_a(SourceFile:69)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.gui.GuiScreen.func_73867_d(SourceFile:128)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.gui.GuiScreen.func_73862_m(SourceFile:107)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1554)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:898)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.main.Main.main(SourceFile:101)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:18)

Does that look like the correct directory to you?

She has this function:

  public static File getAppDir() {
    String command = System.getProperty("sun.java.command");
    command = command.substring(command.indexOf("gameDir") + ;
    command = command.substring(command.length() - 
      command.indexOf("assetsDir") - 4);
    command = command.replace("assets", "");
    File minecraftHome = new File(command);
    if (minecraftHome.exists()) {
      return minecraftHome;
    }
    minecraftHome = new File(System.getProperty("user.home") + 
      File.separator + "AppData" + File.separator + "Roaming");
    if (minecraftHome.exists()) {
      return minecraftHome;
    }

    throw new RuntimeException("Minecraft folder not found");
  }

Which is accessed by this function:

  public static File getAppDir(String app) {
    return EllianDetector2MinecraftProxy.getAppDir();
  }

Which is used here to get the config folder:

  public static void initConfFolder() {
    CONFIG_FOLDER = getAppDir("minecraft") + File.separator + "config";
  }

 

Now note:

1) that bouncer function that supposed to take and use the "minecraft" doesn't.

2) Her entire getAppDir function could be compressed down to a single call to Minecraft.getMCDir() and be guaranteed to get the folder she wants. (I assume its a 'she' based off the name, I think it's Pronounced like Ellian from Sinefield, if not sorry I took a guess}

3) Her functions is horrid because it assumes that the command line will ALWAYS be in the format of --gameDir {path} --assetsDir which is well.. not how command lines work.

 

So, because of her buggy code, your options are either 1) Dont use her stuff. Or 2) use the system variable ELLIAN_CONFIG to manually set the proper config folder.

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

Link to comment
Share on other sites

Lex, I was just about to post about the ELLIAN_CONFIG environment variable :).

As Ellian themselves posted:

The mod searches for an environment variable ELLIAN_CONFIG.

Ellian's "Tips" for installing their mod.

If you want the mods configs to work with Forge, you have two options:

 

1) Add ELLIAN_CONFIG to your environment variables;

 

or

 

2) Use one of the scripts I provide which will set the environment variable just for that instance. (you'll have to use it every time if you want the configs to work.):

Launching with Minecraft.jar

@ECHO OFF
ECHO "Script created by Jasertio"
ECHO "Setting ELLIAN_CONFIG to %APPDATA%\.minecraft\config\"
set ELLIAN_CONFIG=%APPDATA%\.minecraft\config\
ECHO "Launching Minecraft"
java -jar Minecraft.jar

 

Launching with Minecraft.exe

@ECHO OFF
ECHO "Script created by Jasertio"
ECHO "Setting ELLIAN_CONFIG to %APPDATA%\.minecraft\config\"
set ELLIAN_CONFIG=%APPDATA%\.minecraft\config\
ECHO "Launching Minecraft"
Minecraft

 

To run the script, have Minecraft.jar or Minecraft.exe on the same folder as the script, and run the script.

Link to comment
Share on other sites

You know that profiles do have a jvm argument congih option you can define env vars with right? Anyways the better solution is that she fixes her code.

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

Link to comment
Share on other sites

This has nothing to do with Forge. And everything to do with the horrible way that modder is getting the config directory.

2013-07-26 09:54:56 [iNFO] [sTDERR] java.io.FileNotFoundException: C:\Users\Lex\AppData\Roaming\config\EllianDetector.materials.settings (The system cannot find the path specified)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at java.io.FileOutputStream.open(Native Method)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at java.io.FileOutputStream.<init>(Unknown Source)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at java.io.FileOutputStream.<init>(Unknown Source)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at java.io.FileWriter.<init>(Unknown Source)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at elliandetector.EllianDetectorConfiguration.writeMaterials(EllianDetectorConfiguration.java:470)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at elliandetector.EllianDetector.saveMaterials(EllianDetector.java:435)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at EllianGuiMaterialScreen.addMaterial(EllianGuiMaterialScreen.java:162)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at EllianGuiMaterialEditorScreen.accept(EllianGuiMaterialEditorScreen.java:216)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at EllianGuiMaterialEditorScreen.func_73875_a(EllianGuiMaterialEditorScreen.java:108)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.gui.GuiScreen.func_73864_a(SourceFile:69)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.gui.GuiScreen.func_73867_d(SourceFile:128)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.gui.GuiScreen.func_73862_m(SourceFile:107)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1554)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:898)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.client.main.Main.main(SourceFile:101)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
2013-07-26 09:54:56 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:18)

Does that look like the correct directory to you?

She has this function:

  public static File getAppDir() {
    String command = System.getProperty("sun.java.command");
    command = command.substring(command.indexOf("gameDir") + ;
    command = command.substring(command.length() - 
      command.indexOf("assetsDir") - 4);
    command = command.replace("assets", "");
    File minecraftHome = new File(command);
    if (minecraftHome.exists()) {
      return minecraftHome;
    }
    minecraftHome = new File(System.getProperty("user.home") + 
      File.separator + "AppData" + File.separator + "Roaming");
    if (minecraftHome.exists()) {
      return minecraftHome;
    }

    throw new RuntimeException("Minecraft folder not found");
  }

Which is accessed by this function:

  public static File getAppDir(String app) {
    return EllianDetector2MinecraftProxy.getAppDir();
  }

Which is used here to get the config folder:

  public static void initConfFolder() {
    CONFIG_FOLDER = getAppDir("minecraft") + File.separator + "config";
  }

 

Now note:

1) that bouncer function that supposed to take and use the "minecraft" doesn't.

2) Her entire getAppDir function could be compressed down to a single call to Minecraft.getMCDir() and be guaranteed to get the folder she wants. (I assume its a 'she' based off the name, I think it's Pronounced like Ellian from Sinefield, if not sorry I took a guess}

3) Her functions is horrid because it assumes that the command line will ALWAYS be in the format of --gameDir {path} --assetsDir which is well.. not how command lines work.

 

So, because of her buggy code, your options are either 1) Dont use her stuff. Or 2) use the system variable ELLIAN_CONFIG to manually set the proper config folder.

 

Since I know nothing of Java and just want to use the mod i'm gonna send the link of this page over to Ellian and see what happen...

Else if anyone had the patience to do me a step-by-step tutorial on how to make it work...

Like you said we could change the code to shorten it and make it work perfectly, so just in three lines: which files, what line to change, and by what?

 

Thanks a lot anyway...

Link to comment
Share on other sites

If you arnt comfortable decompiling and working whit java don't do it.

Just ask the mod author to do it.

It looks to me like a glaring bug/broken code, and it's really small, so the author should be willing to fix it themselves relatively quick..

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

Link to comment
Share on other sites

Guess I'm f*** up then because I send a message about it and I received the following: "I will change nothing

You just have to follow the post that I have written which explains everything about the configuration folder

 

Good luck with reading "

 

And I don't understand a word of what is explained in that mentioned post...

So dropping the detector is my last option...

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.