以下是 wiki 中的示例(仅 1.12.2),链接

import mods.zensummoning.SummoningDirector;
import mods.zensummoning.SummoningAttempt;
import mods.zensummoning.SummoningInfo;
import mods.zensummoning.MobInfo;

SummoningDirector.addSummonInfo(//固定格式。
    SummoningInfo.create()//固定格式。
        .setCatalyst(<minecraft:stick>)//召唤用的物品。
        .setReagents([<minecraft:stone>, <minecraft:egg>*12])//召唤用的催化剂,可不填。
        .addMob(MobInfo.create()//固定格式。
            .setMob("minecraft:cow")//召唤的生物。
            .setCount(4)//召唤的数量。
            .setOffset(0,4,0)//召唤后位置的偏移。
            .setSpread(3,3,3)//召唤后的随机性。
            .setData({"Health": 200, "Attributes":[{"Name":"generic.maxHealth","Base":200}]})//召唤生物的数据(NBT),以原版的形式。
        )
        .setMutator(function (attempt as SummoningAttempt) {//尝试召唤事件。
            if (attempt.world.raining) {//判断召唤者的世界是否下雨。
                attempt.success = false;//阻止召唤事件。
                attempt.message = "无法在雨中召唤这个!";//对尝试召唤者输出该字符串。
            } else {
                attempt.message = "呜呼!";//判断为是则输出该字符串。
            }
        })
);