Zenith

Zenith

3M Downloads

Cannot run on 1.19.2 server due to ItemTooltipCallback being client-only

DragonOfMath opened this issue ยท 2 comments

commented

ItemTooltipCallback as of 1.19.2 (& fabric-api 0.73.2+) was marked client-only via @Environment(EnvType.CLIENT), so when Zenith is used on a server, it fails with the following error:

java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'zenith'!
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$0(EntrypointUtils.java:51) ~[fabric-loader-0.14.14.jar:?]
	at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.14.14.jar:?]
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49) ~[fabric-loader-0.14.14.jar:?]
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35) ~[fabric-loader-0.14.14.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:62) ~[fabric-loader-0.14.14.jar:?]
	at net.minecraft.server.Main.main(Main.java:101) [server-intermediary.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461) [fabric-loader-0.14.14.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.14.14.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) [fabric-loader-0.14.14.jar:?]
	at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) [fabric-loader-0.14.14.jar:?]
	at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) [fabric-server-mc.1.19.2-loader.0.14.14-launcher.0.11.1.jar:0.11.1]
Caused by: java.lang.RuntimeException: Cannot load class net.fabricmc.fabric.api.client.item.v1.ItemTooltipCallback in environment type SERVER
	at net.fabricmc.loader.impl.transformer.FabricTransformer.transform(FabricTransformer.java:59) ~[fabric-loader-0.14.14.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPreMixinClassByteArray(KnotClassDelegate.java:462) ~[fabric-loader-0.14.14.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:415) ~[fabric-loader-0.14.14.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.14.14.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.14.14.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:112) ~[fabric-loader-0.14.14.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?]
	at safro.zenith.spawn.SpawnerModule.init(SpawnerModule.java:63) ~[zenith-0.5.6+1.19.2.jar:?]
	at safro.zenith.Zenith.onInitialize(Zenith.java:98) ~[zenith-0.5.6+1.19.2.jar:?]
	at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47) ~[fabric-loader-0.14.14.jar:?]
	... 8 more

See here: https://github.com/FabricMC/fabric/blob/1.19.2/fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/client/item/v1/ItemTooltipCallback.java#L30

Starting in fabric-api versions for 1.19.3 (>=0.70.0), the environment annotation was dropped: FabricMC/fabric#2755

commented

Oops, thanks for letting me know, I should get a release with a fix for that today

commented

Fixed with 9a79920