Zen Summoning

Zen Summoning

7M Downloads

1.16.5 could not use example script

6371peter opened this issue ยท 6 comments

commented

ZenSummoning-1.16.4-1.3.0,CraftTweaker-1.16.5-7.1.0.314
When copy https://github.com/TeamDman/Zen-Summoning/wiki/Docs Full example script into scripts,it will be error.
craftweaker.txt

commented

The word "type" in entityType:minecraft:cow should be lower case

commented
commented

works with upper for me .-.

commented

works for me too, just doesn't match the way crafttweaker outputs it in logs

commented

Looks like I forgot to update the old example stuff
The latest docs are available on the crafttweaker documentation here
https://docs.blamejared.com/1.16/en/mods/zensummoning/examples/

The latest CT version needs qualifiers on the bracket handlers
For example <minecraft:stick> becomes <item:minecraft:stick>
Additionally, the setMob command now takes an EntityType param instead of String
so instead of setMob("minecraft:cow") it becomes setMob(<entityType:minecraft:cow>)

Will try and update the official docs soon, but for now the old example should look like this for 1.16

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

SummoningDirector.addSummonInfo(
    SummoningInfo.create()
        .setCatalyst(<item:minecraft:stick>)
        .setReagents([<item:minecraft:stone>, <item:minecraft:egg>*12])
        .addMob(MobInfo.create()
            .setMob(<entityType:minecraft:cow>)
            .setCount(4)
            .setOffset(0,4,0)
            .setSpread(3,3,3)
            .setData({"Health": 200, "Attributes":[{"Name":"generic.maxHealth","Base":200}]})
        )
        .setMutator((attempt as SummoningAttempt) => {
            if (attempt.world.raining) {
                attempt.success = false;
                attempt.message = "Can't summon this in the rain!";
            } else {
                attempt.message = "Woohoo!";
            }
        })
);