Skip to content

Commit

Permalink
Update data pack format to 39
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixinova committed Apr 15, 2024
1 parent 62f4e49 commit 95a0c0a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Next
- Updated resource pack format to `31`.
- Updated data pack format to `39`.
- Fixed data pack format for 24w12a and 24w13a.

## 1.3.13
*2024-03-15*
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const packFormat = require('pack-format')
packFormat('1.14.4') // 4
packFormat('1.16.2-pre1', 'resource') // 5
packFormat('20w45a', 'data') // 6
packFormat.LATEST.data // 35
packFormat.LATEST.data // 39
```

Retrieve a list of versions corresponding to a specific `pack_format`, again optionally specifying resource/data pack version.
Expand Down
8 changes: 5 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const START_RELEASES: Record<VersionName, Record<PackType, FormatResult>> = {
'1.20.x': { resource: 15, data: 15 },
'1.20.2': { resource: 18, data: 18 },
'1.20.3': { resource: 22, data: 26 },
'1.20.5': { resource: undefined, data: undefined },
'1.20.5': { resource: 31, data: 39 },
'1.21.x': { resource: undefined, data: undefined },
}

Expand Down Expand Up @@ -63,8 +63,9 @@ const START_SNAPSHOTS: Record<string, Record<PackType, FormatResult>> = {
'24w09a': { resource: 28, data: 33 },
'24w10a': { resource: 28, data: 34 },
'24w11a': { resource: 29, data: 35 },
'24w12a': { resource: 30, data: 35 },
'24w13a': { resource: 31, data: 35 },
'24w12a': { resource: 30, data: 36 },
'24w13a': { resource: 31, data: 37 },
'24w14a': { resource: 31, data: 38 },
[fauxCurrentSnapshot]: { resource: undefined, data: undefined },
}

Expand All @@ -79,6 +80,7 @@ const SPECIAL: Record<PackType, Record<number, string[]>> = {
4: ['combat1', 'combat2', 'combat3'],
5: ['combat4', 'combat5'],
6: ['combat6', 'combat7a', 'combat7b', 'combat8a', 'combat8b', 'combat8c'],
39: ['1.20.5-pre1'],
},
}

Expand Down
8 changes: 6 additions & 2 deletions test/pack-formats-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,13 @@ Types:
"24w11a" (r) 29
"24w11a" (d) 35
"24w12a" (r) 30
"24w12a" (d) 35
"24w12a" (d) 36
"24w13a" (r) 31
"24w13a" (d) 35
"24w13a" (d) 37
"24w14a" (r) 31
"24w14a" (d) 38
"1.20.5-pre1" (r) 31
"1.20.5-pre1" (d) 39

=== Special cases ===

Expand Down

0 comments on commit 95a0c0a

Please sign in to comment.