-
Notifications
You must be signed in to change notification settings - Fork 2
Craft Tweaker
Mohron edited this page Dec 14, 2019
·
6 revisions
mods.rockytweaks.Anvil.addRecipe(left-input, right-input, output, exp-cost);
Single
import mods.rockytweaks.Anvil;
// Creates individual anvil recipes that a displayed separately in JEI
// Adds a recipe to the anvil requiring 1 Book, 8 Quartz and 5 levels to make a Sharpness I enchanted book
Anvil.addRecipe(<minecraft:book>, <minecraft:quartz> * 8, <minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 1 as short, id: 16 as short}]}), 5);
// 1 Book + 16 Quartz + 16 levels = Sharpness II
Anvil.addRecipe(<minecraft:book>, <minecraft:quartz> * 16, <minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 2 as short, id: 16 as short}]}), 15);
// 1 Book + 32 Quartz + 36 levels = Sharpness III
Anvil.addRecipe(<minecraft:book>, <minecraft:quartz> * 32, <minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 3 as short, id: 16 as short}]}), 36);
Multiple
// Creates multiple anvil recipes that JEI cycles through the possible options
// Add the above recipes in a single recipe group
Anvil.addRecipes(<minecraft:book>,
[
<minecraft:quartz> * 8,
<minecraft:quartz> * 16,
<minecraft:quartz> * 32
],
[
<minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 1 as short, id: 16 as short}]}),
<minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 2 as short, id: 16 as short}]}),
<minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 3 as short, id: 16 as short}]})
],
[
5,
15,
32
]
);
mods.rockytweaks.Merchant.addTrade(profession, career, left-input, right-input, output, level);
-
/ct merchant professions
- outputs a log of valid merchant professions -
/ct merchant careers [profession]
- outputs a log of valid careers for all or the specified profession
import mods.rockytweaks.Merchant;
Merchant.addTrade("minecraft:nitwit", "nitwit", <minecraft:emerald>, <minecraft:diamond>, <minecraft:cobblestone>, 1);
Merchant.addTrade("minecraft:priest", "cleric", <minecraft:diamond>, <minecraft:stone>, 1);