
When I installed the PFM furniture and this mod, it crashed
tianyeorg opened this issue · 1 comments
Have you read the compatibility information above?
- Yes, I have read and understand the compatibility note.
Mod Loader
Fabric
Game Version
1.21.4
Mod Version
2.4.8
Environment Type
Singleplayer
Provide Your Logs
https://api.mclo.gs/1/raw/jozVCm6
Describe Your Issue
When I installed the PFM furniture and this mod, it crashed
AI said:
Main Source of the Problem:
The error occurs during the initialization phase of the 'pfm' module (Paladin's Furniture Mod).Specifically, when the game loads the PaladinFurnitureModBlocksItems class and attempts to create an instance of the HerringbonePlankBlock object, it triggers a series of calls that ultimately lead to a crash.
Root Cause:
The immediate cause of the crash is a java.lang.NullPointerException, occurring in the configuration code of another mod, 'sounds' (Sounds Mod).The sounds mod returns null when trying to access its configuration handler (ConfigGroup.getHandler()), and subsequent code attempts to call a method on this null object, leading to the exception.
Stack trace shows that the sounds mod modifies a certain Minecraft class (class_4970) through Mixin (a code injection technique), and attempts to access configurations within the manageCustomSounds method, but at this point, the configuration has not been initialized.
Initialization Order Issue:
In the Fabric mod loading system, the class loading and initialization order of mods are usually determined by dependencies. Without explicitly specifying dependencies, the loading order can be random.In this case, while loading its block (HerringbonePlankBlock), the pfm mod triggers Mixin code from the sounds mod. However, the configuration of the sounds mod (managed through YACL library) has not yet completed initialization, resulting in a null configuration handler.
Mods Involved:
'pfm' (Paladin's Furniture Mod): Version 1.4, responsible for adding furniture-related blocks and items.'sounds' (Sounds Mod): Version 2.4.8+1.21.4+fabric, responsible for enhancing in-game sound effects, possibly dynamically modifying game behavior through Mixin.
'yet_another_config_lib_v3' (YACL): Version 3.6.5+1.21.4-fabric, a configuration library used by the sounds mod.
In summary, the issue arises from an initialization order conflict between the 'pfm' and 'sounds' mods. The loading of pfm triggered code from sounds before the latter's configuration was ready, ultimately causing a null pointer exception.
Steps to Reproduce
Installed the PFM furniture and this mod