Jump to content

It is possible to modify the minecraft.java.patch of mcp'forge source ?


Recommended Posts

Posted

Hello !!!

 

So i will try to explain quickly my problem :

 

I modify a java class in minecraft.jar to change the minecraft main directory, in net/minecraft/client/Minecraft.java at

"minecraftDir = getAppDir("minecraft");"    (just change minecraft to an other name)

So my new minecraft start in a directory like ".test" in appdata .

 

 

BUT : I have tried to add Forge mod loader (for Minecraft 1.5.1) in my minecraft.jar , but he delete my "Minecraft.java"  :'( to replace it by his...

 

 

conclusion : FML try to load my mods only in the ".minecraft"  :-\

 

 

I download the FML'source, But impossible to find the "Minecraft.java" class  :o

I understood later that you use java.patch in mcp to ... patch ( 8) ) the original minecraft java class .

 

 

There is two interressants patchs :

 

  • minecraftforge-src-1.5.1-7.7.1.611.zip\forge\patches\minecraft\net\minecraft\client\Minecraft.java.patch
  • minecraftforge-src-1.5.1-7.7.1.611.zip\forge\fml\patches\minecraft\net\minecraft\client\Minecraft.java.patch

[shadow=red,left]So : my question is :[/shadow]

it is possible to add in one of this patch, the lines :

    -        minecraftDir = getAppDir("minecraft");
    +        minecraftDir = getAppDir("OTHERNAME");

 

 

I think it is the only way to change this Parameter of minecraft with FML  :-\ but if you have another idea, I would listen carefully you  ;D

 

 

I already see a topic in the forum, but it didn't help me .

(I also found this , similary problems)

 

 

Thank you in advance for your help !

 

 

ps: I'm sorry, i'm a little (and beginner) french programmer, so my english is surely not good all the time  :D

Posted

Edit base classes is bad especially for things as stupid as this.

Look at the plethora of other launchers out there that do this exact same thing without editing any base classes.

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

Sir... You came to the RIGHT neighborhood!

Just think for a while - You can both have Forge and Forge src - right?

Here's what you do:

1. Set up NEW MCP.

2. Get src of Forge

3. Get new minecarft.jar

4. You put minecarft.jar into jars and then you install Forge on MCP

5. Now you open src and go to Minecarft.java

6. You change AppDir

7. Compile whole source and reobvuscate it

8. If you could just notice that Minecarft.java is just Minecraft.class...

9. I think you know what to do now? Just get obvuscated Minecarft.class - this is yourwhat I call ,,Redirector".

10. Only thing to do now is to get minecarft,jar, remove META-DATA, place Forge in it, and then get ,,Redirector" which will override old one you just installed.

11. The new redirector is THE SAME thing there is in Forge but has changed AppDir - since this is "name" change this will not affect on client-server communication.

12. The Last, but not least is that: Get down on your knees and pray to god I actually made myself wrote this. :D

 

Hope i helped.

1.7.10 is no longer supported by forge, you are on your own.

Posted

Sir... You came to the RIGHT neighborhood!

Just think for a while - You can both have Forge and Forge src - right?

Here's what you do:

1. Set up NEW MCP.

2. Get src of Forge

3. Get new minecarft.jar

4. You put minecarft.jar into jars and then you install Forge on MCP

5. Now you open src and go to Minecarft.java

6. You change AppDir

7. Compile whole source and reobvuscate it

8. If you could just notice that Minecarft.java is just Minecraft.class...

9. I think you know what to do now? Just get obvuscated Minecarft.class - this is yourwhat I call ,,Redirector".

10. Only thing to do now is to get minecarft,jar, remove META-DATA, place Forge in it, and then get ,,Redirector" which will override old one you just installed.

11. The new redirector is THE SAME thing there is in Forge but has changed AppDir - since this is "name" change this will not affect on client-server communication.

12. The Last, but not least is that: Get down on your knees and pray to god I actually made myself wrote this. :D

 

Hope i helped.

1.7.10 is no longer supported by forge, you are on your own.

Posted

Hey ! Thanks for your replies !

 

Ernio thks you very much, now FML download file in my folder !!! it's work !

 

but ... i have now a new bug :/  and minecraft don't want to start ...

 

2013-04-16 19:37:49 [iNFO] [ForgeModLoader] Forge Mod Loader version 5.1.8.611 for Minecraft 1.5.1 loading
2013-04-16 19:37:49 [iNFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_17, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
2013-04-16 19:37:49 [sEVERE] [ForgeModLoader] FML appears to be missing any signature data. This is not a good thing
2013-04-16 19:37:50 [iNFO] [sTDERR] Exception in thread "Thread-5" java.lang.RuntimeException: cpw.mods.fml.relauncher.ReflectionHelper$UnableToFindClassException: java.lang.ClassNotFoundException: net.minecraft.Launcher
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.FMLRelauncher.relaunchApplet(FMLRelauncher.java:287)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.FMLRelauncher.appletEntry(FMLRelauncher.java:229)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at net.minecraft.client.MinecraftApplet.init(MinecraftApplet.java:25)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at edoriacraft.launcher.Launcher.replace(Launcher.java:146)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at edoriacraft.launcher.Launcher$1.run(Launcher.java:90)
2013-04-16 19:37:50 [iNFO] [sTDERR] Caused by: cpw.mods.fml.relauncher.ReflectionHelper$UnableToFindClassException: java.lang.ClassNotFoundException: net.minecraft.Launcher
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.ReflectionHelper.getClass(ReflectionHelper.java:159)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.FMLRelauncher.relaunchApplet(FMLRelauncher.java:272)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	... 4 more
2013-04-16 19:37:50 [iNFO] [sTDERR] Caused by: java.lang.ClassNotFoundException: net.minecraft.Launcher
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.net.URLClassLoader$1.run(Unknown Source)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.net.URLClassLoader$1.run(Unknown Source)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.security.AccessController.doPrivileged(Native Method)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.net.URLClassLoader.findClass(Unknown Source)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.lang.ClassLoader.loadClass(Unknown Source)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.lang.ClassLoader.loadClass(Unknown Source)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.lang.Class.forName0(Native Method)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.lang.Class.forName(Unknown Source)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.ReflectionHelper.getClass(ReflectionHelper.java:151)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	... 5 more

 

 

I thinks it is about my launcher, but i don't understand why i have this  :'(

I don't have any class "net.minecraft.Launcher", Is it the reason ?

Thank you anyway for your help !

 

Posted

Hey ! Thanks for your replies !

 

Ernio thks you very much, now FML download file in my folder !!! it's work !

 

but ... i have now a new bug :/  and minecraft don't want to start ...

 

2013-04-16 19:37:49 [iNFO] [ForgeModLoader] Forge Mod Loader version 5.1.8.611 for Minecraft 1.5.1 loading
2013-04-16 19:37:49 [iNFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_17, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
2013-04-16 19:37:49 [sEVERE] [ForgeModLoader] FML appears to be missing any signature data. This is not a good thing
2013-04-16 19:37:50 [iNFO] [sTDERR] Exception in thread "Thread-5" java.lang.RuntimeException: cpw.mods.fml.relauncher.ReflectionHelper$UnableToFindClassException: java.lang.ClassNotFoundException: net.minecraft.Launcher
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.FMLRelauncher.relaunchApplet(FMLRelauncher.java:287)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.FMLRelauncher.appletEntry(FMLRelauncher.java:229)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at net.minecraft.client.MinecraftApplet.init(MinecraftApplet.java:25)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at edoriacraft.launcher.Launcher.replace(Launcher.java:146)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at edoriacraft.launcher.Launcher$1.run(Launcher.java:90)
2013-04-16 19:37:50 [iNFO] [sTDERR] Caused by: cpw.mods.fml.relauncher.ReflectionHelper$UnableToFindClassException: java.lang.ClassNotFoundException: net.minecraft.Launcher
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.ReflectionHelper.getClass(ReflectionHelper.java:159)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.FMLRelauncher.relaunchApplet(FMLRelauncher.java:272)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	... 4 more
2013-04-16 19:37:50 [iNFO] [sTDERR] Caused by: java.lang.ClassNotFoundException: net.minecraft.Launcher
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.net.URLClassLoader$1.run(Unknown Source)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.net.URLClassLoader$1.run(Unknown Source)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.security.AccessController.doPrivileged(Native Method)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.net.URLClassLoader.findClass(Unknown Source)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.lang.ClassLoader.loadClass(Unknown Source)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.lang.ClassLoader.loadClass(Unknown Source)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.lang.Class.forName0(Native Method)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at java.lang.Class.forName(Unknown Source)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.ReflectionHelper.getClass(ReflectionHelper.java:151)
2013-04-16 19:37:50 [iNFO] [sTDERR] 	... 5 more

 

 

I thinks it is about my launcher, but i don't understand why i have this  :'(

I don't have any class "net.minecraft.Launcher", Is it the reason ?

Thank you anyway for your help !

 

Posted

What part of editing base classes for this is a stupid idea and you shouldn't do it don;t you get?

There are plenty of other lauchers out there that do this without base edits. Learn from them.

Thread locked.

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

What part of editing base classes for this is a stupid idea and you shouldn't do it don;t you get?

There are plenty of other lauchers out there that do this without base edits. Learn from them.

Thread locked.

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

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.