Hi I just wanted to know how could I have KubeJS (version 6.2) detect when an Enhanced Celestials event takes place? I have tried asking in their server but I didnt get a response, which I understand because they get lots of people who ask questions so that's fair. Anyways, I've looked through the source code they have for 1.19.2:
https://github.com/CorgiTaco/Enhanced-Celestials/tree/1.19.X
Here is some simple code I have, this is an example.js file stored in my server_scripts instance and I have tested and I know it loads when the world is loaded so the issue is with the code:
// shows when world loads, so file loading works
console.info('Hello, World! (Loaded SERVER scripts!!!)')
// general simplified concept of what im trying to do
ServerEvents.tick(event => {
if(event === 'enhancedcelestials:blood_moon') console.info("BLOOD MOON")
})
i know event needs to have event.something, just not sure exactly what for this mod
the output here is just to check that it works, what i plan to do is add a gamestage (but i have seen posts of people that have done this so i can refer to those) because then those gamestages will be used in conjunction with InControl mod to customise mob spawns, this is so i can make an event kind of like Terraria's blood moons, where instead of just spawning more hostile mobs like enhanced celestials does by default, i also have a particular selection of mobs that can only spawn during this event
if anyone knows how i can grab this event i would appreciate if you could let me know, i do know that the event can be activated by /enhancedcelestials setLunarEvent enhancedcelestials:blood_moon, if that helps at all
TLDR; simple code i have tries to do something when enhancedcelestials:blood_moon event occurs but is not working, wondering if anyone knows how to check when the event happens
