BetterNether

BetterNether

30M Downloads

[Bug] Crash with latest Lithium 0.10.2 on 1.18

Abalieno opened this issue ยท 3 comments

commented

What happened?

Launch crash

latest.log

BetterNether

6.1.2

BCLib

1.4.7

Fabric API

0.66

Fabric Loader

0.14.10

Minecraft

1.18.2

Relevant log output

net.fabricmc.loader.impl.FormattedException: java.lang.NoClassDefFoundError: me/jellysquid/mods/lithium/api/pathing/BlockPathingBehavior
	at Not Enough Crashes deobfuscated stack trace.(1.18.2+build.4) ~[?:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:463) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.14.10.jar:?]
	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 org.polymc.impl.OneSixLauncher.invokeMain(OneSixLauncher.java:104) [NewLaunch.jar:?]
	at org.polymc.impl.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:175) [NewLaunch.jar:?]
	at org.polymc.impl.OneSixLauncher.launch(OneSixLauncher.java:185) [NewLaunch.jar:?]
	at org.polymc.EntryPoint.listen(EntryPoint.java:144) [NewLaunch.jar:?]
	at org.polymc.EntryPoint.main(EntryPoint.java:74) [NewLaunch.jar:?]
Caused by: java.lang.NoClassDefFoundError: me/jellysquid/mods/lithium/api/pathing/BlockPathingBehavior
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[?:?]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:186) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:347) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145) ~[fabric-loader-0.14.10.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[?:?]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:186) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:347) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145) ~[fabric-loader-0.14.10.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at net.minecraft.block.FireBlock.handler$cgf000$getBurnChance(FireBlock:1540) ~[?:?]
	at net.minecraft.block.FireBlock.getBurnChance(FireBlock) ~[?:?]
	at net.minecraft.block.FireBlock.fabric_getVanillaEntry(FireBlock:3098) ~[?:?]
	at net.fabricmc.fabric.impl.content.registry.FlammableBlockRegistryImpl.get(FlammableBlockRegistryImpl.java:80) ~[fabric-content-registries-v0-3.1+c85f2e3860-1e5166233c50c337.jar:?]
	at net.fabricmc.fabric.impl.content.registry.FlammableBlockRegistryImpl.get(FlammableBlockRegistryImpl.java:31) ~[fabric-content-registries-v0-3.1+c85f2e3860-1e5166233c50c337.jar:?]
	at ru.bclib.registry.BlockRegistry.register(BlockRegistry.java:42) ~[bclib-1.4.7.jar:?]
	at paulevs.betternether.registry.NetherBlocks.registerBlock(NetherBlocks.java:622) ~[better-nether-6.1.2.jar:?]
	at paulevs.betternether.registry.NetherBlocks.registerBlockDirectly(NetherBlocks.java:615) ~[better-nether-6.1.2.jar:?]
	at paulevs.betternether.registry.NetherBlocks.registerTaburet(NetherBlocks.java:827) ~[better-nether-6.1.2.jar:?]
	at paulevs.betternether.registry.NetherBlocks.<clinit>(NetherBlocks.java:534) ~[better-nether-6.1.2.jar:?]
	at paulevs.betternether.entity.EntityFirefly.<clinit>(EntityFirefly.java:522) ~[better-nether-6.1.2.jar:?]
	at paulevs.betternether.registry.NetherEntities.<clinit>(NetherEntities.java:123) ~[better-nether-6.1.2.jar:?]
	at net.minecraft.entity.attribute.DefaultAttributeRegistry.handler$bpe000$hasDefinition(DefaultAttributeRegistry:526) ~[?:?]
	at net.minecraft.entity.attribute.DefaultAttributeRegistry.hasDefinitionFor(DefaultAttributeRegistry) ~[?:?]
	at net.minecraft.entity.attribute.DefaultAttributeRegistry.method_26876(DefaultAttributeRegistry:168) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
	at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
	at net.minecraft.entity.attribute.DefaultAttributeRegistry.checkMissing(DefaultAttributeRegistry:170) ~[?:?]
	at net.minecraft.Bootstrap.logMissing(Bootstrap:137) ~[?:?]
	at net.minecraft.client.main.Main.main(Main:154) ~[minecraft-1.18.2-client.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461) ~[fabric-loader-0.14.10.jar:?]
	... 11 more
Caused by: java.lang.ClassNotFoundException: me.jellysquid.mods.lithium.api.pathing.BlockPathingBehavior
	at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:226) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145) ~[fabric-loader-0.14.10.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[?:?]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:186) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:347) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145) ~[fabric-loader-0.14.10.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[?:?]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:186) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:347) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.14.10.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145) ~[fabric-loader-0.14.10.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at net.minecraft.block.FireBlock.handler$cgf000$getBurnChance(FireBlock:1540) ~[?:?]
	at net.minecraft.block.FireBlock.getBurnChance(FireBlock) ~[?:?]
	at net.minecraft.block.FireBlock.fabric_getVanillaEntry(FireBlock:3098) ~[?:?]
	at net.fabricmc.fabric.impl.content.registry.FlammableBlockRegistryImpl.get(FlammableBlockRegistryImpl.java:80) ~[fabric-content-registries-v0-3.1+c85f2e3860-1e5166233c50c337.jar:?]
	at net.fabricmc.fabric.impl.content.registry.FlammableBlockRegistryImpl.get(FlammableBlockRegistryImpl.java:31) ~[fabric-content-registries-v0-3.1+c85f2e3860-1e5166233c50c337.jar:?]
	at ru.bclib.registry.BlockRegistry.register(BlockRegistry.java:42) ~[bclib-1.4.7.jar:?]
	at paulevs.betternether.registry.NetherBlocks.registerBlock(NetherBlocks.java:622) ~[better-nether-6.1.2.jar:?]
	at paulevs.betternether.registry.NetherBlocks.registerBlockDirectly(NetherBlocks.java:615) ~[better-nether-6.1.2.jar:?]
	at paulevs.betternether.registry.NetherBlocks.registerTaburet(NetherBlocks.java:827) ~[better-nether-6.1.2.jar:?]
	at paulevs.betternether.registry.NetherBlocks.<clinit>(NetherBlocks.java:534) ~[better-nether-6.1.2.jar:?]
	at paulevs.betternether.entity.EntityFirefly.<clinit>(EntityFirefly.java:522) ~[better-nether-6.1.2.jar:?]
	at paulevs.betternether.registry.NetherEntities.<clinit>(NetherEntities.java:123) ~[better-nether-6.1.2.jar:?]
	at net.minecraft.entity.attribute.DefaultAttributeRegistry.handler$bpe000$hasDefinition(DefaultAttributeRegistry:526) ~[?:?]
	at net.minecraft.entity.attribute.DefaultAttributeRegistry.hasDefinitionFor(DefaultAttributeRegistry) ~[?:?]
	at net.minecraft.entity.attribute.DefaultAttributeRegistry.method_26876(DefaultAttributeRegistry:168) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
	at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
	at net.minecraft.entity.attribute.DefaultAttributeRegistry.checkMissing(DefaultAttributeRegistry:170) ~[?:?]
	at net.minecraft.Bootstrap.logMissing(Bootstrap:137) ~[?:?]
	at net.minecraft.client.main.Main.main(Main:154) ~[minecraft-1.18.2-client.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461) ~[fabric-loader-0.14.10.jar:?]
	... 11 more

Other Mods

No response

commented

Thank you for reporting. From the log, this does not look to be a problem with BetterNether. Did you report this to the Lithium team?

commented

Yep. Not much info though.

CaffeineMC/lithium-fabric#414

commented

Just for completeness sake, did you try without bclib and better nether?

The crash happens, when we test wether or not we need to register a block with fabric's flammable registry:
https://github.com/quiqueck/BCLib/blob/f9ce865a46da952dcb34f7d6b7bc6d92481dcfdc/src/main/java/ru/bclib/registry/BlockRegistry.java#L42

This in turn is initialised because entities get loaded, and the firefly assembles a list of flower blocks:

FLOWERS = new HashSet<Block>();
FLOWERS.add(NetherBlocks.NETHER_GRASS);
FLOWERS.add(NetherBlocks.SOUL_GRASS);
FLOWERS.add(NetherBlocks.SWAMP_GRASS);
FLOWERS.add(NetherBlocks.BLACK_APPLE);
FLOWERS.add(NetherBlocks.MAGMA_FLOWER);
FLOWERS.add(NetherBlocks.SOUL_VEIN);
FLOWERS.add(NetherBlocks.MAT_REED.getStem());
FLOWERS.add(NetherBlocks.INK_BUSH);
FLOWERS.add(NetherBlocks.INK_BUSH_SEED);
FLOWERS.add(NetherBlocks.POTTED_PLANT);
FLOWERS.add(Blocks.NETHER_WART);

From the looks of it, that initialisation happens too early, at a point where lithium is not yet loaded completely. But I am not sure why this will suddenly happen. So for the moment I think this may be something on the lithium side...