How can I see the Minecraft source Java code?

532    Asked by JackGREEN in Java , Asked on Oct 12, 2022

I'm interested in browsing the Minecraft source code and seeing its classes - especially the code controlling the creeper. Is there a way to do that? Maybe open the minecraft.jar file and peek inside?

Answered by Fujiwara Ban

JAR files are simply ZIP files, so you should be able to open them with the archiving tool of your choice. Even Windows Explorer will open them if you change the file extension to .zip.


However, looking at the Minecraft source Java code isn't as easy as just unpacking the archive. It only contains the compiled .class files, and even if you do get your hands on a JVM bytecode decompiler, it's obfuscated and spread out over hundreds of files.

You might want to have a look at MCP (Mod Coder Pack, formerly Minecraft Coder Pack), though. It's a community project that decompiles and (mostly) de-obfuscates the Minecraft sources to aid modders.



Your Answer

Interviews

Parent Categories