VersionJson.ts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. export interface Rule {
  2. action: string
  3. os?: {
  4. name: string
  5. version?: string
  6. }
  7. features?: {
  8. [key: string]: boolean
  9. }
  10. }
  11. export interface Natives {
  12. linux?: string
  13. osx?: string
  14. windows?: string
  15. }
  16. interface BaseArtifact {
  17. sha1: string
  18. size: number
  19. url: string
  20. }
  21. interface LibraryArtifact extends BaseArtifact {
  22. path: string
  23. }
  24. export interface Library {
  25. downloads: {
  26. artifact: LibraryArtifact
  27. classifiers?: {
  28. javadoc?: LibraryArtifact
  29. 'natives-linux'?: LibraryArtifact
  30. 'natives-macos'?: LibraryArtifact
  31. 'natives-windows'?: LibraryArtifact
  32. sources?: LibraryArtifact
  33. }
  34. }
  35. extract?: {
  36. exclude: string[]
  37. }
  38. name: string
  39. natives?: Natives
  40. rules?: Rule[]
  41. }
  42. export interface VersionJson {
  43. arguments: {
  44. game: string[]
  45. jvm: {
  46. rules: Rule[]
  47. value: string[]
  48. }[]
  49. }
  50. assetIndex: {
  51. id: string
  52. sha1: string
  53. size: number
  54. totalSize: number
  55. url: string
  56. }
  57. assets: string
  58. downloads: {
  59. client: BaseArtifact
  60. server: BaseArtifact
  61. }
  62. id: string
  63. libraries: Library[]
  64. logging: {
  65. client: {
  66. argument: string
  67. file: {
  68. id: string
  69. sha1: string
  70. size: number
  71. url: string
  72. }
  73. type: string
  74. }
  75. }
  76. mainClass: string
  77. minimumLauncherVersion: number
  78. releaseTime: string
  79. time: string
  80. type: string
  81. }
  82. export interface AssetIndex {
  83. objects: {
  84. [file: string]: {
  85. hash: string
  86. size: number
  87. }
  88. }
  89. }