コード例 #1
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #2
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #3
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #4
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #5
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #6
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #7
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #8
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #9
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #10
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #11
0
ファイル: blueprints.py プロジェクト: alucas/bravo
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))
コード例 #12
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #13
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #14
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #15
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #16
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #17
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
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))
コード例 #18
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
def door(material, provides, name):
    return Blueprint("%s-door" % name, (2, 3), ((material.key, 1),) * 6,
        (provides.key, 1))
コード例 #19
0
ファイル: blueprints.py プロジェクト: tazjel/bravo
 # 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),