The ModVersion file format is a very simple command-based language which is very similar to [YAML](http://www.yaml.org). There are commands for entering all various kinds of data needed to describe a mod's items and the recipes for those items. Most commands are optional, and can be entered in any order. Anywhere this isn't true will be called out below. ## Example ```yaml schema: 2 group: Storage # This is a comment. item: 128³ Spatial Component recipe: input: Glowstone Dust, 16³ Spatial Component, Engineering Processor pattern: 010 121 010 tools: Crafting Table group: Cables item: Cable Anchor recipe: input: Iron Ingot pattern: ... .0. ... quantity: 3 tools: Nether Quartz Cutting Knife recipe: input: Tin Ingot pattern: ... .0. ... quantity: 3 tools: Nether Quartz Cutting Knife group: Circuits item: Certus Quartz Crystal; gatherable: yes item: Printed Calculation Circuit recipe: input: Inscriber Calculation Press, Pure Certus Quartz Crystal pattern: 0.. .1. ... extras: Inscriber Calculation Press tools: Inscriber ``` ## Basics Each line of the file should usually contain a single command. Each command has the format: `: , , ...`. All of the available commands are described below. Multiple commands may be listed on the same line by separating them with `;` characters. Comments are entered using the `#` character, which can itself be escaped if you need to use it in an item name. Blank lines are ignored. Whitespace is generally irrelevant outside item names, but following the conventions described above makes things easier. You can check your file for errors by running the `./scripts/verify ` command on your file. This examine the file and print out any errors. If no errors are found, there is no output. While working on a data file, it is often handy to use the UNIX `watch` command to provide continuous feedback: `watch ./script/verify `. You can pretty-print a data file using the `./scripts/reformat (|-)?` command. This will correct indentation, alphabetize items, and generally clean things up. Omitting the second argument will reformat the given file in place. Providing a `-` as the second argument will print the reformatted file to `stdout` without actually modifying the original. Please be sure to use these two commands prior to submitting a pull request for a new data file! ## Command Reference * `schema: ` _(required)_ The data schema used by the file. The current version is: 1. * `group: ` Starts an item group. Groups are used simply to organize items on the mod detail page, and don't need to correspond to anything in-game. Any items declared before the first group declaration are not part of any group. * `item: ` Starts and item declaration. The item name should be the item's actual in-game name. Spelling, punctuation (if any), and spaces are relevant. Extended UTF-8 characters are permitted. This command should be used once for each item in the mod. You should avoid using it to declare any items from vanilla Minecraft, or from other mods as these will already be added by other files. After an item declaration, the following commands may be used to describe it: `gatherable`, `recipe`. * `gatherable: [yes|no]` Indicates whether an item may be gathered in-game without crafting (e.g., Iron Ore can be gathered, but Iron Ingots cannot). If an item is gatherable, then it will never be crafted, even if it has recipes listed (e.g., Diamonds will never be crafted, even though they could be made from Diamond Blocks). * `recipe:` Starts a recipe declaration. This should be repeated once for each unique way of making the given item. Due to limitations with the crafting algorithm, the following rules should be followed when entering recipes: 1. Do not enter multiple recipes for alternate ingredients. For example, sticks can be made from any combination of any kind of planks (e.g., Oak Wood Planks, Spruce Planks). When entering a recipe for such an item, simply choose a variant of the ingredients and enter a single recipe using that variant (e.g., only use Oak Wood Planks). 2. Break cycles using `gatherable`. For example, IndustrialCraft adds a recipe to make String from Wool. Minecraft, however, already has a recipe for making Wool from String. This creates a cycle which can cause an infinite loop in crafting. Avoid such loops by marking the appropriate item(s) as `gatherable` 3. Put the most basic recipe first. For example, with Mekanism, Iron Ingots can be produced in many different ways, each yielding more and more iron. Recipes should be listed in order from least to most complex. 4. Put the highest yielding recipe first. Where all recipes are of equivalent complexity (e.g., producing Rose Red from Poppies or Rose Bushes), place the recipe which produces the most first. * `input: , , ...` _(required)_ Lists the items needed for the current recipe. The names here must match *exactly* with the name of the item listed else where in this (or another) file. Failure to do so will cause it to show up in the "Items You'll Need" section with a question mark icon. For recipes where an item is being smelted, the convention is to require a single "furnace fuel" item to represent the fuel used in the furnace for that single item. This command is required after each `recipe` command. * `pattern: ` _(required)_ Describes the placement of each input item in the 3×3 crafting grid. A pattern is an 11 character string composed of numbers or periods composed into 3 groups of 3 by spaces. Each number refers to an item in the `input` list (starting from 0). A period refers to a spot on the grid which is left blank. Each item in the `input` list must appear in the pattern, and each number in the pattern must correspond to an item in the `input` list. For shapeless recipes, you place the items wherever you like, but be sure to include the correct number of each (e.g., you'll need to show 4 Snowballs in the pattern for a Snow block). For recipes which use tools other than a crafting table, try to create a pattern which most closely matches the in-game UI for that tool. For example, for a furnace, place the item to smelt in the top- center position, and the fuel in the bottom-center position. This command is required after each `recipe` command. Here are a few examples: Item | Commands -------------------|--------- Iron Pickaxe | `input: Iron Ingot, Stick; pattern: 000 .1. .1.` Stone Slab | `input: Stone; pattern: ... 000 ...` Oak Wood Planks | `input: Oak Wood; pattern: ... .0. ...` Cobblestone Stairs | `input: Cobblestone; pattern: 0.. 00. 000` Piston | `input: Oak Wood Planks, Cobblestone, Iron Ingot, Redstone; pattern: 000 121 131` Iron Ingot | `input: Iron Ore, furnace fuel; pattern: .0. ... .1.` * `quantity: ` Specifies how many of the output item are created by this recipe. For example, the recipe for Oak Wood Planks produces 4 items. By default, each recipe is assumed to produce a single item. * `tools: , , ...` Lists the tools required for making the recipe. Usually, these are like crafting tables and furnaces: blocks you right-click to bring up a UI in which to work. However, in some mods, this is more complex. For example, in Buildcraft, making a Redstone Chipset requires an Assembly Table and a Laser. While you right-click on the former, the latter is a necessary addition. For most recipes, the only tool required is a Crafting Table, but even this should only be listed for those recipes which cannot be crafted in 2×2 crafting grid in the player's inventory. * `extras: ()? , ()? , ...` Lists the extra items produced by the recipe. For example, creating a Cake requires three buckets of milk, and produces, in addition to the Cake itself, three empty buckets.