Guest User

Untitled

a guest
Dec 19th, 2018
3,708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.29 KB | None | 0 0
  1. '''launcher_profiles.json''' is a [[JSON]] file located in [[.minecraft]], which contains all the [[Minecraft launcher]] settings, profiles, selected user/profile as well as the cached user information (email, access token, etc). This file allows flexible updating from older launcher versions to newer builds and vice versa, without having to worry about things like profiles and login session getting lost.
  2. ==General file structure==
  3. '''launcher_profiles.json''' uses JSON structures to save and retrieve data. The main JSON keys are explained in the figure below.
  4. {| class="wikitable sortable"
  5. |+
  6. !Key
  7. !Type
  8. !Descrption
  9. |-
  10. |profiles
  11. |Map
  12. |All the launcher profiles and their configurations.
  13. |-
  14. |clientToken
  15. |String
  16. |The currently logged in client token.
  17. |-
  18. |authenticationDatabase
  19. |Map
  20. |All the logged in accounts. Every account in this key contains a UUID-hashed map (which is used to save the selected user) which in turn includes the access token, e-mail, and a profile (which contains the account display name)
  21. |-
  22. |launcherVersion
  23. |Map
  24. |Contains the current launcher build name, format and profiles format.
  25. |-
  26. |settings
  27. |Map
  28. |Contains all the launcher settings
  29. |-
  30. |analyticsToken
  31. |String
  32. |???
  33. |-
  34. |analyticsFailcount
  35. |Integer
  36. |???
  37. |-
  38. |selectedUser
  39. |Map
  40. |Contains the UUID-hashed account and the UUID of the currently selected user
  41. |}Every ''Map'' structure will be explained in its own section below.
  42. ==Profiles structure==
  43. Profiles are saved in a map in the '''profiles''' section. A profile structure is explained in the table below:
  44. {| class="wikitable"
  45. |+
  46. !Key
  47. !Type
  48. !Description
  49. |-
  50. |name
  51. |String
  52. |The profile name. Can include characters, numbers, punctuation, and whitespace
  53. |-
  54. |type
  55. |String
  56. |The profile type. Types are '''custom''' (manually created by the user), '''latest-release''' (uses the latest stable release), and '''latest-snapshot''' (uses the latest build of Minecraft).
  57. |-
  58. |created
  59. |String
  60. |An [[wikipedia:ISO_8601|ISO 8601]] formatted date which represents the time the profile was created.
  61. |-
  62. |lastUsed
  63. |String
  64. |An [[wikipedia:ISO_8601|ISO 8601]] formatted date which represents the last time the profile was used.
  65. |-
  66. |icon
  67. |String
  68. |An [[wikipedia:ISO_8601|Base64]]-encoded image which represents the icon of the profile in the profiles menu.
  69. |-
  70. |lastVersionId
  71. |String
  72. |The version ID that the profile targets. Version IDs are determined in the version.json in every directory in ~/versions
  73. |-
  74. |gameDir
  75. |String
  76. |The directory that this profile should use to save its content.
  77. |-
  78. |javaDir
  79. |String
  80. |The Java directory that the game will run on. This is by default the system's Java directory.
  81. |-
  82. |javaArgs
  83. |String
  84. |The start-up arguments for the profile. Those can have tangible experience in the game performance.
  85. |-
  86. |logConfig
  87. |String
  88. |The path to the logging configuration for the profile. This can be a XML file if the below setting is true
  89. |-
  90. |logConfigIsXML
  91. |Boolean
  92. |Whether the logging configuration is a XML file or not.
  93. |}
  94. ==Authentication database structure==
  95. Authentication database is saved in the '''authenticationDatabase''' section. Structure is explained below:
  96.  
  97. The authentication database consists of '''UUID-hashed keys''' for all the logged in users. Every logged in user has its own key which is then used in saving things like the currently selected user, etc.
  98.  
  99. Every authenticated key consists of a couple of values, which are explained in the figure below.
  100. {| class="wikitable"
  101. |+
  102. !Key
  103. !Type
  104. !Description
  105. |-
  106. |accessToken
  107. |String
  108. |The token which saves the log-in sessions.
  109. |-
  110. |username
  111. |String
  112. |The e-mail of the account.
  113. |-
  114. |profiles
  115. |Map
  116. |The profile of the account. This map will contain the UUID of the account, and contain the display name of it.
  117. |}
  118. ==Launcher version structure==
  119. The launcher version is saved in its own section in the JSON file ('''launcherVersion'''). It has a couple of values which contain information about the currently used build of the launcher. Every time a specific version of a launcher is ran, those values are updated to fit the latest-used launcher. This section allows better compatibility between launcher versions as well as update checking.
  120.  
  121. Launcher version keys are explained below:
  122. {| class="wikitable"
  123. |+
  124. !Key
  125. !Type
  126. !Description
  127. |-
  128. |name
  129. |String
  130. |The current name of the launcher build
  131. |-
  132. |format
  133. |Integer
  134. |???
  135. |-
  136. |profilesFormat
  137. |Integer
  138. |???
  139. |}
  140. ==Settings structure==
  141. This is one of the most important sections in the file. It contains all the settings controlled from the launcher, and is saved in the '''settings''' section. Every option is explained in the table below.
  142. {| class="wikitable"
  143. |+
  144. !Key
  145. !Type
  146. !Description
  147. |-
  148. |enableSnapshots
  149. |Boolean
  150. |Whether or not include version IDs of game snapshots when browsing profiles
  151. |-
  152. |enableAdvanced
  153. |Boolean
  154. |Whether or not enable changing advanced Java settings when adding new launch arguments
  155. |-
  156. |keepLauncherOpen
  157. |Boolean
  158. |Whether or not keep the launcher open while the game is running
  159. |-
  160. |showGameLog
  161. |Boolean
  162. |Whether or not create a separate window which contains all the game logs
  163. |-
  164. |locale
  165. |String
  166. |The selected language for the launcher. Default value is '''en-us'''.
  167. |-
  168. |showMenu
  169. |Boolean
  170. |Whether or not show the sliding menu under the Minecraft logo (which contains '''News''', '''Skins''', '''Settings''' and '''Launch options''').
  171. |-
  172. |enableHistorical
  173. |Boolean
  174. |Whether or not enable the usage of historical versions
  175. |-
  176. |profileSorting
  177. |String
  178. |The way profiles are sorted in the profiles menu. There are 2 sorting types: '''byName''' and '''byLastPlayed'''. byName sorts them on the alphabetical order, and byLastPlayed sorts them based on the latest profiles you used.
  179. |-
  180. |crashAssistance
  181. |Boolean
  182. |Whether or not contact Mojang when a crash occurs
  183. |-
  184. |enableAnalytics
  185. |Boolean
  186. |???
  187. |}
  188. ==Selected user structure.==
  189. The selected user section stores information about the currently selected profile and the selected account. As mentioned above, accounts are stored as UUID-hashed keys. Then they are used for saving here
  190.  
  191. The keys are explained in the figure below.
  192. {| class="wikitable"
  193. |+
  194. !Key
  195. !Type
  196. !Description
  197. |-
  198. |account
  199. |String (UUID)
  200. |The UUID-hashed key of the currently selected account
  201. |-
  202. |profile
  203. |String (UUID)
  204. |The UUID of the currently selected player
  205. |}
Advertisement
Add Comment
Please, Sign In to add comment