Skip to content

Commit

Permalink
Change output format of pack-format <ver>
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixinova committed Aug 10, 2023
1 parent cdee4d6 commit 5b34d06
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## Next
- Changed the CLI output of `pack-format <version>`.

## 1.3.8
*2023-08-06*
- Fixed latest pack format being outdated.
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ pack-format --list [--data|--resource] <pack_format>
Examples:
```console
> pack-format 1.14.4
Pack formats for 1.14.4 are { resource: 4, data: 4 }
Resource pack format of 1.14.4 is 4
Data pack format of 1.14.4 is 4

> pack-format --resource 1.16.2-pre1
Resource pack format of 1.16.2-pre1 is 5
Expand Down
7 changes: 2 additions & 5 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,10 @@ else if (args.latest) {
}
// Print the pack format of a given version
else if (ver) {
if (args.data) {
if (!args.resource) {
console.log(`Data pack format of ${ver} is ${getPackFormat(ver, 'data')}`)
}
else if (args.resource) {
if (!args.data) {
console.log(`Resource pack format of ${ver} is ${getPackFormat(ver, 'resource')}`)
}
else {
console.log(`Pack formats for ${ver} are`, getPackFormats(ver))
}
}

0 comments on commit 5b34d06

Please sign in to comment.