Skip to content

Syntax

Below you can find the syntax for the JSON recipe.

Recipe Schema

json
{
  "$schema": "https://legopitstop.github.io/Minecraft-Recipe-Display/schema.json"
}

Root

NameRequiredTypeDescription
descriptionNoDescriptionData that may be needed.
resourcesNoResourcesA list of resrouce locations for tags, textures, and lang files.
recipesYesArrayRecipesA list of recipes to add to the document.

Description

NameRequiredDefaultTypeDescription
idYesEnum: recipeThe id that will be used to apply the recipes. You must have an empty div that matches this id inside the HTML.
themeNolightEnum: light, darkThe theme to use for the GUI.
titleNoMinecraft Recipe DisplayStringThe tab title in the browser. Will end with '| recipes'
msgboxNomsgboxA msg box to display text to the user

Resources

Where to get different resources depending on the item namespace ID.

NameRequiredType
texturesYesTextures
langsYesLangs
linksYesLinks

Examples

json
{
  "resrouces": {
    "textures": {
      "minecraft": {
        "type": "spritesheet",
        "file": ""
      }
    },
    "langs": {
      "minecraft": ""
    },
    "links": {
      "minecraft": "https://minecraft.wiki/w/${NAME.WIKI}"
    }
  }
}

Textures

A map of the namespace id and the file location/url to grab the texture from

NameDefaultTypeDescription
minecraft"file":"https://cdn.jsdelivr.net/gh/legopitstop/Javascript/libs/Sprite/minecraft/sprite.json"Object or StringBuilt-in location to get textures
<namespace>Object or StringThe location to get the textures

Examples

json
{
  "textures": {
    "minecraft": {
      "type": "spritesheet",
      "file": "https://cdn.jsdelivr.net/gh/legopitstop/Javascript/libs/Sprite/minecraft/sprite.json"
    }
  }
}

Langs

A map of the namespace id and the file location/url to grab the lang from.

NameDefaultTypeDescription
minecraft/assets/1.17/assets/${NAMESPACEID}/lang/en_us.jsonStringBuilt-in location to get langs
<namespace>StringThe location to get the langs

Examples

json
{
  "langs": {
    "minecraft": "/assets/1.17/assets/${NAMESPACEID}/lang/en_us.json"
  }
}

A map of the namespace id and the file location/url to link to.

NameDefaultTypeDescription
minecrafthttps://minecraft.wiki/w/${NAME.WIKI}StringBuilt-in location to get langs
<namespace>StringThe location to get the langs

Examples

json
{
  "links": {
    "minecraft": "https://minecraft.wiki/w/${NAME.WIKI}"
  }
}

Varables

A list of variables that will get replaced in the string.

VarableDescriptionExample
${NAME}The name of the itemstone_bricks
${NAMESPACE}The namespace of the itemminecraft
${WIKINAME}The name of the itme in WIKI formatStone_Bricks
${LANG}The lang of the page &lang=<lang> at the end of urlen_us

Recipes

Recipe schema is similar to Minecraft Java Edition's

RequiredNameDefaultTypeDescription
NodescriptionStringThe description of the recipe. Supports markdown formatting!
YesidentifierStringIt is recomnded to include an id for your recipe, It can be useful for debuging if you are missing a required key.
YestypeEnumThe type of recipe to use.
NogroupStringThe group to place this recipe in.

Recipe Type

Allowed Values
minecraft:crafting_shaped
minecraft:crafting_shapeless
minecraft:smelting
minecraft:blasting
minecraft:smoking
minecraft:campfire_cooking
minecraft:stonecutting
minecraft:smithing

Crafting Shapeless

Additional properties

RequiredNameTypeDescription
YesidentifierStringThe id of the recipe
NodescriptionRAW JSONThe description of the recipe
YesingredientsArrayA list of ingredients
YesresultObjectThe resulting recipe.

Example

json
{
  "identifier": "minecraft:flint_and_steel",
  "ingredients": [
    {
      "item": "minecraft:flint",
      "count": 1
    },
    {
      "item": "minecraft:iron_ingot",
      "count": 1
    }
  ],
  "result": {
    "item": "minecraft:flint_and_steel",
    "count": 1
  }
}

Crafting Shaped

Additional properties

RequiredNameTypeDescription
YesidentifierStringThe id of the recipe
NodescriptionRAW JSONThe description of the recipe
YespatternArrayThe pattern to insert the keys.
YeskeyObjectContains the keys for the pattern.
YesresultObjectThe resulting recipe.

Example

json
{
  "identifier": "minecraft:stone_brick_wall",
  "pattern": ["###", "###"],
  "key": {
    "#": {
      "item": "minecraft:stone_bricks"
    }
  },
  "result": {
    "item": "minecraft:stone_brick_wall",
    "count": 6
  }
}

Smelting

Additional properties

RequiredNameDefaultTypeDescription
YesidentifierStringThe id of the recipe
NodescriptionRAW JSONThe description of the recipe
YesingredientsObjectA list of ingredients
Noexperience0.1NumberThe amount of experiance you get from smelting an item.
Nocookingtime200NumberThe number of ticks it takes to cook this item.
YesresultObjectThe resulting recipe.

Example

json
{
  "identifier": "minecraft:stone",
  "ingredients": {
    "item": "minecraft:stone"
  },
  "experience": 0.1,
  "cookingtime": 200,
  "result": {
    "item": "minecraft:stone"
  }
}

Blasting

Additional properties

RequiredNameDefaultTypeDescription
YesidentifierStringThe id of the recipe
NodescriptionRAW JSONThe description of the recipe
YesingredientsObjectA list of ingredients
Noexperience0.1NumberThe amount of experiance you get from smelting an item.
Nocookingtime200NumberThe number of ticks it takes to cook this item.
YesresultObjectThe resulting recipe.

Example

json
{
  "identifier": "minecraft:stone",
  "ingredients": {
    "item": "minecraft:stone"
  },
  "experience": 0.1,
  "cookingtime": 200,
  "result": {
    "item": "minecraft:stone"
  }
}

Smoking

Additional properties

RequiredNameDefaultTypeDescription
YesidentifierStringThe id of the recipe
NodescriptionRAW JSONThe description of the recipe
YesingredientsObjectA list of ingredients
Noexperience0.1NumberThe amount of experiance you get from smelting an item.
Nocookingtime200NumberThe number of ticks it takes to cook this item.
YesresultObjectThe resulting recipe.

Example

json
{
  "identifier": "minecraft:stone",
  "ingredients": {
    "item": "minecraft:stone"
  },
  "experience": 0.1,
  "cookingtime": 200,
  "result": {
    "item": "minecraft:stone"
  }
}

Campfire Cooking

Additional properties

RequiredNameDefaultTypeDescription
YesidentifierStringThe id of the recipe
NodescriptionRAW JSONThe description of the recipe
YesingredientsObjectA list of ingredients
Noexperience0.1NumberThe amount of experiance you get from smelting an item.
Nocookingtime200NumberThe number of ticks it takes to cook this item.
YesresultObjectThe resulting recipe.

Example

json
{
  "identifier": "minecraft:stone",
  "ingredients": {
    "item": "minecraft:stone"
  },
  "experience": 0.1,
  "cookingtime": 200,
  "result": {
    "item": "minecraft:stone"
  }
}

Stonecutting

Additional properties

RequiredNameDefaultTypeDescription
YesidentifierStringThe id of the recipe
NodescriptionRAW JSONThe description of the recipe
YesingredientsObjectA list of ingredients
Nocount1Integer [1-64]The number of items to give.
YesresultObjectThe resulting recipe.

Example

json
{
  "identifier": "minecraft:stone_brick_wall_from_stonecutter",
  "ingredients": {
    "item": "minecraft:stone_bricks"
  },
  "result": {
    "item": "minecraft:stone_brick_wall"
  },
  "count": 1
}

Smithing

Additional properties

RequiredNameDefaultTypeDescription
YesidentifierStringThe id of the recipe
NodescriptionRAW JSONThe description of the recipe
YesbaseObjectThe base item
YesadditionObjectThe item that you add to the base item.
YesresultObjectThe resulting recipe.

Example

json
{
  "identifier": "minecraft:netherite_pickaxe",
  "base": {
    "item": "minecraft:diamond_pickaxe"
  },
  "addition": {
    "item": "minecraft:netherite_ingot"
  },
  "result": {
    "item": "minecraft:netherite_pickaxe"
  }
}

Item Count

RequiredNameDefaultTypeDescription
YesitemStringThe item to give.
Nocount1Integer [1-64]The number of items to give.

Example

json
{
  "item": "minecraft:stone",
  "count": 2
}

Item

RequiredNameDefaultTypeDescription
YesitemStringThe item to give.

Example

json
"item": "minecraft:stone"

Pattern

pattern is an array (1-3) items. Values inside array match the values in key max of 3 characters per item. Use a space as an empty slot.

Examples

json
{
  "pattern": ["###", "###"]
}
json
{
  "pattern": ["#"]
}
json
{
  "pattern": ["###", "###", "###"]
}

Key

key defines the characters inside pattern.

Examples

json
{
  "key": {
    "#": {
      "item": "minecraft:stone"
    }
  }
}

Msgbox

RequiredNameDefaultTypeDescription
NoiconStringThe image to use as a icon.
NocolorStringThe color for the msgbox. Must be a 6 digit hex
YescontentsRAW JSONThe contents of the msgbox, supports RAW JSON

Examples

json
{
  "icon": "./assets/favicon.png",
  "color": "#ff0000",
  "contents": {
    "text": "A msg box",
    "bold": true,
    "underlined": true
  }
}

Not associated with or approved by Mojang Studios or Microsoft