Preface
There's an old mod that I used in previous versions of MC (1.3, I think), but it hasn't been updated yet and I don't know if it actually will be. So I've started the arduous task of digging through piles of code to rig a solution. My coding experience is limited to trial-and-error programming on my graphing calculator (on which I actually managed to make a few games). I think I grasp the basics of Java, but the code itself can be a bit overwhelming.
I've been using this thread as a rough guide and have found the current .class file.
Main
As previously stated, my knowledge of Java is limited. I've gone through the two .class files (the old mod one and the current default one) side by side and found the line that redirects a preset variable to the mod's own class file (so d3 = mod_name.variable (the .class file and the variable within that file, if I'm interpreting the code correctly) instead of the default d3 = 0.4000000000000002D (I don't know what the 'D' is for, but I'm sure its use is good and just.). (There are two other places where this same thing happens, but with different variables.) That was the first big difference between the two that I found, but there are other minor differences aside from the new .class file names (I'm guessing that these differences are better/more efficient coding.).
My questions are as follows:
-- If I change just those single lines in the default file, will it work, or do I need to change other lines as well? Do I need to basically reconstruct the mod file with the new class names, and if so, should I replicate all the old coding or just some of it?
-- The current file is xb.class. DJ Java Decompiler can't/won't open it (this is true of a few .class files, all of them x*.class). I can open the resulting .jad file, but the class file itself won't open. Is this a bug in DJJD? Or do I even need to worry about it?
I apologize if this is needlessly verbose; I'm trying to explain things as best I can, but I figure that more detail is better just in case I'm using the wrong terminology or something like that.
Okay, I tried messing with it myself, but I've hit a wall: I can't recompile the .class file. I get
xb.java:519: float cannot be dereferenced
return bm.b(d1, d2, d3);
xb.java:708: reference to a is ambiguous, both method a(rj) in rj and method a(la) in gh match
gh1.a(this);
2 errors
Problem is, I didn't change any of those things. I haven't changed anything, actually.
I guess it's obvious, but it's the xb.class file that I'm having trouble with (and I still can't open several of the x*.class files in DJJD. Possibly a related problem?).
Any ideas?
Okay, I tried messing with it myself, but I've hit a wall: I can't recompile the .class file. I get
xb.java:519: float cannot be dereferenced
return bm.b(d1, d2, d3);
xb.java:708: reference to a is ambiguous, both method a(rj) in rj and method a(la) in gh match
gh1.a(this);
2 errors
Problem is, I didn't change any of those things. I haven't changed anything, actually.
I guess it's obvious, but it's the xb.class file that I'm having trouble with (and I still can't open several of the x*.class files in DJJD. Possibly a related problem?).
Any ideas?
I'm getting lost trying to figure this out. I downloaded MCP but I really have no idea how to use it or even start it.
I read somewhere that DJJD has issues with the version of Java I have so I got a different decompiler, and this one makes a different file than DJJD. It also has many many more errors than the DJJD version. (It said 100, but I'm guessing there are more since it seemed to be naming every single variable.) Most of them are "missing symbol" messages.
I'm not really sure where to turn for any of this. What am I doing wrong?
Any help would be greatly appreciated.
Okay, I think I figured it out. The version of MCP I got didn't have a readme, which is why I couldn't figure it out. I found one online and got everything sorted out (Thanks, MCP!).
Long story short: changing that single variable produced the change I wanted; I didn't need to alter anything else. Unfortunately, now that variable has the new value instead of a redirect. Which means that if I want to change it again, I have to decompile everything, change it, then reassemble everything.
Is there a simple way to have the value pulled from an external text file? So that I can change the value without going into the .jar file?
Okay, I think I'm in the final stretch. The final hurdle (hopefully):
src\minecraft\net\minecraft\src\mod_CartPhysics.java:11: cannot find symbol
symbol : method b()
location: class net.minecraft.client.Minecraft
private static String getAppdata() { return Minecraft.b().getPath(); }
^
What is the b() for? Is there supposed to be a reference in the main Minecraft.java file? Or has the method been renamed by MCP?
EDIT: Figured it out. MCP did indeed rename it, so the link works now. And my little adventure comes to an end, as I've successfully installed the mod into Minecraft.
There's an old mod that I used in previous versions of MC (1.3, I think), but it hasn't been updated yet and I don't know if it actually will be. So I've started the arduous task of digging through piles of code to rig a solution. My coding experience is limited to trial-and-error programming on my graphing calculator (on which I actually managed to make a few games). I think I grasp the basics of Java, but the code itself can be a bit overwhelming.
I've been using this thread as a rough guide and have found the current .class file.
Main
As previously stated, my knowledge of Java is limited. I've gone through the two .class files (the old mod one and the current default one) side by side and found the line that redirects a preset variable to the mod's own class file (so d3 = mod_name.variable (the .class file and the variable within that file, if I'm interpreting the code correctly) instead of the default d3 = 0.4000000000000002D (I don't know what the 'D' is for, but I'm sure its use is good and just.). (There are two other places where this same thing happens, but with different variables.) That was the first big difference between the two that I found, but there are other minor differences aside from the new .class file names (I'm guessing that these differences are better/more efficient coding.).
My questions are as follows:
-- If I change just those single lines in the default file, will it work, or do I need to change other lines as well? Do I need to basically reconstruct the mod file with the new class names, and if so, should I replicate all the old coding or just some of it?
-- The current file is xb.class. DJ Java Decompiler can't/won't open it (this is true of a few .class files, all of them x*.class). I can open the resulting .jad file, but the class file itself won't open. Is this a bug in DJJD? Or do I even need to worry about it?
I apologize if this is needlessly verbose; I'm trying to explain things as best I can, but I figure that more detail is better just in case I'm using the wrong terminology or something like that.
Thanks!
Problem is, I didn't change any of those things. I haven't changed anything, actually.
I guess it's obvious, but it's the xb.class file that I'm having trouble with (and I still can't open several of the x*.class files in DJJD. Possibly a related problem?).
Any ideas?
Are you using MCP?
No, just doing it by hand.
I read somewhere that DJJD has issues with the version of Java I have so I got a different decompiler, and this one makes a different file than DJJD. It also has many many more errors than the DJJD version. (It said 100, but I'm guessing there are more since it seemed to be naming every single variable.) Most of them are "missing symbol" messages.
I'm not really sure where to turn for any of this. What am I doing wrong?
Any help would be greatly appreciated.
Long story short: changing that single variable produced the change I wanted; I didn't need to alter anything else. Unfortunately, now that variable has the new value instead of a redirect. Which means that if I want to change it again, I have to decompile everything, change it, then reassemble everything.
Is there a simple way to have the value pulled from an external text file? So that I can change the value without going into the .jar file?
What is the b() for? Is there supposed to be a reference in the main Minecraft.java file? Or has the method been renamed by MCP?
EDIT: Figured it out. MCP did indeed rename it, so the link works now. And my little adventure comes to an end, as I've successfully installed the mod into Minecraft.
Fin