Skip to content

examples

4tubborn edited this page Jul 21, 2026 · 4 revisions

Examples

Some built-in features are powered by API. Check them out in the data/block-morph-demo folder in the datapack branch.

Tick

Let player say "Hello, world!" while morphed.

example/advancement/tick.json

{
    "criteria": {
        "0": {
            "trigger": "tick",
            "conditions": {
                "player": [
                    {
                        "condition": "reference",
                        "name": "block-morph:is_in_morph"
                    }
                ]
            }
        }
    },
    "rewards": {
        "function": "example:tick"
    }
}

example/function/tick.mcfunction

advancement revoke @s only example:tick
say Hello, world!

Clone this wiki locally