Prefab

Prefab

14M Downloads

[Bug]: [1.21-neoforge]Crash because of null pointer

joe-vettek opened this issue ยท 4 comments

commented

Minecraft Version

1.21.1

Forge Version

21.1.125

Mod Version

1.0.2

Details

https://github.com/Brian-Wuest/MC-Prefab/blob/113d8d0067e4102b65dd3cd6e05f0863fc274833/Shared/src/com/prefab/ClientModRegistryBase.java#L109C40-L109C49

It seems that the registration here is not right

commented

It looks like there are other mods before prefab in the stack trace (they are on the far right on the first line).
Please provide a list of mods in your mod pack (or the modpack itself) so we can properly troubleshoot the issue.

The game runs fine with just prefab so without this information we cannot any further.

commented

Weird, I tried it again and it seems to work. Maybe I deleted some mod.

Sorry to bother you.

commented

All good, it happens.

If you encounter it again please provide that mod list so I can try it on my end.

commented
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.ItemLike.asItem()" because "itemlike" is null
	at TRANSFORMER/[email protected]/net.minecraft.client.color.item.ItemColors.register(ItemColors.java:122) ~[client-1.21.1-20240808.144430-srg.jar%23251!/:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:modernfix-common.mixins.json:safety.ItemColorsMixin from mod modernfix,pl:mixin:APP:sodium-common.mixins.json:core.model.colors.ItemColorsMixin from mod sodium,pl:mixin:APP:puzzleslib.neoforge.mixins.json:client.accessor.ItemColorsNeoForgeAccessor from mod puzzleslib,pl:mixin:A,pl:runtimedistcleaner:A}
	at TRANSFORMER/[email protected]/com.prefab.ClientModRegistryBase.RegisterBlockRenderer(ClientModRegistryBase.java:80) ~[prefab-neoforge-1.0.2.jar%23302!/:?] {re:mixin,re:classloading}
	at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.handler$zcg000$prefab$constructorHead(Minecraft.java:3509) ~[client-1.21.1-20240808.144430-srg.jar%23251!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.<init>(Minecraft.java:636) ~[client-1.21.1-20240808.144430-srg.jar%23251!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:214) ~[client-1.21.1-20240808.144430-srg.jar%23251!/:?] {re:classloading,pl:runtimedistcleaner:A}
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] {}
	at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] {}
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:136) ~[loader-4.0.37.jar%23172!/:4.0] {}
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:124) ~[loader-4.0.37.jar%23172!/:4.0] {}
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonClientLaunchHandler.runService(CommonClientLaunchHandler.java:32) ~[loader-4.0.37.jar%23172!/:4.0] {}
	at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.lambda$launchService$4(CommonLaunchHandler.java:118) ~[loader-4.0.37.jar%23172!/:4.0] {}
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-11.0.4.jar%23177!/:?] {}
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-11.0.4.jar%23177!/:?] {}
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-11.0.4.jar%23177!/:?] {}
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:103) [modlauncher-11.0.4.jar%23177!/:?] {}
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:74) [modlauncher-11.0.4.jar%23177!/:?] {}
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-11.0.4.jar%23177!/:?] {}
	at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-11.0.4.jar%23177!/:?] {}
	at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.run(BootstrapLauncher.java:210) [bootstraplauncher-2.0.2.jar:?] {}
	at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:69) [bootstraplauncher-2.0.2.jar:?] {}
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] {}
	at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] {}
	at oolloo.jlw.Wrapper.invokeMain(Wrapper.java:112) [JavaWrapper.jar:?] {}
	at oolloo.jlw.Wrapper.main(Wrapper.java:105) [JavaWrapper.jar:?] {}