Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Recipe management

CmdrDats edited this page · 1 revision

Recipe management

(:require [cljminecraft.recipes :as r])

Source: recipes.clj

Description

Lets you define new shaped or shapeless recipes in a consistent, quick, declarative style.

Usage

An example (from recipes.clj) should make the most sense:

(def material-map
  {\W :wood \D :dirt \S :stone \O :compass})

(register-recipes
 (recipe material-map :ink_sack "WW" 2)
 (recipe material-map :monster_egg [" D " "DWD" " D "]))

So, here we're defining an unshaped recipe that takes 2 Wood to create 2 ink sacks (makes sense, right?) and a shaped recipe (notice the square brackets for a vector) to create a monster egg out of wood-in-the-middle and dirt-on-every-side.

See the materials at the Item functions for an expanding explanation of how the material :keywords work.

Something went wrong with that request. Please try again.