Reap causes an error in the log file
Lolothepro opened this issue ยท 0 comments
Bug description
Reap causes an error in the log file
Exception caught during firing event: Cannot get config value before config is loaded.
Index: 0
Listeners:
0: de.maxhenkel.reap.corelib.CommonRegistry$$Lambda/0x000071a428db5f48@7e94141f
java.lang.IllegalStateException: Cannot get config value before config is loaded.
at MC-BOOTSTRAP/[email protected]/com.google.common.base.Preconditions.checkState(Preconditions.java:512)
at TRANSFORMER/[email protected]/net.neoforged.neoforge.common.ModConfigSpec$ConfigValue.getRaw(ModConfigSpec.java:1228)
at TRANSFORMER/[email protected]/net.neoforged.neoforge.common.ModConfigSpec$ConfigValue.get(ModConfigSpec.java:1215)
at TRANSFORMER/[email protected]/de.maxhenkel.reap.ServerConfig.onReload(ServerConfig.java:107)
at TRANSFORMER/[email protected]/de.maxhenkel.reap.corelib.CommonRegistry.lambda$registerConfig$5(CommonRegistry.java:143)
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.ConsumerEventHandler.invoke(ConsumerEventHandler.java:26)
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.EventBus.post(EventBus.java:350)
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.EventBus.post(EventBus.java:315)
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModContainer.acceptEvent(ModContainer.java:158)
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.config.ModConfig.setConfig(ModConfig.java:69)
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.config.ConfigTracker.closeConfig(ConfigTracker.java:233)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at java.base/java.util.Collections$SynchronizedCollection.forEach(Collections.java:2351)
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.config.ConfigTracker.unloadConfigs(ConfigTracker.java:129)
at TRANSFORMER/[email protected]/net.neoforged.neoforge.server.ServerLifecycleHooks.handleServerStopped(ServerLifecycleHooks.java:133)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:750)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:267)
at java.base/java.lang.Thread.run(Thread.java:1583)
[15:36:56] [Server thread/ERROR] [ne.ne.fm.ModContainer/LOADING]: Caught exception during event net.neoforged.fml.event.config.ModConfigEvent$Unloading@521cc477 dispatch for modid reap
java.lang.IllegalStateException: Cannot get config value before config is loaded.
at MC-BOOTSTRAP/[email protected]/com.google.common.base.Preconditions.checkState(Preconditions.java:512) ~[guava-32.1.2-jre.jar%23103!/:?] {}
at TRANSFORMER/[email protected]/net.neoforged.neoforge.common.ModConfigSpec$ConfigValue.getRaw(ModConfigSpec.java:1228) ~[neoforge-21.0.148-universal.jar%23170!/:?] {re:classloading}
at TRANSFORMER/[email protected]/net.neoforged.neoforge.common.ModConfigSpec$ConfigValue.get(ModConfigSpec.java:1215) ~[neoforge-21.0.148-universal.jar%23170!/:?] {re:classloading}
at TRANSFORMER/[email protected]/de.maxhenkel.reap.ServerConfig.onReload(ServerConfig.java:107) ~[reap-neoforge-1.21-1.1.1.jar%23171!/:1.21-1.1.1] {re:classloading}
at TRANSFORMER/[email protected]/de.maxhenkel.reap.corelib.CommonRegistry.lambda$registerConfig$5(CommonRegistry.java:143) ~[reap-neoforge-1.21-1.1.1.jar%23171!/:1.21-1.1.1] {re:classloading}
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.ConsumerEventHandler.invoke(ConsumerEventHandler.java:26) ~[bus-8.0.1.jar%23165!/:?] {}
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.EventBus.post(EventBus.java:350) ~[bus-8.0.1.jar%23165!/:?] {}
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.EventBus.post(EventBus.java:315) ~[bus-8.0.1.jar%23165!/:?] {}
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModContainer.acceptEvent(ModContainer.java:158) ~[loader-4.0.21.jar%23156!/:4.0] {}
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.config.ModConfig.setConfig(ModConfig.java:69) ~[loader-4.0.21.jar%23156!/:4.0] {}
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.config.ConfigTracker.closeConfig(ConfigTracker.java:233) ~[loader-4.0.21.jar%23156!/:4.0] {}
at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}
at java.base/java.util.Collections$SynchronizedCollection.forEach(Collections.java:2351) ~[?:?] {}
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.config.ConfigTracker.unloadConfigs(ConfigTracker.java:129) ~[loader-4.0.21.jar%23156!/:4.0] {}
at TRANSFORMER/[email protected]/net.neoforged.neoforge.server.ServerLifecycleHooks.handleServerStopped(ServerLifecycleHooks.java:133) ~[neoforge-21.0.148-universal.jar%23170!/:?] {re:classloading}
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:750) ~[client-1.21-20240613.152323-srg.jar%23169!/:?] {re:classloading,pl:accesstransformer:B}
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:267) ~[client-1.21-20240613.152323-srg.jar%23169!/:?] {re:classloading,pl:accesstransformer:B}
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?] {}
[15:36:56] [Server thread/ERROR] [minecraft/MinecraftServer]: Uncaught exception in server thread
net.neoforged.fml.ModLoadingException: Loading errors encountered:
- Reap Mod (reap) encountered an error while dispatching the net.neoforged.fml.event.config.ModConfigEvent$Unloading event
java.lang.IllegalStateException: Cannot get config value before config is loaded.
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.ModContainer.acceptEvent(ModContainer.java:162) ~[loader-4.0.21.jar%23156!/:4.0] {}
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.config.ModConfig.setConfig(ModConfig.java:69) ~[loader-4.0.21.jar%23156!/:4.0] {}
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.config.ConfigTracker.closeConfig(ConfigTracker.java:233) ~[loader-4.0.21.jar%23156!/:4.0] {}
at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}
at java.base/java.util.Collections$SynchronizedCollection.forEach(Collections.java:2351) ~[?:?] {}
at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.config.ConfigTracker.unloadConfigs(ConfigTracker.java:129) ~[loader-4.0.21.jar%23156!/:4.0] {}
at TRANSFORMER/[email protected]/net.neoforged.neoforge.server.ServerLifecycleHooks.handleServerStopped(ServerLifecycleHooks.java:133) ~[neoforge-21.0.148-universal.jar%23170!/:?] {re:classloading}
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:750) ~[client-1.21-20240613.152323-srg.jar%23169!/:?] {re:classloading,pl:accesstransformer:B}
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:267) ~[client-1.21-20240613.152323-srg.jar%23169!/:?] {re:classloading,pl:accesstransformer:B}
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?] {}
Minecraft version
1.21
Mod version
1.21-1.1.1
Mod loader and version
21.0.148
Steps to reproduce
Open and close the game
Expected behavior
No erreur
Log files
Screenshots
No response