Skip to content
This repository has been archived by the owner on Nov 22, 2020. It is now read-only.

Question: recipes and tags reflection #7

Open
Adirelle opened this issue Sep 4, 2020 · 0 comments
Open

Question: recipes and tags reflection #7

Adirelle opened this issue Sep 4, 2020 · 0 comments

Comments

@Adirelle
Copy link

Adirelle commented Sep 4, 2020

Say I would like to add recipes to turn all slabs into blocks.

For example, for cobblestone, I would add this recipe:

{
    "type": "crafting_shaped",
    "pattern": [
        "S",
        "S"
    ],
    "key": {
        "S": {
            "item": "minecraft:cobblestone_slab"
        }
    },
    "result": {
        "item": "minecraft:cobblestone"
    }
}

Now, what I really want is a way to automate these recipes creating at loading to support all vanilla and third-party slabs, e.g.:

  • for each slab item S (for example all items in the "minecraft:slabs" item tag):
    • find the "crafting_shaped" recipe to create 6 items S,
    • analyze the recipe to find the ingredient I,
    • add a shaped recipe to create 1 I from 2 S.

Does KubeJS support things like "iterating over all items of a tag", "finding a recipe by its result", etc. ?

Edit: removed reference to stairs, as it the same problem, just with different items.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant