GrowthcraftCE / Growthcraft-1.12

Growthcraft is a low-tech brewing, farming, and cooking Minecraft Mod.
GNU Affero General Public License v3.0
33 stars 22 forks source link

[Feature request] Advancements #88

Open Deshiba opened 5 years ago

Deshiba commented 5 years ago

It'd be lovely to have some advancements to this mod. Not only for a sense of completion but a guide on how to do certain stuff in sequence in order to get a complete product.

Deshiba commented 5 years ago

The list so far, is anything missing? https://docs.google.com/document/d/1PwwcftgtGYWZmzFruEcAE70Beu94hpbqwyZCiR9iNuw/edit?usp=sharing

Deshiba commented 5 years ago

This code should suffice for the GrowthCraft Fishtrap json, unless I overlooked something. Please provide feedback.

{
    "display": {
        "icon": {
            "item": "growthcraft_fishtrap:fishtrap"
        },
        "title": "Trapping Fish"
        "frame": "task"
    },
    "criteria": {
        "fishtrap": {
            "trigger": "minecraft:inventory_changed",
            "conditions": {
                "items: [
                    "item": "growthcraft_fishtrap:fishtrap"
                ]
            }
        }
    }
}
ghost commented 5 years ago

This one works:

{
    "display": {
        "icon": {
            "item": "growthcraft_fishtrap:fishtrap"
        },
        "title": {
            "translate": "advancement.craft.fishtrap"
        },
        "description": {
            "translate": "advancement.craft.fishtrap.desc",
            "italic": true
        },
        "frame": "task",
        "background": "minecraft:textures/blocks/planks_spruce.png"
    },
    "criteria": {
        "craft_fishtrap": {
            "trigger": "minecraft:inventory_changed",
            "conditions": {
                "items": [
                    {
                        "item": "growthcraft_fishtrap:fishtrap"
                    }
                ]
            }
        }
    }
}

With the language entries:

advancement.craft.fishtrap=Trapping fish
advancement.craft.fishtrap.desc=Get yourself a Fish Trap.

The criteria "fishtrap" has been renamed to "craft_fishtrap" to make it less generic and avoid further naming conflicts.

About the "background" property I don't know whether it is only a root advancement property or not. It is left out for many vanilla advancements. But if it is missing here, the game crashes when opening the advancements window. I suggest to test things out as I'm very new to this system ... Or Alatyami may help.

Deshiba commented 5 years ago

Open issues:

Deshiba commented 5 years ago

A list of all the item names, these could/should be used for the advancements. growthcraft items.txt

Todo: