Difference between revisions of "Game files"

From wiki.vg
Jump to navigation Jump to search
Line 8: Line 8:
 
Some information on how to properly run said jar is available at
 
Some information on how to properly run said jar is available at
 
   http://s3.amazonaws.com/Minecraft.Download/versions/<version>/<version>.json
 
   http://s3.amazonaws.com/Minecraft.Download/versions/<version>/<version>.json
 +
 +
{{Warning | As the Minecraft launcher updates the format of the JSON or the requirements to run the client may change. The ''minimumLauncherVersion'' in the <version>.json should be used to detect changes instead of just failing on updates}}
  
 
== Libraries ==
 
== Libraries ==
Line 65: Line 67:
 
The game itself downloads further resources from
 
The game itself downloads further resources from
 
  http://resources.download.minecraft.net/
 
  http://resources.download.minecraft.net/
 
A list of all available resources is available as an XML file at the address above. These files do not have to be downloaded in order for the game to function properly.
 
  
 
An index is also available at  
 
An index is also available at  
 
  https://s3.amazonaws.com/Minecraft.Download/indexes/<index>.json  
 
  https://s3.amazonaws.com/Minecraft.Download/indexes/<index>.json  
where index is obtained from the 'assets' field in the versions.json, if this field is missing it defaults to '[https://s3.amazonaws.com/Minecraft.Download/indexes/legacy.json legacy]'. The client currently downloads all resources in the index and stores them in  
+
where index is obtained from the 'assets' field in the versions.json, if this field is missing it defaults to '[https://s3.amazonaws.com/Minecraft.Download/indexes/legacy.json legacy]'. The client currently downloads all resources in the index from
 +
http://resources.download.minecraft.net/<first 2 hex letters of hash>/<whole hash>
 +
and stores them in  
 
  .minecraft/assets/objects/<first 2 hex letters of hash>/<whole hash>
 
  .minecraft/assets/objects/<first 2 hex letters of hash>/<whole hash>
 
and a copy is stored in  
 
and a copy is stored in  

Revision as of 17:28, 4 December 2013

Game

All available version of the game itself are listed on

 http://s3.amazonaws.com/Minecraft.Download/versions/versions.json

The jar file for a specific version is located at

 http://s3.amazonaws.com/Minecraft.Download/versions/<version>/<version>.jar

Some information on how to properly run said jar is available at

 http://s3.amazonaws.com/Minecraft.Download/versions/<version>/<version>.json

Warning.png As the Minecraft launcher updates the format of the JSON or the requirements to run the client may change. The minimumLauncherVersion in the <version>.json should be used to detect changes instead of just failing on updates

Libraries

The libraries which can be used for all minecraft versions and are downloaded by the launcher are located at

 https://libraries.minecraft.net/

The json file downloaded above is used in order to determine which libraries to download. Inside the file is a key, libraries which contains information about each library required. Example:

{
  "name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.1-nightly-20130708-debug3",
  "natives": {
    "linux": "natives-linux",
    "windows": "natives-windows",
    "osx": "natives-osx"
  },
  "extract": {
    "exclude": [
      "META-INF/"
    ]
  },
  "rules": [
    {
      "action": "allow",
      "os": {
        "name": "osx",
        "version": "^10\\.5\\.\\d$"
      }
    }
  ]
}

The name key is used to determine the url from which to download the library from. The format of this string is

<package>:<name>:<version>

The corresponding URL would look like this:

<package>/<name>/<version>/<name>-<version>.jar

where path is the result of replacing all the periods in package with slashes.


The natives key provides a string for each specific platform to be inserted between the .jar and the <version> of the filename, resulting in a filename with the format:

<name>-<version>-<native-string>.jar

This is applied to any file with the natives key.


The extract key provides rules for the extraction of the file.


The rules key is used to determine which platforms to download the file to. When the action is allow, the file will be downloaded to the platform stated in os. When the action is disallow, the file will not be downloaded to the platform stated in os. If there is no os key, the rule is default for non-specified platforms.


In the example above, on an OS X platform, the full download path would be

https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.1-nightly-20130708-debug3/lwjgl-platform-2.9.1-nightly-20130708-debug3-natives-osx.jar

The file would be extracted but the META-INF file would not be. Additionally, the file would only be downloaded if the computer was running OS X 10.5.

Assets

The game itself downloads further resources from

http://resources.download.minecraft.net/

An index is also available at

https://s3.amazonaws.com/Minecraft.Download/indexes/<index>.json 

where index is obtained from the 'assets' field in the versions.json, if this field is missing it defaults to 'legacy'. The client currently downloads all resources in the index from

http://resources.download.minecraft.net/<first 2 hex letters of hash>/<whole hash>

and stores them in

.minecraft/assets/objects/<first 2 hex letters of hash>/<whole hash>

and a copy is stored in

.minecraft/asserts/virtual/legacy/ 

in the old format for versions that don't support the new system (1.7.2 and below)