The Lost Cities

The Lost Cities

59M Downloads

Non-biome entries in cityBiomeFactors list causes crash

esotericist opened this issue ยท 3 comments

commented

I'm tinkering with the cityBiomeFactors settings in preparation for a server, and because it's a collaboration I had some comments in between blocks of biomes for my partner on the project.

Any blank line or comment in that space yields:

[23:21:36] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.ArrayIndexOutOfBoundsException: 1
    at mcjty.lostcities.config.LostCityProfile.getBiomeFactorMap(LostCityProfile.java:260) ~[LostCityProfile.class:?]
    at mcjty.lostcities.dimensions.world.lost.City.getCityFactor(City.java:97) ~[City.class:?]
    at mcjty.lostcities.dimensions.world.lost.BuildingInfo.isCity(BuildingInfo.java:259) ~[BuildingInfo.class:?]
    at mcjty.lostcities.dimensions.world.LostCityChunkGenerator.func_180514_a(LostCityChunkGenerator.java:394) ~[LostCityChunkGenerator.class:?]
    at net.minecraftforge.common.chunkio.ChunkIOProvider.syncCallback(ChunkIOProvider.java:101) ~[ChunkIOProvider.class:?]
    at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:94) ~[ChunkIOExecutor.class:?]
    at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119) ~[lv.class:?]
    at net.minecraft.world.gen.ChunkProviderServer.func_186028_c(ChunkProviderServer.java:90) ~[lv.class:?]
    at net.minecraft.world.gen.ChunkProviderServer.func_186025_d(ChunkProviderServer.java:136) ~[lv.class:?]
    at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:302) ~[MinecraftServer.class:?]
    at net.minecraft.server.integrated.IntegratedServer.func_71247_a(IntegratedServer.java:106) ~[cch.class:?]
    at net.minecraft.server.integrated.IntegratedServer.func_71197_b(IntegratedServer.java:120) ~[cch.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:442) [MinecraftServer.class:?]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]

I think if there's a problem with a config file Lost Cities should probably complain to the console so that an end-user knows where the problem is.

Also it'd be nice if it didn't error on comments. ๐Ÿ˜€

commented

The errors on comments is not something I can fix. That's just the default config parser in forge. I can give better errors though

commented

Fair enough.

commented

done for next version