Arqade is a question and answer site for passionate videogamers on all platforms. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
BTW, Minecraft wasn't just made from scratch in Eclipse, it's an LWJGL game. – a cat Feb 26 '12 at 15:31
Welcome to the site, parioscreations. I took the liberty of changing the wording of your question to make it on-topic here (and also removed irrelevant parts in the process). We don't really cater for "how can I open .jar files" - that's not actually gaming-related - but your general desire to see Minecraft's source-code is slightly more on-topic. – Oak Feb 26 '12 at 15:46
For the down voters / closers, see this similiar question which has not been closed / down voted. – Wipqozn Feb 26 '12 at 15:48
I feel pretty bad, was this a stupid question? – parion Feb 26 '12 at 16:14
@parioscreations Your original question wasn't stupid, it just wasn't on-topic for our site. – Wipqozn Feb 27 '12 at 23:40
up vote 24 down vote accepted

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.

share|improve this answer
Darn. Well, can't find much here anyways. Wanted to know what made a creeper tick :( – parion Feb 26 '12 at 15:31
@KonradRudolph I don't think it's legal. Redistribution is the one thing the Minecraft terms really forbid. However, they don't distribute the sources, they just give you a tool you can use on your own copy of Minecraft. – a cat Feb 26 '12 at 18:38
@lunboks It's a bit of an age-old question - "We're not allowed into this bank vault, but we managed to obtain a copy of the key. I'll just leave it right here in case anyone needs it." – Alex Sep 17 '12 at 8:23
MCP is legal. They only distribute a set of translation tables and a script that runs them against your own jar files copied out of your Minecraft install. Decompiling and reverse engineering have been challenged in the courts and confirmed as legal activities in all the Bern Convention countries I'm aware of. – SevenSidedDie Apr 20 '13 at 20:09
Yeah it's legal. It's just as legal as opening the hood of your car and doing whatever you want in there. It's your car and you're free to modify it. At least with Minecraft you can back it up before you screw it up :P – Chev Mar 14 '14 at 21:57

There's a way to do this; in fact, this way as well allows you to edit the code and... make your own mods! It's called MCP (Minecraft Coders' Pack), and is a bit of a complicated setup, but it is how nearly all Minecraft mods are made. Check out a video I made on YouTube on setting up and installing it:

share|improve this answer
That video showed what to do, but was extremely frustrating to watch. – Phoexo Jun 24 '13 at 17:58

Interestingly enough, mention of source code release comes straight from the minecraft website.

"Once sales start dying and a minimum time has passed, I will release the game source code as some kind of open source. I'm not very happy with the draconian nature of (L)GPL, nor do I believe the other licenses have much merit other than to boost the egos of the original authors, so I might just possibly release it all as public domain."

share|improve this answer
Despite that this is the reason why I bought Minecraft in the first place, I start to doubt that this is going to happen within the next decade...if ever. So, yeah, I wouldn't hold my breathe. – Bobby Jul 15 '12 at 17:06
Yeah I saw this too. But Minecraft will never die. – parion Jul 16 '12 at 19:01
It is dead. Microsoft has bought it. Hahaha – Winger Sendon Oct 16 '15 at 13:45

protected by fredley May 28 '13 at 8:39

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.