Giter Site home page Giter Site logo

craft.zs's Introduction

Craft.zs

A ZenScript auxiliary scripts for quick recipe making.



Installation

Drop content of this repo into your Minecraft 1.12 scripts/craft/ folder.

Extended Crafting mod optional.

Usage

  1. Lay out your crafting recipes in an block inventory ( for example).
  2. 3x3 for intup, output on the right.
  3. Right-Click inventory with .
  4. 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
});

Usage Details

Lay out recipes

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.

Bone right-click

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);

Advanced Ingredients

Amount

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
});

Catalysts

Large inventories with 4x3 grids have two free slots. Place special items there to change the logic of crafting:

  • - The recipe will be shapeless.
  • - Added removal of old recipes by name.

Additional Support

Out of the box, Craft.zs provide support for several modded crafting methods:

You can find how to use them here.

API

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[]

craft.zs's People

Contributors

krutoy242 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ikexing-cn

craft.zs's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.