Giter Club home page Giter Club logo

pack-format's Introduction

Latest version npm downloads Last updated

pack-format

pack-format is a tool for retrieving the pack_format of any Minecraft version, including snapshots.

Updated for: 1.20.6 & 24w18a

About

pack_format is a version number used by Minecraft in both resource packs and data packs for labeling compatible versions. It was added in Minecraft version 1.6, and as such using this tool on any version prior to that will just return undefined.

Install

pack-format is available on npm. You must have Node.js installed to be able to use this.

To install pack-format, open the command line and type npm install pack-format to use for a Node.js project, or npm install -g pack-format to use from the command line.

Usage

Node

Retrieve the pack_format of a given Minecraft version, optionally specifying whether the resource (default) or data pack version should be returned.

const packFormat = require('pack-format')
packFormat('1.14.4') // 4
packFormat('1.16.2-pre1', 'resource') // 5
packFormat('20w45a', 'data') // 6
packFormat.LATEST.data // 39

Retrieve a list of versions corresponding to a specific pack_format, again optionally specifying resource/data pack version.

const {getVersions} = require('pack-format')
getVersions(3) // { releases: { min: '1.11.x', max: '1.12.x' }, snapshots: { min: '16w32a', max: '17w47a' } }
getVersions(6, 'data') // { releases: { min: '1.15.x', max: '1.16.1' }, snapshots: { min: '20w06a', max: '20w44a' } }

Command line

Retrieve both the resource and data pack_format of a given Minecraft version:

pack-format [--data|--resource] <version>

Retrieve a list of corresponding Minecraft versions:

pack-format --list [--data|--resource] <pack_format>

Examples:

> pack-format 1.14.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

> pack-format --data 20w45a
Data pack format of 20w45a is 6

> pack-format --list --resource 3
{ releases: { min: '1.11.x', max: '1.12.x' }, snapshots: { min: '16w32a', max: '17w47a' } }

pack-format's People

Contributors

cohenerickson avatar nixinova avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

cohenerickson

pack-format's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.