MCDOCS
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[Begginer] How to merge mods

3 posters

Go down

[Begginer] How to merge mods Empty [Begginer] How to merge mods

Post  Tei Wed Oct 20, 2010 3:07 pm

http://www.minecraftforum.net/viewtopic.php?f=25&t=61032&p=965245#p965245
------------------
303 wrote:Some mods modify the same .class files, so they cannot be used together without impairing features. Such mods can sometimes be made compatible by decompiling each version of the conflicting .class files, copying the changes into a combined .java file and recompiling it. I found a really quick procedure for this process:

  • To decompile, I use JD-GUI or JAD.
  • To prepare the .java files for merging, I wrote a shell script to remove comments and blank lines.
  • To merge the decompiled .java files, I use Meld.
  • To recompile, the standard java compiler (javac). Change directory to .minecraft, copy the .java files there and run:
    Code:
    javac -cp bin/minecraft.jar:bin/lwjgl.jar:bin/lwjgl_util.jar:bin/jinput.jar {name of file here}.java
    I use linux, but I think Windows needs semicolons instead of colons in the -cp argument.


In order to make a mod merger work:

  • Delete the META-INF directory from minecraft.jar
  • For each original mod: add all the .class files from the mod's archive to minecraft.jar. Not necessary if that mod consists of only one file, like Stack That Mob or Scroll The Sky
  • Add my merged .class files to minecraft.jar

Anyway, here are some mods I have already merged:



If you'd like me to merge mods, just make a request. Do please tell me if one of these mergers does not work for you.

Tei
Admin

Posts : 32
Join date : 2010-10-15

https://mcdocs.forumotion.com

Back to top Go down

[Begginer] How to merge mods Empty Re: [Begginer] How to merge mods

Post  Obibital Thu Nov 04, 2010 6:16 pm

De/Compiling?

What is the definition of that? Im thinking its something along the lines of pulling it apart so it can be edited and putting it back together so it can be used.

Am i correct?
Obibital
Obibital

Posts : 5
Join date : 2010-11-04

Back to top Go down

[Begginer] How to merge mods Empty Re: [Begginer] How to merge mods

Post  Tei Fri Nov 05, 2010 4:56 am

Obibital wrote:De/Compiling?

What is the definition of that? Im thinking its something along the lines of pulling it apart so it can be edited and putting it back together so it can be used.

theres probably a good definition on the red dragon book

http://www.amazon.com/Compilers-Principles-Techniques-Alfred-Aho/dp/0201100886

minecraft is made of .class files, that are binary files with the "bytecode" of a fictional CPU.
notch create these .class files using the "java compiler" ( javac.exe ) that conver the high level java instructions into the low level bytecode instructions (and do some light optimization on the fly).

decompiling is restoring back the original java files from the class files with special programs that read the bytecode and the metadata to reconstruct something similar to the original .java code.

Tei
Admin

Posts : 32
Join date : 2010-10-15

https://mcdocs.forumotion.com

Back to top Go down

[Begginer] How to merge mods Empty Re: [Begginer] How to merge mods

Post  Radical924 Fri Jun 28, 2013 8:21 am

I would like to merge two class files... Or I at least would like to know how to use meld myself to merge class files (I do not know how to or understand code)... I will send you a PM Tei!
Radical924
Radical924

Posts : 1
Join date : 2013-06-28

https://www.youtube.com/Radical924

Back to top Go down

[Begginer] How to merge mods Empty Re: [Begginer] How to merge mods

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum