Minecraft.jar

From Minecraft Wiki
For the front-end Minecraft client, see Minecraft launcher.

minecraft.jar is the main code source for Minecraft. It is located in the %appdata%/.minecraft/versions/(current version) directory on Windows, the ~/Library/Application Support/minecraft/versions/(current version) directory in macOS, or ../Minecraft/versions/(current version) on Linux. When using the latest version of the Minecraft launcher, it is named <gameversion>.jar.

It can be opened using a file archiving program or a Java decompiler.

Jar versions[edit | edit source]

The minecraft.jar file is found in its version folder. It is accompanied by a .json file that lists the version's attributes. Normal and snapshot versions are available to choose from via the Minecraft launcher. It's even possible to download alpha versions and create one's own version file to install mods on. Note that creating a new version is the only way to install mods; the launcher keeps normal versions synced.

Files in minecraft.jar[edit | edit source]

In minecraft.jar many files can be found and they can be categorized like this:

  • Texture files: contains textures used by the game (all in .png format).
  • Class files: compiled Java code that Minecraft uses for program logic. These files (classes) have such as "acq" or "qn" because they have been run through an obfuscation tool to hide the names of methods, variables, and classes. However, they can still be disassembled to understand their functionality.
  • The META-INF directory: contains information about the game files.
  • Language files: contains translations of the game's text and resources into various languages (all in .json format)
  • Resource pack files: Contents that are in the vanilla resource pack, located in the assets directory:
    • .mcassetsroot: Used for identifying vanilla resources
    • realms folder: Contains the textures and language file used by Realms
    • minecraft: Resources for the minecraft namespace
  • Data pack files: Contents that are in the vanilla data pack, located in the data directory.
    • .mcassetsroot: Used for identifying vanilla datas
    • minecraft: Datas for the minecraft namespace
  • pack.mcmeta: Metadata for both vanilla resource and data packs.
  • pack.png: Icon for both vanilla resource and data packs
  • version.json Contains some basic information of this version.