npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

resource-pack-converter

v1.6.1

Published

A npm package that provides method to convert Minecraft: Java Edition resource packs from a version to another version.

Downloads

24

Readme

Resource Pack Converter

CircleCI npm License semantic-release Gitmoji

:construction: Still work in progress...

The RPC (Resource Pack Converter) is a npm package which can convert a Minecraft: Java Edition resource pack from any version to another version.

Usage

You can use it via the Command Line Tool or importing it to your project.

Use via Command Line Tool

  1. Make sure you have nodejs installed on your computer.
  2. Execute npm i resource-pack-converter -g in your command line (e.g. PowerShell, cmd, bash, etc.)
  3. TODO

Import it to your Project

  1. Installation.
    npm i resource-pack-converter
  2. Import.
    import { convert } from 'resource-pack-converter'
  3. TODO

File Structure

  • src: Source code written in TypeScript.
  • lib: Output JavaScript files.
  • uti: Some useful tools while coding.
    • analyzer.js: An resource pack analyzer which can find the differences (e.g. file names) between two resource packs (only support folders) and generate conversion files. Use
    npm run uti:analyzer ${fromDir} ${toDir} ${outDir}
    to analyze differences between ${fromDir} and ${toDir}. The result will be stored in uti/analyzer/${outDir}. e.g.
    npm run uti:analyzer uti/input/1.6/ uti/input/1.7/ 1.6-1.7.json

How does it Work

Overview

The RPC will decompressed the input resource pack if it's compressed, and then execute all adapters orderly for each file in the resource pack according to specific conversion. All adapted files will be put in specific path under ${outDir}, so nothing will be changed in the source resource pack.

Adapters

Adapters carry out operations for single file in the resource pack, e.g. renaming, scaling image, changing text content, etc. All adapters are written in TypeScript and should implement the Adapter interface. They are located in ./src/adapters/.

Adapters may be referenced in conversions.

Conversions

A Conversion contains a set of adapters. It's stored in ./src/conversions/.

  • The root tag.
    • adapters: (Required) Array. Contains a set of adapters.
    • from: (Required) String. Specifies the game version which the conversion starts from.
    • to: (Required) String. Specifies the game version which the conversion ends with.

Contributing

I'm thrilled to hear that you'd like to contribute to this project. It's no doubt that the converter will be better with your help!

  1. Fork this this repo and clone it to your local.

  2. Install dependencies.

    npm i

  3. Edit files in ./src.

  4. If you add new features, it's strongly recommend to write tests for them. All tests should be put under ./src/test.

  5. Commit your changes by npm run commit and then push them to the origin.

  6. Open a Pull Request. The circle CI will build and test your changes automatically.

There must be lots of mistakes and bad practice in this repository. If you find something not good or not sure whether it's not good, please don't hesitate to tell me!