A ZenScript auxiliary scripts for quick recipe making.
Drop content of this repo into your Minecraft 1.12 scripts/craft/
folder.
Extended Crafting mod optional.
- Lay out your crafting recipes in an block inventory ( for example).
- 3x3 for intup, output on the right.
- Right-Click inventory with .
- Code generated in
crafttweaker.log
.
# [Piston] from [Copper Gear][+3]
craft.remake(<minecraft:piston> * 4, ["pretty",
"# # #",
"░ ¤ ░",
"░ ♥ ░"], {
"#": <ore:plankWood>, # Oak Wood Planks
"░": <ore:cobblestone>, # Cobblestone
"¤": <ore:gearCopper>, # Copper Gear
"♥": <ore:dustRedstone>, # Redstone
});
# [Chest]*2 from [Oak Wood]
craft.remake(<minecraft:chest> * 2, ["pretty",
"# # #",
"# #",
"# # #"], {
"#": <ore:logWood>, # Oak Wood
});
To lay out recipes you can use any 3x3 inventory (like Crafting Station from Tinker's Construct), or table of any tier from Extended Crafting:
In this case, put output in first player's slot.
You can lay out several recipes at once in Chest / Crate from other mods, imaginary devide GUI grid by 4x3 rectarangles.
List of valid inventories can be found in recipeInventory.zs.
You must be in creative /gamemode 1
to use Bone.
Bone can be configured with NBT tags. See helper_jei.zs.
Shift+RightClick will merge inventory together, so they would use same items in recipes
val ingrs = {
"p": <ore:pattern>,
"≠": <ore:logWood>,
"≢": <ore:stickWood>,
"#": <ore:plankWood>,
"w": <ore:workbench>
} as IIngredient[string];
craft.remake(<tconstruct:pattern> * 4, ["#≢", "≢#"], ingrs);
craft.remake(<tconstruct:tooltables:4>, ["###", "#p#", "###"], ingrs);
craft.remake(<thermalfoundation:upgrade:3>, ["## ", "##w"], ingrs);
craft.remake(<tconstruct:tooltables:1>, [" p", " #"], ingrs);
craft.remake(<conarm:armorstation>, [" p ", "pwp", " p "], ingrs);
craft.remake(<tconstruct:tooltables:2>, [" p", " ≠"], ingrs);
craft.remake(<tconstruct:tooltables>, ["w"], ingrs);
The amount of each ingredient affects its representation:
- 1 - Automatic replacement according to the ore dictionary (if not disabled by the style)
- 2 - The item will be taken "as is"
- 3 - Item will be Wildcarded
craft.remake(<minecraft:planks> * 30, [
"≢#≠"], {
"≢": <ore:logWood>, // Any Wood Log
"#": <forestry:logs.1:3>, // Sequoia Wood
"≠": <forestry:logs.1:*>, // Wildcarded Logs
});
Large inventories with 4x3 grids have two free slots. Place special items there to change the logic of crafting:
Out of the box, Craft.zs
provide support for several modded crafting methods:
You can find how to use them here.
See Advanced API readme for using other functions.
Most common of them is using Grid
- part of Craft.zs
for generating arrays of ingredients.
Grid(["uw","wu"], {
"w": <ore:plankTreatedWood>,
"u": <ore:logWood>,
}).shaped();
// returns [
// [<ore:logWood>, <ore:plankTreatedWood>],
// [<ore:plankTreatedWood>, <ore:logWood>]
// ] as IIngredient[][]
Grid(["u w u"], {
"w": <ore:plankTreatedWood>,
"u": <ore:logWood>,
}).shapeless();
// returns [
// <ore:logWood>, <ore:plankTreatedWood>, <ore:logWood>
// ] as IIngredient[]