Adding Recipes with LibCD (Outdated) - TeamAOF/Artis GitHub Wiki

LibCD Support has been removed from Artis past 1.4.0. This is due to the discontinuation of LibCD. Below is information on how to use LibCD for older versions, but I recommend not relying on it.

LibCD

Tables are accessed through the LibCD import system, with separate imports for each table. The import string must be artis.ArtisTweaker@ followed by the ID of the table. For a table named artis:test_table, you would create a variable var TableTweaker = libcd.import("artis.ArtisTweaker@libcd:test_table");. After that, you can call that table's tweaker addShaped, addDictShaped, and addShapeless methods, like the standard RecipeTweaker.addShaped, RecipeTweaker.addDictShaped, and RecipeTweaker.addShapeless methods. Each of the methods have an additional Object ingredient and int cost parameter to set catalyst requirements. The catalyst ingredient and cost are used as described above.

Sample Code

At file data/artis/tweakers/tweaker_test.js:

var TableTweaker = libcd.require("artis.ArtisTweaker@artis:test_table");

TableTweaker.addShaped([["minecraft:iron_ingot", "minecraft:iron_ingot"],
                        ["minecraft:diamond", "minecraft:diamond"]],
                        "minecraft:diamond@4", "minecraft:diamond_pickaxe", 3);