Hidden Recipe Book (Forge)

Hidden Recipe Book (Forge)

386k Downloads

Crash on Server Join

blake-lowe opened this issue · 2 comments

commented

Information

Minecraft version: 1.19.2
Modloader: Forge
Forge version: 43.3.8
Environment: Multiplayer

Mod name: StarterKit
Mod version: 6.4

Description

Able to configure starter kits just fine, as well as choose them (so I'm fairly sure this isn't a mod incompatibility) but when randomizeMultipleKitsToggle is set to false, only the default kit is offered as a choice in the gui, and if the default kit is deactivated, the client crashes with the attached report.

Tried copying over the kits to the client config folder as well, no luck. Am I missing something or is this a bug?

Crash report

---- Minecraft Crash Report ----
// Why is it breaking :(

Time: 2024-03-18 22:41:10
Description: Unexpected error

java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.player.Inventory.m_5446_()" because "inventory" is null
	at com.natamus.starterkit_common_forge.inventory.StarterKitAbstractContainerScreen.<init>(StarterKitAbstractContainerScreen.java:86) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit_common_forge.inventory.StarterKitEffectRenderingInventoryScreen.<init>(StarterKitEffectRenderingInventoryScreen.java:29) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit_common_forge.inventory.StarterKitInventoryScreen.<init>(StarterKitInventoryScreen.java:44) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit_common_forge.functions.StarterClientFunctions.showInitialChooseKitScreen(StarterClientFunctions.java:34) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit_common_forge.functions.StarterClientFunctions.showInitialChooseKitScreen(StarterClientFunctions.java:23) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit_common_forge.events.StarterClientEvents.onClientTick(StarterClientEvents.java:26) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit.forge.events.ForgeStarterClientEvents.onClientTick(ForgeStarterClientEvents.java:13) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit.forge.events.__ForgeStarterClientEvents_onClientTick_ClientTickEvent.invoke(.dynamic) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading,pl:eventbus:B}
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.3.jar%2385!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%2385!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%2385!/:?] {}
	at net.minecraftforge.event.ForgeEventFactory.onPreClientTick(ForgeEventFactory.java:834) ~[forge-1.19.2-43.3.8-universal.jar%23714!/:?] {re:classloading}
	at net.minecraft.client.Minecraft.m_91398_(Minecraft.java:1718) ~[client-1.19.2-20220805.130853-srg.jar%23709!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1078) ~[client-1.19.2-20220805.130853-srg.jar%23709!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:700) ~[client-1.19.2-20220805.130853-srg.jar%23709!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23709!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23709!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:A,pl:runtimedistcleaner:A}
	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:27) ~[fmlloader-1.19.2-43.3.8.jar%23101!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Suspected Mod: 
	Starter Kit (starterkit), Version: 6.4
		Issue tracker URL: https://github.com/Serilum/.issue-tracker/labels/Mod:%20Starter%20Kit
		at TRANSFORMER/[email protected]/com.natamus.starterkit_common_forge.inventory.StarterKitAbstractContainerScreen.<init>(StarterKitAbstractContainerScreen.java:86)
Stacktrace:
	at com.natamus.starterkit_common_forge.inventory.StarterKitAbstractContainerScreen.<init>(StarterKitAbstractContainerScreen.java:86) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit_common_forge.inventory.StarterKitEffectRenderingInventoryScreen.<init>(StarterKitEffectRenderingInventoryScreen.java:29) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit_common_forge.inventory.StarterKitInventoryScreen.<init>(StarterKitInventoryScreen.java:44) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit_common_forge.functions.StarterClientFunctions.showInitialChooseKitScreen(StarterClientFunctions.java:34) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit_common_forge.functions.StarterClientFunctions.showInitialChooseKitScreen(StarterClientFunctions.java:23) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit_common_forge.events.StarterClientEvents.onClientTick(StarterClientEvents.java:26) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit.forge.events.ForgeStarterClientEvents.onClientTick(ForgeStarterClientEvents.java:13) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading}
	at com.natamus.starterkit.forge.events.__ForgeStarterClientEvents_onClientTick_ClientTickEvent.invoke(.dynamic) ~[starterkit-1.19.2-6.4.jar%23673!/:?] {re:classloading,pl:eventbus:B}
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.3.jar%2385!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%2385!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%2385!/:?] {}
	at net.minecraftforge.event.ForgeEventFactory.onPreClientTick(ForgeEventFactory.java:834) ~[forge-1.19.2-43.3.8-universal.jar%23714!/:?] {re:classloading}
-- Affected level --
Details:
	All players: 1 total; [LocalPlayer['dragonfyre23'/371, l='ClientLevel', x=-9.66, y=68.00, z=223.24]]
	Chunk stats: 1024, 160
	Level dimension: minecraft:overworld
	Level spawn location: World: (0,74,0), Section: (at 0,10,0 in 0,4,0; chunk contains blocks 0,-64,0 to 15,319,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,-64,0 to 511,319,511)
	Level time: 1915695 game time, 186700 day time
	Server brand: forge
	Server type: Non-integrated multiplayer server
Stacktrace:
	at net.minecraft.client.multiplayer.ClientLevel.m_6026_(ClientLevel.java:450) ~[client-1.19.2-20220805.130853-srg.jar%23709!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:dynamiclightsreforged.mixins.json:ClientWorldMixin,pl:mixin:APP:supplementaries-common.mixins.json:ClientLevelMixin,pl:mixin:APP:mixins.oculus.vertexformat.json:block_rendering.MixinClientLevel,pl:mixin:APP:pluto.mixins.json:fast_entity_access.ClientLevelMixin,pl:mixin:APP:waterdripsound.mixins.json:client.MixinClientWorld,pl:mixin:APP:endergetic.mixins.json:client.ClientLevelMixin,pl:mixin:APP:starlight.mixins.json:client.world.ClientLevelMixin,pl:mixin:APP:flywheel.mixins.json:ClientLevelMixin,pl:mixin:APP:canary.mixins.json:chunk.entity_class_groups.ClientLevelMixin,pl:mixin:APP:citadel.mixins.json:client.ClientLevelMixin,pl:mixin:APP:architectury.mixins.json:MixinClientLevel,pl:mixin:APP:blueprint.mixins.json:client.ClientLevelMixin,pl:mixin:APP:enhancedcelestials.mixins.json:client.MixinClientWorld,pl:mixin:APP:embeddium.mixins.json:features.fast_biome_colors.MixinClientWorld,pl:mixin:APP:embeddium.mixins.json:features.chunk_rendering.MixinClientWorld,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91354_(Minecraft.java:2280) ~[client-1.19.2-20220805.130853-srg.jar%23709!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:722) ~[client-1.19.2-20220805.130853-srg.jar%23709!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23709!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23709!/:?] {re:classloading,re:mixin,pl:runtimedistcleaner:A,pl:mixin:A,pl:runtimedistcleaner:A}
	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:27) ~[fmlloader-1.19.2-43.3.8.jar%23101!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2388!/:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {}
commented

Ok so it was because I did not use capitalized names for my kits. This should absolutely be handled on the back end. The format kit name flag was set to true, but the files were still saved as lowercase myclass.txt. Either capitalize the file when saving it, or when loading up the files to assemble the gui don't go looking for capitalized files.

While I'm at it, you should also add a note to your mod description that the config/starterkit directory must be copied over to the client to use the gui features. That was a pain point for me setting this up. Thanks for a functional mod and hope that these can be fixed.

commented

Thank you for opening the issue and the detailed information. I've just uploaded version 6.9 of Starter Kit. The client now correctly reads the data from the server. And capitalization is ignored when reading the description files. That should solve the issues you were having and make future development easier.

https://www.curseforge.com/minecraft/mc-mods/starter-kit/files