Snownee / Lychee

Minecraft data-driven in-world crafting mod.
https://www.curseforge.com/minecraft/mc-mods/lychee
28 stars 3 forks source link

Jei recipes dont load on server #20

Closed benbenlaw closed 2 years ago

benbenlaw commented 2 years ago

Mod loader

Forge

Minecraft version

1.18.2

Mod version

2.2.2

Modloader version

40.1.20

Modpack info

https://www.curseforge.com/minecraft/modpacks/skyopolis-5

If bug:

If bug: The latest.log file

No response

Issue description

All recipes do not show in JEI on servers

LotP1 commented 2 years ago

here's the error

[20May2022 21:08:52.264] [Render thread/ERROR] [mezz.jei.load.PluginCaller/]: Caught an error from mod plugin: class snownee.lychee.compat.jei.JEICompat lychee:main
java.lang.NullPointerException: Cannot invoke "java.util.List.stream()" because the return value of "snownee.lychee.core.recipe.type.LycheeRecipeType.recipes()" is null
    at snownee.lychee.compat.jei.JEICompat.registerRecipes(JEICompat.java:100) ~[Lychee-1.18.2-forge-2.2.3.jar%23115!/:2.2.3]
    at mezz.jei.load.PluginLoader.lambda$createRecipeManager$9(PluginLoader.java:182) ~[jei-1.18.2-9.7.0.195.jar%23106!/:9.7.0.195]
    at mezz.jei.load.PluginCaller.callOnPlugins(PluginCaller.java:26) ~[jei-1.18.2-9.7.0.195.jar%23106!/:9.7.0.195]
    at mezz.jei.load.PluginLoader.createRecipeManager(PluginLoader.java:182) ~[jei-1.18.2-9.7.0.195.jar%23106!/:9.7.0.195]
    at mezz.jei.startup.JeiStarter.start(JeiStarter.java:129) ~[jei-1.18.2-9.7.0.195.jar%23106!/:9.7.0.195]
    at mezz.jei.forge.startup.ClientLifecycleHandler.startJei(ClientLifecycleHandler.java:112) ~[jei-1.18.2-9.7.0.195.jar%23106!/:9.7.0.195]
    at mezz.jei.forge.startup.StartEventObserver.transitionState(StartEventObserver.java:143) ~[jei-1.18.2-9.7.0.195.jar%23106!/:9.7.0.195]
    at mezz.jei.forge.startup.StartEventObserver.lambda$register$4(StartEventObserver.java:84) ~[jei-1.18.2-9.7.0.195.jar%23106!/:9.7.0.195]
    at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247) ~[eventbus-5.0.3.jar%232!/:?]
    at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239) ~[eventbus-5.0.3.jar%232!/:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.3.jar%232!/:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.3.jar%232!/:?]
    at net.minecraft.client.gui.screens.Screen.m_6575_(Screen.java:420) ~[client-1.18.2-20220404.173914-srg.jar%23159!/:?]
    at net.minecraft.client.Minecraft.m_91152_(Minecraft.java:918) ~[client-1.18.2-20220404.173914-srg.jar%23159!/:?]
    at net.minecraft.client.Minecraft.m_91279_(Minecraft.java:1798) ~[client-1.18.2-20220404.173914-srg.jar%23159!/:?]
    at net.minecraft.client.Minecraft.m_91398_(Minecraft.java:1663) ~[client-1.18.2-20220404.173914-srg.jar%23159!/:?]
    at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1019) ~[client-1.18.2-20220404.173914-srg.jar%23159!/:?]
    at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:663) ~[client-1.18.2-20220404.173914-srg.jar%23159!/:?]
    at net.minecraft.client.main.Main.main(Main.java:205) ~[client-1.18.2-20220404.173914-srg.jar%23159!/:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
    at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:31) ~[fmlloader-1.18.2-40.1.20.jar%2316!/:?]
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%235!/:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%235!/:?]
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%235!/:?]
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%235!/:?]
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%235!/:?]
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%235!/:?]
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%235!/:?]
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?]
Snownee commented 2 years ago

do recipes work?

Snownee commented 2 years ago

please provide your full log

cnordbakk commented 2 years ago

I was the one providing LotP1 with the exception he posted. Please find the full latest.log attached.

The issue seems to be with PostActionTypes of type "random". The following recipe works in single player but fails with the above exception when playing on server: e.custom({ type: "lychee:item_inside", item_in: {item: "skyopolis:blank_pebble"},block_in: {blocks: ["skyopolis:weak_enriching_water"]}, post: [{type: "random", rolls:{min: 2, max: 2}, entries: [ {weight: 1, type: "drop_item", item: "skyopolis:andesite_pebble"}, {weight: 1, type: "drop_item", item: "skyopolis:granite_pebble"}, {weight: 1, type: "drop_item", item: "skyopolis:stone_pebble"}, {weight: 1, type: "drop_item", item: "skyopolis:diorite_pebble"}, ] }] })

This is an example of a recipe that works in both single player and on server: e.custom({ type: "lychee:item_inside", item_in: {item: "skyopolis_additions:undergarden_enriching_water_catalyst"},block_in: {blocks: ["skyopolis:weak_enriching_water"]}, post: [{type: "place", block: {blocks: ["skyopolis:undergarden_enriching_water"]} }] })

latest.log

Snownee commented 2 years ago

where is the full latest.log?

cnordbakk commented 2 years ago

Latest.log: https://pastebin.com/dB6zDPD6

Snownee commented 2 years ago

note the line 753 and 926. try solving them

cnordbakk commented 2 years ago

The error on 926 is caused by JEI not being loaded because of the exception on 753. With Quark disabled I get a similar exception from another mod. As I mentioned above, I don't get any exception if I comment out any random type recipe from the KubeJS script. Pretty sure the latest lates.log will be attached this time.

latest.log

cnordbakk commented 2 years ago

Here is the full KubeJS script:

in_world_crafting.txt

Snownee commented 2 years ago

https://www.curseforge.com/minecraft/mc-mods/lychee/files/3798647

seems fixed

cnordbakk commented 2 years ago

It works on my machine :) Let's hope Ben finds the same. Thank you!

cnordbakk commented 2 years ago

If you log off the client and then back on all Lychee Tweaks recipes disappear from JEI and an exception from snownee.lychee.compat.jei.JEICompat.registerRecipes is found in the latest.log (line 1559). I have to restart the client to get the recipes back.

Do you want me to open a new issue?

latest.log

Snownee commented 2 years ago

should be fixed now