Looking at the Minecraft Source Code from 2009! (UHD)

  Рет қаралды 18,503

Toby Davis

Toby Davis

Күн бұрын

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
@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
@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
@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
@SMG58901 Жыл бұрын
is it finished?
@nick-yr7wu
@nick-yr7wu 2 жыл бұрын
I just got into coding and this is pretty cool to see how all the code makes up a game
@grayslicer09
@grayslicer09 2 жыл бұрын
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
@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_yt
@vlOd_yt 5 ай бұрын
The second number in the debug output printed every second is the amount of chunk rebuilds done in a second
@user-rf2fv6tf1p
@user-rf2fv6tf1p 7 ай бұрын
the light mode is killing me
@ShaggyCZ
@ShaggyCZ 2 жыл бұрын
Can you decompile the rd-132328 version and show it on video?
@grayslicer09
@grayslicer09 2 жыл бұрын
Maybe
@wigcheesy
@wigcheesy 2 жыл бұрын
where can i download the eclipse version you are using? i couldnt find it in the downloads
@grayslicer09
@grayslicer09 2 жыл бұрын
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
@NickFlick99
@NickFlick99 9 ай бұрын
What program did you use to open the jar file because I kinda want to make a mod on old Minecraft versions
@Aquotin
@Aquotin 9 ай бұрын
how do i open it in eclipse pls help!
@pavupenguin
@pavupenguin Жыл бұрын
Did you change the code? I'm just curious.
@grayslicer09
@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
@pavupenguin Жыл бұрын
@@grayslicer09 I didn't experience that. I just installed the latest LWJGL before this Minecraft version was released and everything worked fine.
@ShaggyCZ
@ShaggyCZ 2 жыл бұрын
What program you used for decompiling the source code?
@grayslicer09
@grayslicer09 2 жыл бұрын
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.
@ahmedhonda
@ahmedhonda 2 жыл бұрын
But how to get the source code?
@grayslicer09
@grayslicer09 2 жыл бұрын
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).
@DrStinks
@DrStinks 2 жыл бұрын
how did you get the source? i really want to get the infdev source
@grayslicer09
@grayslicer09 2 жыл бұрын
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.
@stubaccount
@stubaccount 21 күн бұрын
who is here, Toby?
@grayslicer09
@grayslicer09 17 күн бұрын
I am still here
@EEeeEEee-d5o
@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
@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
@SMG58901 Жыл бұрын
how do i decompile the jar file
@grayslicer09
@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
@SMG58901 Жыл бұрын
@@grayslicer09 ok thanks also how do i recompile? in eclispe
@grayslicer09
@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
@SMG58901 Жыл бұрын
how do i make it runnable in intellij
@grayslicer09
@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_09
@Aeroguy_09 2 жыл бұрын
what code decompiler are you using?
@grayslicer09
@grayslicer09 2 жыл бұрын
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
@Aeroguy_09 Жыл бұрын
@@grayslicer09 but that's not answering my question..
@bc100dev
@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
@Aeroguy_09 Жыл бұрын
@@bc100dev I'm talking about the one he used. Java compiler dosen't even have a run debug thing.
@grayslicer09
@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.
@IndellableHatesHandles
@IndellableHatesHandles 2 жыл бұрын
How is this extremely basic level dropping frames? Is the code horribly unoptimized, or is your computer just not very good?
@grayslicer09
@grayslicer09 2 жыл бұрын
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.
@leninyoutube436
@leninyoutube436 3 жыл бұрын
Where can i get the code?
@grayslicer09
@grayslicer09 3 жыл бұрын
[REMOVED]
@leninyoutube436
@leninyoutube436 3 жыл бұрын
@@grayslicer09 can you look in the referenced libraries?
@leninyoutube436
@leninyoutube436 3 жыл бұрын
also, everything else? like the run configs. what version is LWJGL?
@grayslicer09
@grayslicer09 3 жыл бұрын
@@leninyoutube436 What do you mean when you say "look in the referenced libraries"?
@grayslicer09
@grayslicer09 3 жыл бұрын
@@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
@FerdinandCoding Жыл бұрын
Can you post a download link for this file?
@grayslicer09
@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.
@Aquotin
@Aquotin 8 ай бұрын
I followed instructions but it didnt work can you do a better tutorial perhaps a video?@@grayslicer09
@SMG58901
@SMG58901 Жыл бұрын
and can you give me a source code
@grayslicer09
@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
@SMG58901 Жыл бұрын
T R I G G E R E D
@Aeroguy_09
@Aeroguy_09 Жыл бұрын
Do a tutorial on this
@grayslicer09
@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
@fritzschnitzmueller3768
@fritzschnitzmueller3768 7 ай бұрын
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).
@grayslicer09
@grayslicer09 3 жыл бұрын
This whole video could be wrong and I wouldn't know it. Either way I gave it a shot.
@Coke_Royalty
@Coke_Royalty 2 жыл бұрын
HEY do you know where I could find or how I could deobfuscate Minecraft alpha 1.0.17_04?
@grayslicer09
@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.
@ErkeTan879
@ErkeTan879 6 күн бұрын
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
@PedroHik
@PedroHik 2 жыл бұрын
In my eclipse apears lwjglexception What i can do ? Sorry my English
@grayslicer09
@grayslicer09 2 жыл бұрын
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?
@PedroHik
@PedroHik 2 жыл бұрын
@@grayslicer09 Java.lang.noclassdeffounderror lwjglecxeption This is the error
@grayslicer09
@grayslicer09 2 жыл бұрын
@@PedroHik Your LWJGL version might be too new. Try downloading and using LWJGL version 2.4.2.
@user-plgmgrs326
@user-plgmgrs326 Жыл бұрын
I found interesting a class showing how to create maybe using c++ would be interesting
@grayslicer09
@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
@muhammedkn4351 Жыл бұрын
Where the download link?
@grayslicer09
@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
@DorianC Жыл бұрын
Thank you!
@grayslicer09
@grayslicer09 Жыл бұрын
No problem!
@kappo3740
@kappo3740 3 жыл бұрын
Wait how did you find it?
@grayslicer09
@grayslicer09 3 жыл бұрын
rd-132211 is available from the Minecraft launcher. I decompiled it from that.
@JohnMillerTheThird
@JohnMillerTheThird 2 жыл бұрын
Thank you toby fox!
@dynpallomah5918
@dynpallomah5918 Жыл бұрын
w h a t this is about minecraft, not undertale/deltarune
@grayslicer09
@grayslicer09 Жыл бұрын
I think he's just joking
@devcond1198
@devcond1198 Жыл бұрын
Do you have discord?
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38
Optimizing with "Bad Code"
17:11
Kaze Emanuar
Рет қаралды 212 М.
Do you choose Inside Out 2 or The Amazing World of Gumball? 🤔
00:19
I programmed Minecraft from scratch... again.
11:44
jdh
Рет қаралды 588 М.
I Built a Calculator in Survival Minecraft
29:45
rekrap2
Рет қаралды 2,7 МЛН
Someone improved my code by 40,832,277,770%
28:47
Stand-up Maths
Рет қаралды 2,5 МЛН
I Wrote Minecraft for a Calculator
14:43
The Science Elf
Рет қаралды 1,4 МЛН
Making My Own Programming Language and Coding a Game in It
10:19
AstroSam
Рет қаралды 1,3 МЛН
I found a hidden dimension in Minecraft's code.
5:05
Element X
Рет қаралды 264 М.
The Windows Source Code Revealed: Task Manager (E01)
27:11
Dave's Garage
Рет қаралды 453 М.
Remaking MINECRAFT 2D (Minicraft)
15:46
jdh
Рет қаралды 312 М.
How Minecraft ACTUALLY Works 💎⛏️
46:02
Alan Zucconi
Рет қаралды 1,5 МЛН