UnifyTags

UnifyTags

3.2k Downloads

Incorrect event for ServerEvents.tags?

AJBuilder opened this issue ยท 2 comments

commented

I'm getting this error when running the 1.17 script on 1.19.2 Minecraft.

[System] [CHAT] 1) unify.js#370: Error occurred while handling event 'ServerEvents.tags': TypeError: Cannot find function replaceInput in object dev.latvian.mods.kubejs.server.tag.PreTagEventJS@46844d32.
[System] [CHAT] More info in 'logs/kubejs/server.log'

Looking more at the script I noticed this:

if (global["V6P"]) {
    ServerEvents.tags("item", e_recipes)
    ServerEvents.recipes(e_recipes)
} else {
    onEvent("tags.items", e_tags_items)
    onEvent("recipes", e_recipes)
}

e_recipes looks to be modifying/unifying recipes, why is it being called when the server is working on tags?

Changing to:

if (global["V6P"]) {
    ServerEvents.tags("item", e_tags_items)
    ServerEvents.recipes(e_recipes)
} else {
    onEvent("tags.items", e_tags_items)
    onEvent("recipes", e_recipes)
}

fixed the issue.
The weird part is the script was working fine for a while, and randomly stopped working.

commented

That is very strange how the script was working for a while despite that... that's definitely a typo on my end.

commented

Fixed in 27af24d, thanks for reporting!