Skip to content

Commit 5b34d06

Browse files
committed
Change output format of pack-format <ver>
1 parent cdee4d6 commit 5b34d06

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## Next
4+
- Changed the CLI output of `pack-format <version>`.
5+
36
## 1.3.8
47
*2023-08-06*
58
- Fixed latest pack format being outdated.

readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ pack-format --list [--data|--resource] <pack_format>
5555
Examples:
5656
```console
5757
> pack-format 1.14.4
58-
Pack formats for 1.14.4 are { resource: 4, data: 4 }
58+
Resource pack format of 1.14.4 is 4
59+
Data pack format of 1.14.4 is 4
5960

6061
> pack-format --resource 1.16.2-pre1
6162
Resource pack format of 1.16.2-pre1 is 5

src/cli.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,10 @@ else if (args.latest) {
8383
}
8484
// Print the pack format of a given version
8585
else if (ver) {
86-
if (args.data) {
86+
if (!args.resource) {
8787
console.log(`Data pack format of ${ver} is ${getPackFormat(ver, 'data')}`)
8888
}
89-
else if (args.resource) {
89+
if (!args.data) {
9090
console.log(`Resource pack format of ${ver} is ${getPackFormat(ver, 'resource')}`)
9191
}
92-
else {
93-
console.log(`Pack formats for ${ver} are`, getPackFormats(ver))
94-
}
9592
}

0 commit comments

Comments
 (0)