#JEI runtime

13 messages · Page 1 of 1 (latest)

sleek breach
#

I want to run some JEI API methods when a player joined the game. On Singleplayer this works well with the PlayerEvents.loggedIn and event.player.senddata.
Somehow this is too early when it happens on server and the player joins...
It also does not work with JEIAddedEvents.onRuntimeAvailable for reasons i dont understand.

midnight nebulaBOT
#

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

sleek breach
#
JEIAddedEvents.onRuntimeAvailable(event =>{
    console.log('JEI RUNTIME inside onRuntimeAvailable: ' + global.jeiRuntime)
})
[22:09:59] [INFO] JEI/common/restrictionExecutor.js#52: JEI RUNTIME inside onRuntimeAvailable: undefined
#

@warm briar sorry for pinging you, but im certain if someone knows its you

warm briar
#

global is a binding that is used to pass data between scripts, not from mods to scripts.

#
JEIAddedEvents.onRuntimeAvailable(event =>{
    console.log('JEI RUNTIME inside onRuntimeAvailable: ' + event.data)
})
#

^ this is what you are looking for

sleek breach
#

thanks for the fast reply!

#

but shouldnt something like this then work in the jeiaddedevent? js global.jeiRuntime.getIngredientManager().addIngredientsAtRuntime(type, ingredients)

normal pine
#

So, technically you are listening for the kjs additions JEI plugin to be available, then trying to call kubejs's JEI plugins runtime

#

Since they are 2 different plugins, that won't work depending on which loads first

sleek breach
#

Ah how stupid from me…