Draylar / game-phases

Game Stages, for Fabric! Bundled into a single package for your convenience.

Home Page:https://www.curseforge.com/minecraft/mc-mods/game-phases

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[1.17.1] item mod namespace locking not working!

MSandro opened this issue · comments

Hello, can someon confirm that locking an entire mod does not work?
Here is the KubeJS Script (/kubejs/server_scripts/phases.js):

console.log("Loading up our custom Game Phases script!");

onEvent('gamephases.initialize', event => {
    event.phase('one')
        .item('arcanus:*')
});
onEvent('player.chat', event => {
    var hasOne = event.player.hasPhase('one');
    if(hasOne) {
        event.player.tell('You are in phase one.')
    }
});

I can not find any errors in the log.
Is there an config to enable debugging logging?

commented

hello, yes I can confirm this issue.
in addition - using "itemTag" does not work:
image
here is my script:

onEvent('gamephases.initialize', event => {
    event.phase('one')
        .itemTag('minecraft:logs')
});

does anyone know a workaround? it is very annoying to add every item from an mod.
Not sure if its possible to iterate through all items of an mod.
Maybe someone could help me. Or maybe the bug could be fixed soon?

I added regex support in the next version for blocks & items. Here is an example:

onEvent('gamephases.initialize', event => {
    event.phase('regex')
        .item('minecraft:.*')
});

Note that regex wildcard is .*, and not *.