Prerequisites:
- Ability to decompile class files from minecraft.jar
- Ability to recompile a single java file
- Ability to reintegrate that new class file back into the original jar file
Class used: kh.class
This is not a mod that I'm redistributing. It's a How To, to give a tiny clue as to do a very straightforward thing: reset the time of day to dawn.
Once you have decompiled kh.class, edit the kh.java file and add this in the top with the other import statements:
import org.lwjgl.input.Keyboard;
Inside the g_() method, insert the following lines before the return statement:
if (this instanceof dm)
{
if (Keyboard.isKeyDown(Keyboard.KEY_F4))
{
ag.a(100L);
}
}
Every time you press F4, the time will be reset to something approximating dawn.
I attempted to open kh.class with text editors, but judging by the gibberish that filled my screen I'd say .class files need to be decompiled?
I'm a little drunk and can't be bothered with simple google searches atm, any chance you could release an already modified .class file? I realize that this is against Notch's mod rules but I'm willing to provide proof I bought the game, and no one has to you know you PM'ed me a link :wink.gif:
I attempted to open kh.class with text editors, but judging by the gibberish that filled my screen I'd say .class files need to be decompiled?
I'm a little drunk and can't be bothered with simple google searches atm, any chance you could release an already modified .class file? I realize that this is against Notch's mod rules but I'm willing to provide proof I bought the game, and no one has to you know you PM'ed me a link :wink.gif:
I attempted to open kh.class with text editors, but judging by the gibberish that filled my screen I'd say .class files need to be decompiled?
I'm a little drunk and can't be bothered with simple google searches atm, any chance you could release an already modified .class file? I realize that this is against Notch's mod rules but I'm willing to provide proof I bought the game, and no one has to you know you PM'ed me a link :wink.gif:
The one major rule:
Do not distribute anything I've made. This includes the client and the server software for the game. This also includes modified versions of anything I've made.
Hey I'm not really sure on how to do this, can anyone help a bit? Where/how do I put these into the kh.class file? I opened it with that java decompiler but I'm a little lost.
Hey I'm not really sure on how to do this, can anyone help a bit? Where/how do I put these into the kh.class file? I opened it with that java decompiler but I'm a little lost.
I'm with this guy, I would really like it to be light out so I could finish my wall. :/
Where does the import go? The other section of code looks pretty obvious otherwise. I dunno, but it just black screens my game when I try. (No META-INF files to be deleted)
Add this in the top of your file with the other import statements:
import org.lwjgl.input.Keyboard;
Inside the g_() method, insert the following lines before the return statement:
if (this instanceof dm)
{
if (Keyboard.isKeyDown(Keyboard.KEY_F4))
{
ag.a(100L);
}
}
Every time you press F4, the time will be reset to something approximating dawn.
So I've done this after using the decompiler linked to by "linksbro" but now I need to recompile it. I don't have any kind of jdk installed on my computer, nor do I want to. Could someone just send me the .class file with this modification already done?
Posting the compiled version of the JAR FILE is against the rules
But what could we possibly do with a little .class file? :tongue.gif:
And Advise, shut the hell up, you came up with the idea to redistribute the compiled version of the file, not us.
Posting the compiled version of the JAR FILE is against the rules
But what could we possibly do with a little .class file? :tongue.gif:
And Advise, shut the hell up, you came up with the idea to redistribute the compiled version of the file, not us.
Not sure what you're talking about or why you're mad at me. Maybe I offended you? My bad. Anyways, I'm dedicating the next couple of hours to applying this change to the class file. Be back in a bit.
I'm frustrated as all hell. After decompiling .class files to .java files and editing them, I can't seem to recompile them into .class files without getting errors. Mainly "cannot find symbol" errors. Seriously pissed off atm.
Based on my limited experience in coding, I'm guessing that the decompilation is far from perfect and causes errors I need to clean up myself, or the class file I'm editing is calling on global variables and depends on the rest of the contents of the minecraft.jar
TL;DR - Someone please send me the already compiled class file.
Just redistribute the one class file. Notch doesn't mind that you have to modify and redistribute them to make good mods. ALL of the good mods such as Arrows Mod and all of Risugami's mods are redistributing class files.
Rollback Post to RevisionRollBack
"It's not nice to hate anybody, unless the person you hate is a complete idiot."
Prerequisites:
- Ability to decompile class files from minecraft.jar
- Ability to recompile a single java file
- Ability to reintegrate that new class file back into the original jar file
Class used: kh.class
This is not a mod that I'm redistributing. It's a How To, to give a tiny clue as to do a very straightforward thing: reset the time of day to dawn.
Once you have decompiled kh.class, edit the kh.java file and add this in the top with the other import statements:
Inside the g_() method, insert the following lines before the return statement:
Every time you press F4, the time will be reset to something approximating dawn.
I'm a little drunk and can't be bothered with simple google searches atm, any chance you could release an already modified .class file? I realize that this is against Notch's mod rules but I'm willing to provide proof I bought the game, and no one has to you know you PM'ed me a link :wink.gif:
http://java.decompiler.free.fr/?q=jdgui
Thanks bro, and in the unlikely case you're a girl, broette.
What?
Taken from http://minecraft.net/copyright.jsp
Bookmarked this page and now I will begin making the best mod ever.
I'm with this guy, I would really like it to be light out so I could finish my wall. :/
I don't like waiting. ._.
public boolean g_()
{
Might be wrong, haven't looked at the code closely.
Yep, that is what he means :wink.gif:
So I've done this after using the decompiler linked to by "linksbro" but now I need to recompile it. I don't have any kind of jdk installed on my computer, nor do I want to. Could someone just send me the .class file with this modification already done?
But what could we possibly do with a little .class file? :tongue.gif:
And Advise, shut the hell up, you came up with the idea to redistribute the compiled version of the file, not us.
Not sure what you're talking about or why you're mad at me. Maybe I offended you? My bad. Anyways, I'm dedicating the next couple of hours to applying this change to the class file. Be back in a bit.
Based on my limited experience in coding, I'm guessing that the decompilation is far from perfect and causes errors I need to clean up myself, or the class file I'm editing is calling on global variables and depends on the rest of the contents of the minecraft.jar
TL;DR - Someone please send me the already compiled class file.
http://download.oracle.com/javase/tutorial/getStarted/cupojava/win32.html