#FTB Quests + XMod Compat + KubeJS: If entity is killed add progress to custom task

2 messages · Page 1 of 1 (latest)

pallid lagoon
#

Previously I was detecting killed tagged entities through a datapack with scoreboards and advancements but I would like to, if possible, detect it through kubejs so that the progress displays as a percent under the title (like it does with all other FTB quests tasks).

I want to have multiple levels of this (i.e. 50 zombies killed, 100 zombies killed, etc.) and I'm not really sure how to go about any of it. This is my current code without implementing anything complicated yet

    event.maxProgress = 100 // Sets the Progress Count.

    event.setCheck((task, player) => {
        if(player.killedEntity("minecraft:zombie")) { //Checks if zombie killed by player
            task.progress++ // Adds progress to the quest.
        }
    })
})```
velvet cypressBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!