FabricTPA

FabricTPA

56.6k Downloads

Fix config parsing

NebelNidas opened this issue · 3 comments

commented

Every time I start up Minecraft, this exception is there to greet me:

[03:06:53] [main/INFO]: Initializing...
[03:06:53] [main/FATAL]: Failed to parse the config!
[03:06:53] [main/INFO]: [STDERR]: java.lang.NumberFormatException: For input string: "null"
[03:06:53] [main/INFO]: [STDERR]: 	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
[03:06:53] [main/INFO]: [STDERR]: 	at java.base/java.lang.Integer.parseInt(Integer.java:652)
[03:06:53] [main/INFO]: [STDERR]: 	at java.base/java.lang.Integer.parseInt(Integer.java:770)
[03:06:53] [main/INFO]: [STDERR]: 	at eu.codedsakura.mods.ConfigUtils$IntegerConfigValue.getFromProps(ConfigUtils.java:137)
[03:06:53] [main/INFO]: [STDERR]: 	at eu.codedsakura.mods.ConfigUtils$IntegerConfigValue.getFromProps(ConfigUtils.java:119)
[03:06:53] [main/INFO]: [STDERR]: 	at eu.codedsakura.mods.ConfigUtils.lambda$read$0(ConfigUtils.java:42)
[03:06:53] [main/INFO]: [STDERR]: 	at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4390)
[03:06:53] [main/INFO]: [STDERR]: 	at eu.codedsakura.mods.ConfigUtils.read(ConfigUtils.java:42)
[03:06:53] [main/INFO]: [STDERR]: 	at eu.codedsakura.mods.ConfigUtils.<init>(ConfigUtils.java:33)
[03:06:53] [main/INFO]: [STDERR]: 	at eu.codedsakura.fabrictpa.FabricTPA.onInitialize(FabricTPA.java:118)
[03:06:53] [main/INFO]: [STDERR]: 	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke0(EntrypointUtils.java:50)
[03:06:53] [main/INFO]: [STDERR]: 	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointUtils.invoke(EntrypointUtils.java:36)
[03:06:53] [main/INFO]: [STDERR]: 	at net.fabricmc.loader.entrypoint.minecraft.hooks.EntrypointClient.start(EntrypointClient.java:32)
[03:06:53] [main/INFO]: [STDERR]: 	at net.minecraft.class_310.<init>(class_310.java:437)
[03:06:53] [main/INFO]: [STDERR]: 	at net.minecraft.client.main.Main.main(Main.java:177)
[03:06:53] [main/INFO]: [STDERR]: 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[03:06:53] [main/INFO]: [STDERR]: 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[03:06:53] [main/INFO]: [STDERR]: 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[03:06:53] [main/INFO]: [STDERR]: 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[03:06:53] [main/INFO]: [STDERR]: 	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:226)
[03:06:53] [main/INFO]: [STDERR]: 	at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:146)
[03:06:53] [main/INFO]: [STDERR]: 	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)

Can't this be fixed somehow?

commented

can you show the config you're using?

commented

Looks like there were a few null values in there:

bossbar=null
stand-still=null
cooldown=null
cooldown-mode=null
timeout=60

Which is weird, because I've never modified the file. It must have been corrupted by an update 🤷‍♂️

commented

that could be, i changed the parsing at one point, i think between 1.x and 2.x