Skip to content

How many lines of code are in Minecraft?

Minecraft is one of the most popular games of all time. Having been launched a decade ago, it’s still going strong with more updates, expansion packs and mods releasing. 

As simple as Minecraft is, it can get very complicated when you start adding things together. Hundreds of blocks, an infinite world, mobs, animals, weather, the absurd amount of things players can craft and the hundreds of different gameplay mechanics, let alone the three worlds themselves. 

If you’re appalled by how the game does all of this and manages to run on pretty much every computer you want, it begs the question, just how many lines of code are there in Minecraft?

Also read: How to make sugar in Minecraft?


Lines of code in Minecraft

Minecraft is closed source, so it’s impossible to say with complete certainty how many lines of code are there to support the game. Besides, “lines of code” itself is a rather vague term. But here’s a vague understanding of the number of lines of code in Minecraft.

For versions over 1.7,2, you can expect around 500,000 lines of code in Minecraft. 

But how did we come to this number? You see, a complete code file will include the code required to run the game, perform logic, display any output and have comments embedded. Chances are, libraries are being used, but since they’re being imported from another file, they don’t exactly add to the “lines of code” number. 

However, that’s not to say we can’t do anything to know the number. To decompile the game, you can use Minecraft’s Coder’s Pack (otherwise known as MCP). Now depending on what you’re counting as “lines of code” and whether or not it includes things like newlines, source files and libraries, you can get an approximate idea for the lines of code present.

Alternatively, you can put the Java Edition of the game through a decompiler and extract lines of code. However, this number will also be somewhere around 500,000 at the moment. 

Also read: How to waterlog in Minecraft?

Hello There!

If you like what you read, please support our publication by sharing it with your friends, family and colleagues. We're an ad-supported publication. So, if you're running an Adblocker, we humbly request you to whitelist us.

We may earn a commission if you buy something from a link on this page. Thanks for your support.







>