Roughly Enough Items Fabric/Forge/NeoForge (REI)

Roughly Enough Items Fabric/Forge/NeoForge (REI)

40M Downloads

[Bug] REIClientPlugin attempts to load on the server.

modmuss50 opened this issue ยท 2 comments

commented

What happened?

Hi,

I am using REIClientPlugin in TechReborn here: https://github.com/TechReborn/TechReborn/blob/1.19/src/client/java/techreborn/client/compat/rei/ReiPlugin.java

In 1.19 I have moved TechReborn to use a split client/server sourceset build setup, this means the client classes are not present at all when runing a dev server.

However REI still tries to classload my plugin, it seems REI catches the class load error message usually! Using exeption messages like this is not a good idea imo.

I think a better solution would be to add a rei_client entrypoint that is only loaded on the client side.

What mod loaders are you seeing the problem on?

Fabric

What do you think this bug is of?

  • Visual
  • Recipe Lookup
  • Cheat Mode
  • Plugin Integration / JEI Plugin Compatibility
  • Others

Relevant log output

[12:59:29] [main/INFO] (techreborn) TechReborn setup done!
[12:59:29] [main/ERROR] (Minecraft) Failed to start the minecraft server
 java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'roughlyenoughitems'!
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$0(EntrypointUtils.java:51) ~[fabric-loader-0.14.6.jar:?]
	at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.14.6.jar:?]
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49) ~[fabric-loader-0.14.6.jar:?]
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35) ~[fabric-loader-0.14.6.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:62) ~[fabric-loader-0.14.6.jar:?]
	at net.minecraft.server.Main.main(Main.java:101) [[email protected]:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:460) [fabric-loader-0.14.6.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.14.6.jar:?]
	at net.fabricmc.loader.launch.knot.KnotServer.main(KnotServer.java:28) [fabric-loader-0.14.6.jar:?]
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) [dev-launch-injector-0.2.1+build.8.jar:?]
Caused by: java.lang.RuntimeException: Failed to initialize REI entry point: me.shedaniel.rei.RoughlyEnoughItemsCore
	at me.shedaniel.rei.RoughlyEnoughItemsInitializer.initializeEntryPoint(RoughlyEnoughItemsInitializer.java:88) ~[RoughlyEnoughItems-fabric-9.0.458.jar:?]
	at me.shedaniel.rei.RoughlyEnoughItemsInitializer.onInitialize(RoughlyEnoughItemsInitializer.java:48) ~[RoughlyEnoughItems-fabric-9.0.458.jar:?]
	at java.lang.invoke.MethodHandleProxies$1.invoke(MethodHandleProxies.java:198) ~[?:?]
	at com.sun.proxy.jdk.proxy3.$Proxy31.onInitialize(Unknown Source) ~[?:?]
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.14.6.jar:?]
	... 7 more
Caused by: java.lang.RuntimeException: Could not create REI Plugin [REIPlugin] due to errors, provided by 'techreborn'!
	at me.shedaniel.rei.RoughlyEnoughItemsState.error(RoughlyEnoughItemsState.java:53) ~[RoughlyEnoughItems-fabric-9.0.458.jar:?]
	at me.shedaniel.rei.fabric.PluginDetectorImpl.loadPlugin(PluginDetectorImpl.java:89) ~[RoughlyEnoughItems-fabric-9.0.458.jar:?]
	at me.shedaniel.rei.fabric.PluginDetectorImpl.detectCommonPlugins(PluginDetectorImpl.java:111) ~[RoughlyEnoughItems-fabric-9.0.458.jar:?]
	at me.shedaniel.rei.PluginDetector.detectCommonPlugins(PluginDetector.java) ~[RoughlyEnoughItems-fabric-9.0.458.jar:?]
	at me.shedaniel.rei.RoughlyEnoughItemsCore.onInitialize(RoughlyEnoughItemsCore.java:154) ~[RoughlyEnoughItems-fabric-9.0.458.jar:?]
	at me.shedaniel.rei.RoughlyEnoughItemsInitializer.initializeEntryPoint(RoughlyEnoughItemsInitializer.java:84) ~[RoughlyEnoughItems-fabric-9.0.458.jar:?]
	at me.shedaniel.rei.RoughlyEnoughItemsInitializer.onInitialize(RoughlyEnoughItemsInitializer.java:48) ~[RoughlyEnoughItems-fabric-9.0.458.jar:?]
	at java.lang.invoke.MethodHandleProxies$1.invoke(MethodHandleProxies.java:198) ~[?:?]
	at com.sun.proxy.jdk.proxy3.$Proxy31.onInitialize(Unknown Source) ~[?:?]
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.14.6.jar:?]
	... 7 more
Caused by: java.lang.RuntimeException: Failed to initialize REI entry point: me.shedaniel.rei.RoughlyEnoughItemsCore

Caused by: java.lang.RuntimeException: Could not create REI Plugin [REIPlugin] due to errors, provided by 'techreborn'!

Anything else?

Let me know if you have any questions about this.

commented

I have added rei_client into REI, that should fix the issue.

P.S. Despite it being REIServerPlugin, it should actually load on both sides, if you have those please use rei_common, thanks!

commented

Perfect, thanks for the fix :)