Giter Club home page Giter Club logo

minecraft-json-schema-zh_cn's Introduction

minecraft-json-schema-zh_CN

License Gitmoji

已更新至:Minecraft Java版 1.14.2

针对 Minecraft 中多种 JSON 文件的 JSON schema。配合现代编辑器,可以实现在书写 JSON 时提供自动补全,并自动校验格式。

设计规范

  • 凡是能够显式指定 minecraft: 命名空间的字段,必须指定,不能省略。
  • 在编写 JSON Schema 的 titledescription 时,请以全角句号()结尾。

支持特性

  1. pack.mcmeta
  2. 进度
  3. 战利品表
  4. 配方
  5. 标签(物品标签、方块标签、函数标签、流体标签、实体类型标签)

如何使用

以宇宙第一编辑器 VSCode 为例。在你的数据包根目录(即与 pack.mcmeta 在同一目录)下创建新文件夹 .vscode,在其中创建新文件 settings.json,书写如下内容:

{
    "json.schemas": [
        {
            "fileMatch": ["/pack.mcmeta"],
            "url": "https://raw.githubusercontent.com/SPGoding/minecraft-json-schemas-zh_CN/master/java/data/pack.mcmeta.json"
        },
        {
            "fileMatch": ["/data/*/advancements/*.json"],
            "url": "https://raw.githubusercontent.com/SPGoding/minecraft-json-schemas-zh_CN/master/java/data/advancement.json"
        },
        {
            "fileMatch": ["/data/*/loot_tables/*.json"],
            "url": "https://raw.githubusercontent.com/SPGoding/minecraft-json-schemas-zh_CN/master/java/data/loot_table.json"
        },
        {
            "fileMatch": ["/data/*/recipes/*.json"],
            "url": "https://raw.githubusercontent.com/SPGoding/minecraft-json-schemas-zh_CN/master/java/data/recipe.json"
        },
        {
            "fileMatch": ["/data/*/tags/blocks/*.json"],
            "url": "https://raw.githubusercontent.com/SPGoding/minecraft-json-schemas-zh_CN/master/java/data/tags/block.json"
        },
        {
            "fileMatch": ["/data/*/tags/entity_types/*.json"],
            "url": "https://raw.githubusercontent.com/SPGoding/minecraft-json-schemas-zh_CN/master/java/data/tags/entity_type.json"
        },
        {
            "fileMatch": ["/data/*/tags/fluids/*.json"],
            "url": "https://raw.githubusercontent.com/SPGoding/minecraft-json-schemas-zh_CN/master/java/data/tags/fluid.json"
        },
        {
            "fileMatch": ["/data/*/tags/functions/*.json"],
            "url": "https://raw.githubusercontent.com/SPGoding/minecraft-json-schemas-zh_CN/master/java/data/tags/function.json"
        },
        {
            "fileMatch": ["/data/*/tags/items/*.json"],
            "url": "https://raw.githubusercontent.com/SPGoding/minecraft-json-schemas-zh_CN/master/java/data/tags/item.json"
        }
    ],
    "files.associations": {
        "*.mcmeta": "json"
    }
}

JSON Schemas 已经配置完毕,现在当你使用 VSCode 打开这一数据包,并修改其中的 JSON 文件时,可以享受到自动补全的快乐了。

shared 更新方法

将 data generator 生成的 reports/registries.json 放置在 ./scripts 中,然后在终端运行命令 npm run convert

协议 - License

本项目以 CC BY 4.0 协议 进行发布。

This work is released under a CC BY 4.0 license

基于 - Based On

本项目基于以 CC BY 4.0 协议发布的 SPGoding/minecraft-json-schemas-zh_CNs 项目,作者 @Levertion。其中所有的英文 titledescription 被翻译为了简体中文。

This work is based on Levertion/minecraft-json-schemas created by @Levertion which is released under a CC BY 4.0 license. All titles and descriptions in the schema files are translated to Simplified Chinese.

minecraft-json-schema-zh_cn's People

Contributors

spgoding avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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.