#Workaround to `ServerEvent.afterRecipes`?

4 messages · Page 1 of 1 (latest)

ancient tartan
#

According to this unclosed issue (for 1.18.2), the afterRecipes event is not fired. Testing in 1.20.1 with the following script:

console.info("Hello from base!");

ServerEvents.recipes((_event) => {
  console.info("Hello from recipes!");
});

ServerEvents.afterRecipes((_event) => {
  console.info("Hello from after recipes!");
});

My log only includes

[17:04:39] [INFO] logImpossibleRecipes.js#1: Hello from base!
[17:04:40] [INFO] logImpossibleRecipes.js#4: Hello from recipes!

so this issue remains. Is there a workaround to the afterRecipes event not firing? I would like to log recipes that contain disabled items as inputs, but ServerEvents.recipes doesn't take the recipes I've already handled into account.

drifting sequoiaBOT
#

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

calm skiff
#

looks lik you could subscribe to the add reloadlistener event and add kubejsreloadlistener manually

#

complicated probably