Bassebombecraft

Bassebombecraft

18.5k Downloads

Mod initialization fails with: No configuration setting found for key AttackNearestMobCommand

Closed this issue ยท 1 comments

commented

Observed error when the mod is launched using ATLaucnher:

[10:24:41] [modloading-worker-2/ERROR]: Failed to create mod instance. ModID: bassebombecraft, class bassebombecraft.BassebombeCraft
java.lang.ExceptionInInitializerError: null
	at bassebombecraft.BassebombeCraft.<init>(BassebombeCraft.java:166) ~[?:1.14.3-1.31-beta]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_181]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_181]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_181]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_181]
	at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_181]
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:131) ~[?:28.1]
	at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_181]
	at java.util.function.Consumer.lambda$andThen$0(Consumer.java:65) ~[?:1.8.0_181]
	at net.minecraftforge.fml.ModContainer.transitionState(ModContainer.java:112) ~[?:?]
	at net.minecraftforge.fml.ModList.lambda$null$10(ModList.java:134) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) [?:1.8.0_181]
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) [?:1.8.0_181]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) [?:1.8.0_181]
	at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291) [?:1.8.0_181]
	at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731) [?:1.8.0_181]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_181]
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_181]
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_181]
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_181]
Caused by: com.typesafe.config.ConfigException$Missing: /home/faadmin/Atlauncher/instances/VanillaMinecraftwithForge/config/bassebombecraft-1.14.3-1.31-beta.conf: 1: No configuration setting found for key 'AttackNearestMobCommand'
	at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:156) ~[?:1.14.3-1.31-beta]
	at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:149) ~[?:1.14.3-1.31-beta]
	at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:176) ~[?:1.14.3-1.31-beta]
	at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:188) ~[?:1.14.3-1.31-beta]
	at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:193) ~[?:1.14.3-1.31-beta]
	at com.typesafe.config.impl.SimpleConfig.getConfigNumber(SimpleConfig.java:223) ~[?:1.14.3-1.31-beta]
	at com.typesafe.config.impl.SimpleConfig.getInt(SimpleConfig.java:234) ~[?:1.14.3-1.31-beta]
	at bassebombecraft.entity.commander.command.AttackNearestMobCommand.<init>(AttackNearestMobCommand.java:54) ~[?:1.14.3-1.31-beta]
	at bassebombecraft.entity.commander.DefaultMobCommanderRepository.<clinit>(DefaultMobCommanderRepository.java:23) ~[?:1.14.3-1.31-beta]
	... 20 more
[10:24:41] [Client thread/FATAL]: Failed to complete lifecycle event CONSTRUCT, 1 errors found
[10:24:41] [Client thread/FATAL]: EventBus 0 shutting down - future events will not be posted.
java.lang.Exception: stacktrace
	at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-1.0.0-service.jar:?]
	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:97) ~[?:?]
	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:79) ~[?:?]
	at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:453) ~[?:?]
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:365) ~[?:?]
	at net.minecraft.client.main.Main.main(SourceFile:155) ~[client-1.14.4.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:56) ~[forge-1.14.4-28.1.10.jar:28.1]
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-3.2.0.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:50) [modlauncher-3.2.0.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:68) [modlauncher-3.2.0.jar:?]
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:80) [modlauncher-3.2.0.jar:?]
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-3.2.0.jar:?]
commented

Observation from: https://github.com/lightbend/config#api-example

If you see errors like com.typesafe.config.ConfigException$Missing: No configuration setting found for key foo, and you're sure that key is defined in your config file, they might appear e.g. when you're loading configuration from a thread that's not the JVM's main thread. Try passing the ClassLoader in manually - e.g. with ConfigFactory.load(getClass().getClassLoader()) or setting the context class loader. If you don't pass one, Lightbend Config uses the calling thread's contextClassLoader, and in some cases, it may not have your configuration files in its classpath, so loading the config on that thread can yield unexpected, erroneous results.

https://stackoverflow.com/questions/27972232/no-configuration-setting-found-for-key-typesafe-config

This doesn't solve the problem in ATLauncher.