New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

resource-pack-converter

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

resource-pack-converter

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

unpublished
latest
Source
npmnpm
Version
1.6.1
Version published
Maintainers
1
Created
Source

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

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

Import it to your Project

  • Installation.
    npm i resource-pack-converter
    
  • Import.
    import { convert } from 'resource-pack-converter'
    
  • 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!

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

  • Install dependencies.

    npm i

  • Edit files in ./src.

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

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

  • 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!

Keywords

minecraft

FAQs

Package last updated on 07 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts