Jump to content

How can I change the "mods"-Directory?


DigitalClark

Recommended Posts

I hope this is the correct board!

 

Hello there Minecrafters,

 

is there any way to change the "mods"-Directory? I know, there are serveral threads out there, but no one of them really helped me. So, I created a launcher that launches Minecraft from another working-directory (instead of .minecraft it's .minecraft2 for example). Now, when Forge is installed, the minecraft.jar from the .minecraft2-Directory uses the "mods"-Folder from .minecraft. Is there any way to change the "mods"-Directory (maybe with modding)? I looked for that in the .cfg-File, nothing found. The strange thing is, that the "config"-Folder is created in the .minecraft2-Directory.

 

Thanks for your help,

DigitalClark.

Link to comment
Share on other sites

As long as you set the directory that MC returns in Minecraft.getMCDir() properly {its simple you just set 1 field} then you're fine. If you don't then it'll autogenerate and go for it.

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

Thanks LexManos!

I decompiled Minecraft using MCP, opened Minecraft.java, changed the line with getMinecraftDir() from to minecraft to minecraft2 , recompiled it and reobfuscated it and copied the Minecraft.class into minecraft.jar.

Forge still uses the mods-Folder from .minecraft and not .minecraft2 (also it creates the logs in .minecraft). I'm not really skilled in Java (yet), so (but in other programming languages)...

Any advice?

Link to comment
Share on other sites

Dont edit base classes in your launcher -.-

Your edits are getting overwriten by forge cuz we have to edit that class.

Take a look at how other launchers do it, its super simple.

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

Yes, I know, sorry.

Thanks again for the reply :).

 

I'm just going to post the log here:

2012-10-15 14:56:21 [iNFO] Forge Mod Loader version 2.2.106.176 for Minecraft c:1.2.5, s:1.2.5 loading

2012-10-15 14:56:21 [FINE] No mod directory found, creating one: C:\Users\Clark\AppData\Roaming\.minecraft\mods

2012-10-15 14:56:21 [FINE] Attempting to load mods contained in the minecraft jar file and associated classes

2012-10-15 14:56:21 [FINE] Found a minecraft related file at C:\Users\Clark\AppData\Roaming\.minecraft2\bin\minecraft.jar, loading

 

My launcher does launch the minecraft.jar in the .minecraft2-Directory and Forge also works, but Forge uses the mods-Folder from

.minecraft. My launcher isn't programmed with Java, it uses a .bat-File to launch Minecraft:

 

/c "javaw -Xmx1024M -Xms1024M -Djava.library.path=workdir//.minecraft2/bin/natives -cp workdir/.minecraft2/bin/minecraft.jar;.workdir/.minecraft2/bin/jinput.jar;workdir/.minecraft2/bin/lwjgl.jar;workdir/.minecraft2/bin/lwjgl_util.jar net.minecraft.client.Minecraft [NICKNAME] [PASSWORD]

 

* workdir stands for the path to the %appdata%-Folder (Windows)

Link to comment
Share on other sites

Don't care, you could write your launcher in python, you'd still have to do the same thing, it's a bitch, but you'd have to do it.

You even stated that PART of your launcher was java, namely your modified Minecraft class.

Either way, to be honest, you shouldn't be making a luancher if you cant figure out the basics.

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

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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