#onForgeEvent

19 messages · Page 1 of 1 (latest)

stable chasm
#

Do i have to restart the game everytime whenever i need to reload this type of events?

nocturne thistleBOT
#

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

neon pebble
#

no

#

??closeticket

marble windBOT
# neon pebble ??closeticket

Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue! This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.

Do you have any other questions regarding your issue? Feel free to ask!
Note: You generally should create a new post for unrelated issues.

neon pebble
#

you can use the global trick to not do so

#

there should be a macro about this ahujel

#

anyways

stable chasm
#

hmm might try global trick

#
global.event = onForgeEvent(...)

like this right?

neon pebble
#
global.someForgeEvent = e => {
    // modify the code here and run "/kubejs reload startup_scripts" once you make any changes
    console.log('the event triggered!')
}

onForgeEvent('some.forge.event', e => {
    global.someForgeEvent(e)
})
stable chasm
#

ahh okay

#
global.boneMealEvent = event => {

}


onForgeEvent('net.minecraftforge.event.entity.player.BonemealEvent', event => {
    if(event.block.id == 'moss_block') event.setCanceled(true)
    console.log('event fired')
    global.boneMealEvent(event)
})

trying this

#

if console log fires i will continueü

#

because i need to be sure event is firing

#

ok it is firing nice

#

twice actually both for client and server