#Cannot define global arrays of tags from tag event to tag event

6 messages · Page 1 of 1 (latest)

formal daggerBOT
#

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

void cosmosBOT
#

Paste version of hltweakertags.js from @tribal nexus

marsh imp
#
ServerEvents.tags('item', event => {
    global["silverOres"] = event.get('forge:ores/silver').getObjectIds()
    console.log(silverOres)
})

ServerEvents.tags('block', event => {
    Object.values(global["silverOres"]).forEach(silver => {
        console.log(silver)
        event.remove('hltweaker:needs_iron2_tool', silver)
        event.remove('minecraft:needs_iron_tool', silver)
        event.add('minecraft:needs_copper_tool', silver)
    });
})
#

Use the global binding

#

Might be on the wiki. I haven’t looked in a while.
Essentially it’s just a Java map you can access from any script type or file and pass data between them.

void cosmosBOT
#

Paste version of hltweakertags.js, server.log from @tribal nexus