KubeJS (Old)

KubeJS (Old)

3M Downloads

Crash with FTB Custom Quest

Crepper710 opened this issue ยท 3 comments

commented

Minecraft Version

1.18.2

KubeJS Version

1802.5.4-build.533

Rhino Version

1802.1.14-build.209

Architectury Version

4.8.81

Forge/Fabric Version

Forge 40.1.68

Describe your issue

I tried to code a custom quest for FTB Quest using KubeJS (like in the example at: https://mods.latvian.dev/books/kubejs/page/ftb-quests-integration)

the code i put in kubejs/startup_scripts/script.js or kubejs/server_scripts/script.js (neither worked):

onEvent('ftbquests.custom_task.620618336B00D868', event => {
    console.log('Custom task!')
    event.setCheckTimer(20);
    event.check = (task, player) => {
        if (player.isOp()) {
            task.progress = 1
        }
    }
})

And every time i load up a single player world, my client crashes as soon as the world is loaded.

Crash report/logs

crash report: https://pastebin.com/4RKX3MPH, latest.log: https://pastebin.com/J8Rx4tge

commented

This seems to be a problem with FTBqueses integration being out of date, is it up to date?

commented

If you can't see any error in the script, the integration is probably out of date. I've labeled it as bug on the FTB mods tracker, you could probably close this issue since it looks to be on FTB Quest's side to fix

ServerPlayer should probably be PlayerSelector in
https://github.com/FTBTeam/FTB-Quests/blob/9f748aa674afa1b747948d16690bc3e82fe07d30/common/src/main/java/dev/ftb/mods/ftbquests/integration/kubejs/CheckWrapper.java#L18

because of

public ServerPlayerJS getPlayer(PlayerSelector selector) {

commented

That seems like the cause, will close