Skip to content
This repository has been archived by the owner on Jan 31, 2022. It is now read-only.
/ vanilla-datapack Public archive

Version-controlled history of Minecraft's vanilla data pack.

License

Notifications You must be signed in to change notification settings

SPGoding/vanilla-datapack

Repository files navigation

-! This Repository Has Been Archived !-

TL;DR: Click Here.

misode has created mcmeta, an amazing repository with "processed, version controlled history of Minecraft's generated data and assets."

You can find the vanilla data pack of every Minecraft version since 1.14 (inclusive) on the data branch, and more useful information can be found on other branches of that repository.

-! ================================= !-
Click to view the original README

Vanilla Data Pack

Tick

A repository with automated scripts to generate the vanilla data pack from the Minecraft: Java Edition server jar.

Click here to go to the data branch.

Branches and Tags

All version identifiers used in this repository can be found from version_manifest.json.

Only the data for versions released after 1.16.2 (inclusive) can be found in this repository.

Branches

  • main: Stores the scripts. This is the default branch of the repository.
  • data: Stores the auto-generated vanilla data pack.
  • summary: Stores the auto-generated vanilla data pack content summaries.

Tags

  • ${version}-data: Stores the corresponding vanilla data pack for the specific version.
  • ${version}-summary: Stores the corresponding summaries for the specific version.

Repository Structure

Here's the file structure on the main branch.

  • generated: Stores all generated files. This folder is excluded from git.
    • data: Stores the generated data pack files. Uses the same structure as the data folder in a data pack. The data git branch and all ${version}-data git tags stores this folder directly with the structures folder removed.
      • advancements/loot_tables/...
    • summary: Stores summaries of the vanilla data pack. The summary git branch and all ${version}-summary git tags stores this folder directly.
  • input: Stores all input files for the scripts. This folder is excluded from git to avoid EULA violation.
    • game.jar: A Minecraft: Java Edition server jar file.
  • scripts: All the scripts you're intrested in.
    • download_inputs.ts: Downloads the input files for the passed-in JSON parameter.
    • generate.ts: Generates the data pack and summaries from the input.
    • get_latest_version.ts: Prints a JSON with version, download, and sha1 to the stdout.
    • github_action_tick.ts: Executes the things that the GitHub Action likes.
    • utils.ts: Some common functions used by other scripts.

Summary Format

A summary file stores all the namespaced IDs that the vanilla data pack has. Both summaries use a dictionary from file type to their own structure to store the information.

Flattened Summary

Flattened summary is... flattened.

{
  "advancement": [
    "minecraft:adventure/adventuring_time",
    "minecraft:adventure/arbalistic",
    ...
  ],
  "dimension": [...],
  ...
}

Tree Summary

Tree summary stores children of a path segment in its $children property, and uses $end to indicate if the namespaced ID can end at this segment.

For example, the ID minecraft:foo can be represented with

{
  "minecraft": {
    "$children": {
      "foo": {
        "$end": true
      }
    }
  }
}

minecraft:foo, minecraft:bar, and minecraft:bar/qux can be represented with

{
  "minecraft": {
    "$children": {
      "foo": {
        "$end": true
      },
      "bar": {
        "$end": true,
        "$children": {
          "qux": {
            "$end": true
          }
        }
      }
    }
  }
}

Scripts

Get Latest Version

Execution: npm run get_latest_version

Prints a JSON object containing version, download, and sha1.

Download Inputs

Execution: npm run download_inputs {"version": "<Version>", "download": "<URL of the game core jar>", "sha1": "SHA-1 of the game core jar"}

Downloads and saves the input files (game.jar and vanilla_worldgen.zip) for the specific version.

Generate

Execution: npm run generate or npm run gen

Generates the vanilla data pack and summary from the input files.

GitHub Action Tick

Execution: npm run github_action_tick

Executes the things that the GitHub Action needs.

Quick Start

The generated result for all vanilla game versions released after 1.16.2 (inclusive) are served on the GitHub repository's data branch. If for some reasons you want to generate files by yourself, please refer to the following steps:

  1. Clone this repository to your local environment.
  2. Copy your game core jar to input/game.jar. Only server files are acceptable due to use of the data generator.
  3. Install Node.js if you haven't.
  4. Execute npm i and npm run generate in the root of this repository.
  5. Enjoy the generated stuff in the generated folder!

Disclaimer

The data git branch and all ${version}-data git tags don't contain the generated structures category because the only way to get them is from the game core file and I don't want to potentially violate the EULA by redistributing those structure files. Another reason is that they are all binary files and it means little to put them in the git system.

All other contents in the data git branch and ${version}-data git tags are either accessible through the data generator or from slicedlime's examples respository, and I assume it's okay to put them under public.

However, please open an issue if the assumption is ever contradicted, and I will have the data git branch and all ${version}-data git tags removed from this GitHub repository as soon as possible.

License

The LICENSE only applies to the main git branch and the summary git branch.

About

Version-controlled history of Minecraft's vanilla data pack.

Resources

License

Stars

Watchers

Forks