I took a short look at the decompiled source code from one of the first versions of Minecraft! This is an older video that I decided to reupload since in the original the text on screen was barely readable.
Пікірлер: 87
@dsnahogaragames Жыл бұрын
I've took my decompiled minecraft test version "2009" and turned it into an action MMO, platform/combat focused game, lmao.. "coded also some AI for it"
@dsnahogaragames Жыл бұрын
@@Epical_TV Not yet! Still doing the works, part of it now is to "refactor" the old 3D renderer into a modern opengl one, let's say Notch was a lot into "outdated" 3d techniques. Not sure how is this going to end up, or if even is it going to be "minecraft" anymore hehe.
@grayslicer09 Жыл бұрын
Oh hey DS! Long time no see! I think I actually remember seeing footage of this. I'd be interested to see further development on this Minecraft MMO lol. Either way, good to hear from you again. I think the last time we talked was on Discord and you were showing me your LD48 horror game, which looked pretty cool :)
@SMG58901 Жыл бұрын
is it finished?
@nick-yr7wu2 жыл бұрын
I just got into coding and this is pretty cool to see how all the code makes up a game
@grayslicer092 жыл бұрын
Yeah it's really cool! Just be sure to take it slow and learn the basics before trying to jump in and make a game.
@keegan1863 Жыл бұрын
Wow! I've been messing around with MCP on alpha 1.2.6 and it's crazy how much simpler the game and its code was in this stage. Might be worthwhile to try looking into these older versions to study some of the game's fundamentals.
@vlOd_yt5 ай бұрын
The second number in the debug output printed every second is the amount of chunk rebuilds done in a second
@user-rf2fv6tf1p7 ай бұрын
the light mode is killing me
@ShaggyCZ2 жыл бұрын
Can you decompile the rd-132328 version and show it on video?
@grayslicer092 жыл бұрын
Maybe
@wigcheesy2 жыл бұрын
where can i download the eclipse version you are using? i couldnt find it in the downloads
@grayslicer092 жыл бұрын
In the video I'm using Eclipse Indigo. You can find the download from eclipse.org for it by searching for "eclipse indigo download" or by using this link: www.eclipse.org/downloads/packages/release/indigo/sr2
@NickFlick999 ай бұрын
What program did you use to open the jar file because I kinda want to make a mod on old Minecraft versions
@Aquotin9 ай бұрын
how do i open it in eclipse pls help!
@pavupenguin Жыл бұрын
Did you change the code? I'm just curious.
@grayslicer09 Жыл бұрын
Kind of. The raw code that came out of the decompilation process did not work and had several errors that preventing the application from compiling. These errors obviously did not exist in the original code that Notch wrote in 2009, otherwise he wouldn't have been able to compile a working .JAR file. In order to fix this I simply applied the fixes suggested by Eclipse. When hovering over invalid code with your mouse (denoted by a red underline), Eclipse will show a pop-up with a couple of fixes that it thinks can solve the issue. All I had to do was click on the one I thought would work (usually the first one in the list does the job). This was the extent of my modifications to the game's code. No actual game logic was changed.
@pavupenguin Жыл бұрын
@@grayslicer09 I didn't experience that. I just installed the latest LWJGL before this Minecraft version was released and everything worked fine.
@ShaggyCZ2 жыл бұрын
What program you used for decompiling the source code?
@grayslicer092 жыл бұрын
I believe I used an online decompiler, which utilized the JAD Java decompiler. You can also use programs like JD-GUI, but you might want to use an older version depending on the age of your Java program. If one decompiler doesn't work, just try another.
@ahmedhonda2 жыл бұрын
But how to get the source code?
@grayslicer092 жыл бұрын
You can decompile the older unobfuscated minecraft.jar files with any Java decompiler. I've foind that JD-GUI (older builds) or anything that uses JAD should do the trick. Keep in mind you may need to fix a few things in the code, but those fixes should be suggested by Eclipse once you've got the source in the IDE with all the libraries (LWJGL).
@DrStinks2 жыл бұрын
how did you get the source? i really want to get the infdev source
@grayslicer092 жыл бұрын
I decompiled it with a Java decompiler. Since the oldest versions of Minecraft weren't obfuscated it makes them very easy to decompile without having to worry about things like scrambled variable names. Unfortunately by infdev I believe Notch had already started to obfuscate the game's code before each release. The oldest Minecraft Coder Pack available only goes back to the Alpha releases. So you'd pretty much be on your own here. Yes you can decompile infdev but you will have the problem of all the names for class references and variable names being changed to random alphabetical characters (it should still work though, but I could be wrong). Unless someone has released a program that can deobfuscate the infdev source then you'd have to sort through it and rename everything yourself.
@stubaccount21 күн бұрын
who is here, Toby?
@grayslicer0917 күн бұрын
I am still here
@EEeeEEee-d5o Жыл бұрын
May i have the source code? I already have all the needed things for it, like lwjgl, and those things, I just need the source code. If you can give it to me either via email, or the reply, I'd be really thankful.
@grayslicer09 Жыл бұрын
Sorry but I can't give out the decompiled source code since that goes against Mojang's EULA. I've left some instructions here if you want to try decompiling the game yourself: pastebin.com/DgUXingL
@SMG58901 Жыл бұрын
how do i decompile the jar file
@grayslicer09 Жыл бұрын
I've found that a Java decompiler like JD-GUI (older builds) or anything that uses JAD should do the trick. Keep in mind you may need to fix a few things in the code, but those fixes should be suggested by Eclipse once you've got the source in the IDE with all the libraries (LWJGL).
@SMG58901 Жыл бұрын
@@grayslicer09 ok thanks also how do i recompile? in eclispe
@grayslicer09 Жыл бұрын
@@SMG58901 I know you can run it in Eclipse, but I was actually never able to re-compile the game back into a JAR file. It's probably something small I'm missing, so just look up how to build LWJGL Java applications and include the LWJGL libraries.
@SMG58901 Жыл бұрын
how do i make it runnable in intellij
@grayslicer09 Жыл бұрын
@@SMG58901 Honestly I'm not sure, I haven't used IntelliJ for this purpose. I would first familiarize yourself with IntelliJ, and then look up tutorials for using LWJGL with IntelliJ and how to import source code. There's a wealth of knowledge out there for all sorts of programs.
@Aeroguy_092 жыл бұрын
what code decompiler are you using?
@grayslicer092 жыл бұрын
Hey there, I got a similar comment a while ago, so I'll copy and paste my response to that comment here: I believe I used an online decompiler, which utilized the JAD Java decompiler. You can also use programs like JD-GUI, but you might want to use an older version depending on the age of your Java program. If one decompiler doesn't work, just try another.
@Aeroguy_09 Жыл бұрын
@@grayslicer09 but that's not answering my question..
@bc100dev Жыл бұрын
@@Aeroguy_09 Java Compiler is like C/C++ compiler. The code is not exact as you wrote, so the programs try to reverse compile (or decompile) the Java Source Code, since it can be easily decompiled rather than C/C++ code.
@Aeroguy_09 Жыл бұрын
@@bc100dev I'm talking about the one he used. Java compiler dosen't even have a run debug thing.
@grayslicer09 Жыл бұрын
@@Aeroguy_09 You asked "what code decompiler are you using?", however based on your latest comment it seems you meant what code COMPILER am I using. I used Eclipse Indigo to run the code in the video, and the reason you don't see any debug info is because I didn't run it in debug mode.
@IndellableHatesHandles2 жыл бұрын
How is this extremely basic level dropping frames? Is the code horribly unoptimized, or is your computer just not very good?
@grayslicer092 жыл бұрын
It's nothing to do with the game and everything to do with my screen capture. When I set Open Broadcaster Software to record my entire screen via Software Capture the performance tends to take a nosedive.
@leninyoutube4363 жыл бұрын
Where can i get the code?
@grayslicer093 жыл бұрын
[REMOVED]
@leninyoutube4363 жыл бұрын
@@grayslicer09 can you look in the referenced libraries?
@leninyoutube4363 жыл бұрын
also, everything else? like the run configs. what version is LWJGL?
@grayslicer093 жыл бұрын
@@leninyoutube436 What do you mean when you say "look in the referenced libraries"?
@grayslicer093 жыл бұрын
@@leninyoutube436 Everything needed to launch the game from Eclipse is included in the download. The class that executes the game is RubyDung.java and the LWJGL version included with the download is version 2.4.2
@FerdinandCoding Жыл бұрын
Can you post a download link for this file?
@grayslicer09 Жыл бұрын
No since it is not permitted to distribute Mojang's copyrighted code. You'll have to decompile it yourself. I made a PasteBin containing some instructions that I wrote around the same time that this video was posted here: pastebin.com/DgUXingL Hopefully this is of some help to you.
@Aquotin8 ай бұрын
I followed instructions but it didnt work can you do a better tutorial perhaps a video?@@grayslicer09
@SMG58901 Жыл бұрын
and can you give me a source code
@grayslicer09 Жыл бұрын
Sorry but I cannot, it is against Mojang's EULA to distribute the game's source code. You can get the JAR file for this version from the Minecraft launcher and decompile it yourself though.
@SMG58901 Жыл бұрын
T R I G G E R E D
@Aeroguy_09 Жыл бұрын
Do a tutorial on this
@grayslicer09 Жыл бұрын
Perhaps. For the moment though you can check this PasteBin for some instructions that I wrote around the same time that I posted this video: pastebin.com/DgUXingL
@fritzschnitzmueller37687 ай бұрын
The AABB class is probably a axis aligned bounding box, a datastructure used to accelerate computations (often intersections or collisions) of map objects (e.g. player) with the environments or other map objects. Its not handling the physics itself but it speeds up physic computations. Imagine you fire an arrow into the air. The game then computes the arrow trajectory and you checks for each time step if the arrow collides with any of your map objects. If you do this in a primitive/simple way, it would mean you need to check if your arrow collides with ANY block/object in the current chunk or any neighboring chunks. Using an axis aligned bounding box, you can quickly filter out the blocks/objects which are rather far away from the arrow trajectory. This immensly reduced the amount of exact collision computations you have to do (which are often costly distance computations).
@grayslicer093 жыл бұрын
This whole video could be wrong and I wouldn't know it. Either way I gave it a shot.
@Coke_Royalty2 жыл бұрын
HEY do you know where I could find or how I could deobfuscate Minecraft alpha 1.0.17_04?
@grayslicer09 Жыл бұрын
@@Coke_Royalty Minecraft Alpha 1.0.17_04's jar can be found by searching for it on mcversions.net. You'll also need the resources folder that comes with the game. Since the original alpha-era resources can no longer be downloaded, you'll need to find them online (www.minecraftforum.net/forums/archive/legacy-support/1732902-heres-a-zip-of-resources-folder-pre-saturday or archive.org/details/MinecraftAlphaResources should work). As for actually de-compiling and de-obfuscating the game, you may find it quite a challenge. The Minecraft Coder Pack (minecraft.fandom.com/wiki/Tutorials/Programs_and_editors/Mod_Coder_Pack), which is what was used for modding the older versions of the game, only supports back to Alpha 1.1.2_01, so it cannot de-compile and de-obfuscate Alpha 1.0.17_04 for you. You could try de-compiling the jar manually, but without the coder pack you will have no variable names, no function names, and the game may not even work.
@ErkeTan8796 күн бұрын
I'm sorry, I don't understand English well and I'm writing from a translator. Where can I find this code since I didn't understand it from the video
@PedroHik2 жыл бұрын
In my eclipse apears lwjglexception What i can do ? Sorry my English
@grayslicer092 жыл бұрын
If I had to guess the LWJGL libraries are either not present or were not added to the build path, but I can't know without more details. Can you copy and paste the entire error into PasteBin and reply with the link?
@PedroHik2 жыл бұрын
@@grayslicer09 Java.lang.noclassdeffounderror lwjglecxeption This is the error
@grayslicer092 жыл бұрын
@@PedroHik Your LWJGL version might be too new. Try downloading and using LWJGL version 2.4.2.
@user-plgmgrs326 Жыл бұрын
I found interesting a class showing how to create maybe using c++ would be interesting
@grayslicer09 Жыл бұрын
@@user-plgmgrs326 Oh yeah Minecraft can totally be made in C++. The console versions of Minecraft were actually made in C++ as far as I'm aware (due to the lack of Java support on consoles). KZbinr Hopson actually made a video series on this where he made Minecraft in C++ and OpenGL (it's not an actual tutorial though): kzbin.info/aero/PLMZ_9w2XRxiYzEuz4klbm8ZR7BfjueoN2
@muhammedkn4351 Жыл бұрын
Where the download link?
@grayslicer09 Жыл бұрын
There is no download link since it is prohibited to distribute Mojang's copyrighted code. If you want to look at Minecraft rd-132211's source code, you'll have to decompile it yourself. Hopefully this PasteBin can be of some help: pastebin.com/DgUXingL
@DorianC Жыл бұрын
Thank you!
@grayslicer09 Жыл бұрын
No problem!
@kappo37403 жыл бұрын
Wait how did you find it?
@grayslicer093 жыл бұрын
rd-132211 is available from the Minecraft launcher. I decompiled it from that.
@JohnMillerTheThird2 жыл бұрын
Thank you toby fox!
@dynpallomah5918 Жыл бұрын
w h a t this is about minecraft, not undertale/deltarune