BlackJar72 / DoomlikeDungeons

A procedural multi-room dungeon generator for Minecraft
https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/1293843-doomlike-dungeons
MIT License
23 stars 12 forks source link

Danger! Failed to finalize a dungeon after building! #3

Closed LemADEC closed 6 years ago

LemADEC commented 7 years ago

As of DoomlikeDungeons-1.9.0-MC1.10.jar, the following NullPointerException is reported during world generation:

[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:101]: [DLDUNGEONS] Danger!  Failed to finalize a dungeon after building!
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]: java.lang.NullPointerException
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at jaredbgreat.dldungeons.pieces.chests.BasicChest.fillChest(BasicChest.java:99)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at jaredbgreat.dldungeons.pieces.chests.WeakChest.place(WeakChest.java:42)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at jaredbgreat.dldungeons.planner.Dungeon.addTileEntitesToRoom(Dungeon.java:404)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at jaredbgreat.dldungeons.planner.Dungeon.addTileEntities(Dungeon.java:384)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at jaredbgreat.dldungeons.planner.mapping.MapMatrix.build(MapMatrix.java:182)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at jaredbgreat.dldungeons.builder.Builder.buildDungeon(Builder.java:103)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at jaredbgreat.dldungeons.builder.Builder.placeDungeon(Builder.java:86)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at jaredbgreat.dldungeons.GenerationHandler.generate(GenerationHandler.java:99)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraftforge.fml.common.registry.GameRegistry.redirect$onGenerateWorld$zzd000(GameRegistry.java:665)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraftforge.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:120)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraft.world.chunk.Chunk.func_186034_a(Chunk.java:1001)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraft.world.chunk.Chunk.func_186030_a(Chunk.java:964)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraft.world.gen.ChunkProviderServer.func_186025_d(ChunkProviderServer.java:154)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraft.server.management.PlayerChunkMapEntry.redirect$onProvidePlayerChunk$zpb000(PlayerChunkMapEntry.java:1079)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraft.server.management.PlayerChunkMapEntry.func_187268_a(PlayerChunkMapEntry.java:126)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraft.server.management.PlayerChunkMap.func_72693_b(SourceFile:147)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:222)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:698)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:387)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471)
[15:54:03] [Server thread/INFO] [STDERR]: [jaredbgreat.dldungeons.GenerationHandler:generate:102]:   at java.lang.Thread.run(Thread.java:745)
BlackJar72 commented 7 years ago

I've not see this, but I think I know what's going on. BasicChest and TreasureChest have a line that makes sure the loot is being put in a chest. Its very unlikely this would ever happen, but a few blocks are protected so the mod can't replace them (spawners, chests, and the end portal get this). So its possible that it just lucked into trying to replace a spawner with a weak chest, and then crashed because there was no chest there. Thanks for telling me. This is in all versions, but an easy fix (I think I just fixed it in the 1.11.2 version after reading this). It may just be a little bit to port the fix to other versions and get everything updated online.

BlackJar72 commented 7 years ago

OK, try the new version 1.9.2 -- it's should be fixed now, if its what I think it was. (It would be helpful if you test with the same seed since this seems to be a rare crash.)

If not, I'd like to know if you're using the default themes or have made changes -- my next guess would be a problem in chests.cfg.

LemADEC commented 7 years ago

We're using the default configuration for the mod. I've no idea on the coordinates where it happened in the map.

BlackJar72 commented 7 years ago

Have you tried the new version at least?

LemADEC commented 7 years ago

it'll be in our next update of the pack, probably this week end, thanks :)