Skip to content

Commit

Permalink
Minecraft Trim Material Schema (#3033)
Browse files Browse the repository at this point in the history
* Add Minecraft Trim Material Schema

* Fix mistake

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Mysterious-Dev and pre-commit-ci[bot] authored Jun 30, 2023
1 parent 8513fdc commit 3c87ab8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/api/json/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -2472,6 +2472,12 @@
"fileMatch": ["**/assets/*/textures/**/*.png.mcmeta"],
"url": "https://json.schemastore.org/minecraft-texture-mcmeta.json"
},
{
"name": "Minecraft Data Pack Trim Material",
"description": "Configuration file defining a trim material for a data pack for Minecraft.",
"fileMatch": ["**/data/*/trim_material/*.json"],
"url": "https://json.schemastore.org/minecraft-trim-material.json"
},
{
"name": "MkDocs Configuration 1.0",
"description": "JSON schema for MkDocs configuration file",
Expand Down
30 changes: 30 additions & 0 deletions src/schemas/json/minecraft-trim-material.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A trim material for a Minecraft data pack config schema",
"properties": {
"asset_name": {
"type": "string"
},
"description": {
"type": "object",
"properties": {
"color": {
"type": "string"
},
"translate": {
"type": "string"
}
},
"required": ["color", "translate"]
},
"ingredient": {
"type": "string"
},
"item_model_index": {
"type": "number"
}
},
"required": ["asset_name", "description", "ingredient", "item_model_index"],
"title": "Minecraft Data Pack Tag",
"type": "object"
}
9 changes: 9 additions & 0 deletions src/test/minecraft-trim-material/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"asset_name": "dirt",
"description": {
"color": "#B4684D",
"translate": "trim_material.minecraft.dirt"
},
"ingredient": "minecraft:dirt",
"item_model_index": 0.5
}

0 comments on commit 3c87ab8

Please sign in to comment.