friendlyhj / ZenRecipeReloading

Recipe hot reloading for crafttweaker 1.12
MIT License
16 stars 2 forks source link

Error on `/ct reload` #1

Closed Krutoy242 closed 1 year ago

Krutoy242 commented 1 year ago

After installing zenctreload mod, running /ct reload causing sus error:

image

[13:37:35] [Server thread/ERROR] [FML]: Exception caught during firing event youyihj.zenutils.api.reload.ScriptReloadEvent$Post@7d0d0936:
java.lang.IllegalStateException: A HEI API method is being called by another mod from the wrong thread:
Thread[Server thread,3,SERVER]
It must be called on the main thread by using Minecraft.addScheduledTask.
    at mezz.jei.util.ErrorUtil.assertMainThread(ErrorUtil.java:257) ~[ErrorUtil.class:?]
    at mezz.jei.ingredients.IngredientRegistry.addIngredientsAtRuntime(IngredientRegistry.java:240) ~[IngredientRegistry.class:?]
    at mezz.jei.ingredients.IngredientRegistry.addIngredientsAtRuntime(IngredientRegistry.java:222) ~[IngredientRegistry.class:?]
    at crafttweaker.mods.jei.actions.AddItemAction.apply(AddItemAction.java:22) ~[AddItemAction.class:?]
    at youyihj.zenutils.api.reload.ActionReloadCallback.applyReload(ActionReloadCallback.java:23) ~[ActionReloadCallback.class:?]
    at youyihj.zenutils.impl.delegate.ZenUtilsTweaker.apply(ZenUtilsTweaker.java:42) ~[ZenUtilsTweaker.class:?]
    at crafttweaker.CraftTweakerAPI.apply(CraftTweakerAPI.java:151) ~[CraftTweakerAPI.class:?]
[...]
[13:37:35] [Server thread/WARN] [net.minecraft.command.CommandHandler]: Couldn't process command: ct reload
java.lang.IllegalStateException: A HEI API method is being called by another mod from the wrong thread:
Thread[Server thread,3,SERVER]
It must be called on the main thread by using Minecraft.addScheduledTask.
    at mezz.jei.util.ErrorUtil.assertMainThread(ErrorUtil.java:257) ~[ErrorUtil.class:?]
    at mezz.jei.ingredients.IngredientRegistry.addIngredientsAtRuntime(IngredientRegistry.java:240) ~[IngredientRegistry.class:?]
    at mezz.jei.ingredients.IngredientRegistry.addIngredientsAtRuntime(IngredientRegistry.java:222) ~[IngredientRegistry.class:?]
    at crafttweaker.mods.jei.actions.AddItemAction.apply(AddItemAction.java:22) ~[AddItemAction.class:?]
    at youyihj.zenutils.api.reload.ActionReloadCallback.applyReload(ActionReloadCallback.java:23) ~[ActionReloadCallback.class:?]
    at youyihj.zenutils.impl.delegate.ZenUtilsTweaker.apply(ZenUtilsTweaker.java:42) ~[ZenUtilsTweaker.class:?]
    at crafttweaker.CraftTweakerAPI.apply(CraftTweakerAPI.java:151) ~[CraftTweakerAPI.class:?]

debug.log

friendlyhj commented 1 year ago

Just avoid the error. But JEi.addItem is broken (CraftTweaker/CraftTweaker#1020), does it work in your modpack?

Krutoy242 commented 1 year ago

Yes, addItem working normally in my modpack.