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

mcds-convert

v0.5.0

Published

Converts a single data file to zipped Minecraft datapack or reverse.

Downloads

1

Readme

Minecraft Data File to DataPack Converter

This is a simple utility that transforms a single "data file" into zipped Minecraft datapack or reverse, make easier to edit/create. The data file could be either JSON format or YAML format.

The structure of the data file looks like this (in JSON form, YAML is similar):

{
  "pack": {
    "version": 1,
    "description": "Meta data written inside pack.mcmeta"
  },
  "functions": {
    "namespace:path/to/function": [
      // the content of .mcfunction file here.
      // It can be array of string (one command per entry),
      // or plain string contents.
    ],
    // Any path starts with # indicates this is a tag definition
    // (As in references of commands)
    "#namespace:path/to/sometag": {
      "values": [
        // Tags can be here too
      ]
    }
  },
  // Below are all supported categories
  // To define, just embed the JSON data as the value of the namespaced ID.
  "advancements": {
    // Advancements
  },
  "loot_tables": {
    // Loot Tables
  },
  "predicates": {
    // Predicates
  },
  "receipes": {
    // Receipes
  },
  "structures": {
    // Structures (experimental), may be one of following:
    // - URL (can be in file/http(s)/data URI scheme)
    // - File path (can be absolute/relative/local/remote)
    // - Stringified NBT string (The format used in commands)
    // - Raw binary tag (YAML only)
  },
  "dimension_type": {
    // Dimension types (>= 1.16.2)
  },
  "dimension": {
    // Dimension data (>= 1.16.2)
  },
  "worldgen/biome": {
    // World Generator Specific Definitions (>= 1.16.2)
  },
  "worldgen/configured_carver": {
    // World Generator Specific Definitions (>= 1.16.2)
  },
  "worldgen/configured_feature": {
    // World Generator Specific Definitions (>= 1.16.2)
  },
  "worldgen/configured_structure_feature": {
    // World Generator Specific Definitions (>= 1.16.2)
  },
  "worldgen/configured_surface_builder": {
    // World Generator Specific Definitions (>= 1.16.2)
  },
  "worldgen/noise_settings": {
    // World Generator Specific Definitions (>= 1.16.2)
  },
  "worldgen/processor_list": {
    // World Generator Specific Definitions (>= 1.16.2)
  },
  "worldgen/template_pool": {
    // World Generator Specific Definitions (>= 1.16.2)
  },
  "blocks": {
    // Tag Definitions for Blocks
  },
  "entity_types": {
    // Tag Definitions for Entity Types
  },
  "fluids": {
    // Tag Definitions for Fluids
  },
  "items": {
    // Tag Definitions for Item tags
  }
}

CLI Usage

It is pending to be submitted on to NPM, in the mean while, clone the repository, setup the npm environment and call node /path/to/repository instead.

$ mcds pack datafile.json ~/.minecraft/saves/world/datapack/somedatapack.zip
$ mcds unpack ~/.minecraft/saves/world/datapack/somedatapack.zip datafile.yml

License

MIT