Is there a way to see Minecraft's source code?

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

  • a cat

    a cat Correct answer

    9 years ago

    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 source 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 byte code 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.

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM