Example #1
0
def two_by_two(material, provides, name):
    """
    A recipe involving turning four of one thing, into one of another thing.
    """

    return Blueprint(name, (2, 2), ((material.key, 1),) * 4,
        (provides.key, 1))
Example #2
0
def sword(material, provides, name):
    blueprint = (
        (material.key, 1),
        (material.key, 1),
        (items["stick"].key, 1),
    )
    return Blueprint("%s-sword" % name, (1, 3), blueprint, (provides.key, 1))
Example #3
0
def two_by_one(material, provides, amount, name):
    """
    A simple recipe with a pair of blocks next to each other.
    """

    return Blueprint(name, (2, 1), ((material.key, 1),) * 2,
        (provides.key, amount))
Example #4
0
def one_by_two(top, bottom, provides, amount, name):
    """
    A simple recipe with one block stacked on top of another.
    """

    return Blueprint(name, (1, 2), ((top.key, 1), (bottom.key,1)),
        (provides.key, amount))
Example #5
0
def three_by_one(material, provides, amount, name):
    """
    A slightly involved recipe which looks a lot like Jenga, with blocks on
    top of blocks on top of blocks.
    """

    return Blueprint(name, (3, 1), ((material.key, 1),) * 3,
        (provides.key, amount))
Example #6
0
def cart_boat(material, provides, name):
    blueprint = (
        (material.key, 1),
        None,
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
    )
    return Blueprint(name, (3, 2), blueprint, (provides.key, 1))
Example #7
0
def hoe(material, provides, name):
    blueprint = (
        (material.key, 1),
        (material.key, 1),
        None,
        (items["stick"].key, 1),
        None,
        (items["stick"].key, 1),
    )
    return Blueprint("%s-hoe" % name, (3, 2), blueprint, (provides.key, 1))
Example #8
0
def bowl_bucket(material, provides, amount, name):
    blueprint = (
        (material.key, 1),
        None,
        (material.key, 1),
        None,
        (material.key, 1),
        None,
    )
    return Blueprint(name, (3, 2), blueprint, (provides.key, amount))
Example #9
0
def boots(material, provides, name):
    blueprint = (
        (material.key, 1),
        None,
        (material.key, 1),
        (material.key, 1),
        None,
        (material.key, 1),
    )

    return Blueprint("%s-boots" % name, (3, 2), blueprint, (provides.key, 1))
Example #10
0
def helmet(material, provides, name):
    blueprint = (
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
        None,
        (material.key, 1),
    )

    return Blueprint("%s-helmet" % name, (3, 2), blueprint, (provides.key, 1))
Example #11
0
def pickaxe(material, provides, name):
    blueprint = (
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
        None,
        (items["stick"].key, 1),
        None,
        None,
        (items["stick"].key, 1),
        None,
    )
    return Blueprint("%s-pickaxe" % name, (3, 3), blueprint, (provides.key, 1))
Example #12
0
def clock_compass(material, provides, name):
    blueprint = (
        None,
        (material.key, 1),
        None,
        (material.key, 1),
        (items["redstone"].key, 1),
        (material.key, 1),
        None,
        (material.key, 1),
        None,
    )

    return Blueprint(name, (3, 3), blueprint, (provides.key, 1))
Example #13
0
def stairs(material, provides, name):
    blueprint = (
        (material.key, 1),
        None,
        None,
        (material.key, 1),
        (material.key, 1),
        None,
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
    )

    return Blueprint("%s-stairs" % name, (3, 3), blueprint, (provides.key, 1))
Example #14
0
def chestplate(material, provides, name):
    blueprint = (
        (material.key, 1),
        None,
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
    )

    return Blueprint("%s-chestplate" % name, (3, 3), blueprint,
        (provides.key, 1))
Example #15
0
def leggings(material, provides, name):
    blueprint = (
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
        (material.key, 1),
        None,
        (material.key, 1),
        (material.key, 1),
        None,
        (material.key, 1),
    )

    return Blueprint("%s-leggings" % name, (3, 3), blueprint,
        (provides.key, 1))
Example #16
0
def hollow_eight(outer, provides, name):
    """
    A recipe which requires an empty inner block surrounded by other blocks.
    """

    blueprint = (
        (outer.key, 1),
        (outer.key, 1),
        (outer.key, 1),
        (outer.key, 1),
        None,
        (outer.key, 1),
        (outer.key, 1),
        (outer.key, 1),
        (outer.key, 1),
    )

    return Blueprint(name, (3, 3), blueprint, (provides.key, 1))
Example #17
0
def three_by_three(outer, inner, provides, name):
    """
    A recipe which requires a single inner block surrounded by other blocks.

    Think of it as like a chocolate-covered morsel.
    """

    blueprint = (
        (outer.key, 1),
        (outer.key, 1),
        (outer.key, 1),
        (outer.key, 1),
        (inner.key, 1),
        (outer.key, 1),
        (outer.key, 1),
        (outer.key, 1),
        (outer.key, 1),
    )

    return Blueprint(name, (3, 3), blueprint, (provides.key, 1))
Example #18
0
def door(material, provides, name):
    return Blueprint("%s-door" % name, (2, 3), ((material.key, 1),) * 6,
        (provides.key, 1))
Example #19
0
 # Mechanisms.
 door(blocks["wood"], items["wooden-door"], "wood"),
 door(items["iron-ingot"], items["iron-door"], "iron"),
 two_by_one(blocks["wood"], blocks["wooden-plate"], 1, "wood-plate"),
 two_by_one(blocks["stone"], blocks["stone-plate"], 1, "stone-plate"),
 one_by_two(blocks["stone"], blocks["stone"], blocks["stone-button"], 1,
         "stone-btn"),
 one_by_two(items["redstone"], items["stick"], blocks["redstone-torch"], 1,
         "redstone-torch"),
 one_by_two(items["stick"], blocks["cobblestone"], blocks["lever"], 1,
         "lever"),
 three_by_three(blocks["wood"], items["redstone"], blocks["note-block"],
         "noteblock"),
 three_by_three(blocks["wood"], items["diamond"], blocks["jukebox"],
         "jukebox"),
 Blueprint("trapdoor", (3, 2), ((blocks["wood"].key, 1),) * 6,
         (blocks["trapdoor"].key, 2)),
 # Food.
 bowl_bucket(blocks["wood"], items["bowl"], 4, "bowl"),
 three_by_one(items["wheat"], items["bread"], 1, "bread"),
 three_by_three(blocks["gold"], items["apple"], items["golden-apple"],
         "goldapple"),
 three_by_three(items["stick"], blocks["wool"], items["paintings"],
         "paintings"),
 three_by_one(blocks["reed"], items["paper"], 3, "paper"),
 # Special items.
 # These recipes are only special in that their blueprints don't follow any
 # interesting or reusable patterns, so they are presented here in a very
 # explicit, open-coded style.
 Blueprint("arrow", (1, 3), (
     (items["coal"].key, 1),
     (items["stick"].key, 1),