1.18.2 Biome-Dependant Fog Densities Config Broken
Feldor-Lex opened this issue ยท 0 comments
When trying to use the biome-dependant fog densities, the config will fail to be read properly and crash. This includes the example settings provided, and (for the sake of testing) using values with no decimal places.
Tested values:
biomeFogMap = ["minecraft:plains,0.1,1.2,5066351", "minecraft:nether_wastes,0,0.5,5056548"]
biomeFogMap = ["minecraft:plains,0,1,5066351", "minecraft:nether_wastes,0,1,5056548"]
Error(full log attached):
Recovery reason: java.util.concurrent.CompletionException: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at TRANSFORMER/[email protected]/birsy.foglooksgoodnow.config.FogLooksGoodNowConfig.getDensityConfigs(FogLooksGoodNowConfig.java:57)
at TRANSFORMER/[email protected]/birsy.foglooksgoodnow.client.FogManager.initializeConfig(FogManager.java:85)
at TRANSFORMER/[email protected]/birsy.foglooksgoodnow.FogLooksGoodNowMod.lambda$onConfigLoad$0(FogLooksGoodNowMod.java:31)
at java.base/java.util.Optional.ifPresent(Optional.java:178)
...
I suspect the issue is with .split(".*")
in the FogLooksGoodNowConfig.java file meaning to be .split(",*")
as the config inputs are comma-seperated but I'm unsure. Could also be an issue with regex using String.split().