LostCities - 1.21-8.0.0|Neoforge|mod is crashing on server side due to java.lang.NullPointerException
bbenshab opened this issue ยท 0 comments
I was using the default profile, started the server and it crashed after loading, error message:
java.lang.NullPointerException: Cannot read field "GENERATE_NETHER" because the return value of "java.util.Map.get
I attached the full log file:
crash.txt
#General settings
[profiles]
#Block to put underneath a bed so that it qualifies as a teleporter bed
specialBedBlock = "minecraft:diamond_block"
selectedProfile = "profile"
selectedCustomJson = ""
#The size of the todo queues for the lost city generator
#Range: 1 ~ 100000
todoQueueSize = 20
I also tried to use the auto generator to create the settings that I created on the client as a local map, but on the server, the file got reset due to the "wrong configuration":
#General settings
[profiles]
#Block to put underneath a bed so that it qualifies as a teleporter bed
specialBedBlock = "minecraft:diamond_block"
selectedProfile = "<CHECK>"
selectedCustomJson = ""
#The size of the todo queues for the lost city generator
#Range: 1 ~ 100000
todoQueueSize = 20
#If this is true then saplings will grow into trees during generation. This is more expensive
forceSaplingGrowth = true
#List of structures to avoid when generating cities (for example to avoid generating a city in a woodland mansion)
avoidStructures = ["minecraft:mansion", "minecraft:jungle_pyramid", "minecraft:desert_pyramid", "minecraft:igloo", "minecraft:swamp_huts", "minecraft:pillager_outpost"]
#If true then also avoid generating the structures mentioned in 'avoidStructures' in chunks adjacent to the chunk with the structure
avoidStructuresAdjacent = true
#If true then also avoid generating cities in chunks adjacent to the chunks with villages
avoidVillagesAdjacent = true
#If true then avoid flattening the terrain around the city in case there was a structure that was avoided
avoidFlattening = true
[05:01:54] [Server thread/ERROR] [ne.ne.bu.EventBus/EVENTBUS]: Exception caught during firing event: Cannot read field "GENERATE_NETHER" because the return value of "java.util.Map.get(Object)" is null
Index: 0
Listeners:
0: @SubscribeEvent: mcjty.lostcities.setup.ForgeEventHandlers@594e7582 onCreateSpawnPoint(Lnet/neoforged/neoforge/event/level/LevelEvent$CreateSpawnPosition;)V
java.lang.NullPointerException: Cannot read field "GENERATE_NETHER" because the return value of "java.util.Map.get(Object)" is null
at TRANSFORMER/[email protected]/mcjty.lostcities.setup.Config.getProfileForDimension(Config.java:103)
at TRANSFORMER/[email protected]/mcjty.lostcities.worldgen.LostCityFeature.getDimensionInfo(LostCityFeature.java:81)
at TRANSFORMER/[email protected]/mcjty.lostcities.setup.ForgeEventHandlers.onCreateSpawnPoint(ForgeEventHandlers.java:110)
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.SubscribeEventListener.invoke(SubscribeEventListener.java:49)
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 TRANSFORMER/[email protected]/net.neoforged.neoforge.event.EventHooks.onCreateWorldSpawn(EventHooks.java:624)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.setInitialSpawn(MinecraftServer.java:437)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.createLevels(MinecraftServer.java:378)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:337)
at TRANSFORMER/[email protected]/net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:193)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:670)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:267)
at java.base/java.lang.Thread.run(Thread.java:1583)
[05:01:55] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception
net.minecraft.ReportedException: Exception initializing level
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.createLevels(MinecraftServer.java:391) ~[server-1.21.1-20240808.144430-srg.jar%23184!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:A}
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:337) ~[server-1.21.1-20240808.144430-srg.jar%23184!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:A}
at TRANSFORMER/[email protected]/net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:193) ~[server-1.21.1-20240808.144430-srg.jar%23184!/:?] {re:classloading}
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:670) ~[server-1.21.1-20240808.144430-srg.jar%23184!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:A}
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:267) ~[server-1.21.1-20240808.144430-srg.jar%23184!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:A}
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?] {re:mixin}
Caused by: java.lang.NullPointerException: Cannot read field "GENERATE_NETHER" because the return value of "java.util.Map.get(Object)" is null
at TRANSFORMER/[email protected]/mcjty.lostcities.setup.Config.getProfileForDimension(Config.java:103) ~[lostcities-1.21-8.0.0.jar%23224!/:1.21-8.0.0] {re:classloading}
at TRANSFORMER/[email protected]/mcjty.lostcities.worldgen.LostCityFeature.getDi
[crash.txt](https://github.com/user-attachments/files/16644200/crash.txt)
mensionInfo(LostCityFeature.java:81) ~[lostcities-1.21-8.0.0.jar%23224!/:1.21-8.0.0] {re:classloading}
at TRANSFORMER/[email protected]/mcjty.lostcities.setup.ForgeEventHandlers.onCreateSpawnPoint(ForgeEventHandlers.java:110) ~[lostcities-1.21-8.0.0.jar%23224!/:1.21-8.0.0] {re:classloading}
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.SubscribeEventListener.invoke(SubscribeEventListener.java:49) ~[bus-8.0.1.jar%2367!/:?] {}
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.EventBus.post(EventBus.java:350) ~[bus-8.0.1.jar%2367!/:?] {}
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.EventBus.post(EventBus.java:315) ~[bus-8.0.1.jar%2367!/:?] {}
at TRANSFORMER/[email protected]/net.neoforged.neoforge.event.EventHooks.onCreateWorldSpawn(EventHooks.java:624) ~[neoforge-21.1.12-universal.jar%23185!/:?] {re:classloading}
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.setInitialSpawn(MinecraftServer.java:437) ~[server-1.21.1-20240808.144430-srg.jar%23184!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:A}
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.createLevels(MinecraftServer.java:378) ~[server-1.21.1-20240808.144430-srg.jar%23184!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_minecraftserver,pl:mixin:A}
... 5 more
[05:01:55] [Server thread/FATAL] [ne.ne.ne.co.NeoForgeMod/]: Preparing crash report with UUID 1dccb0cf-0d38-444e-8f3d-37925636f06c
[05:01:55] [Server thread/ERROR] [minecraft/MinecraftServer]: This crash report has been saved to: /home/minecraft/neoforge/crash-reports/crash-2024-08-17_05.01.55-server.txt