Dungeon Crawl

Dungeon Crawl

20M Downloads

Upgrade from 1.4.0 to 1.5.2: Unknown feature id: minecraft:dcdungeon

cpburnz opened this issue ยท 2 comments

commented

I'm running Dungeon Crawl 1.4.0 on my 1.14.4 server. It started crashing today with an error about:

[26Nov2019 22:16:20.550] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
net.minecraft.crash.ReportedException: Feature placement
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:833) ~[?:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:324) ~[?:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:764) ~[?:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:622) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Caused by: java.lang.ClassCastException: net.minecraft.tileentity.MobSpawnerTileEntity cannot be cast to net.minecraft.tileentity.SmokerTileEntity
        at xiroc.dungeoncrawl.part.block.Furnace$Smoker.setupBlock(Furnace.java:40) ~[?:1.4.0]
        at xiroc.dungeoncrawl.dungeon.DungeonPieces$DungeonPiece.setBlockState(DungeonPieces.java:720) ~[?:1.4.0]
        at xiroc.dungeoncrawl.dungeon.DungeonPieces$DungeonPiece.buildRotatedPart(DungeonPieces.java:848) ~[?:1.4.0]
        at xiroc.dungeoncrawl.dungeon.DungeonPieces$Part.func_74875_a(DungeonPieces.java:157) ~[?:1.4.0]
        at net.minecraft.world.gen.feature.structure.StructureStart.func_75068_a(StructureStart.java:62) ~[?:?]
        at xiroc.dungeoncrawl.dungeon.Dungeon$Start.func_75068_a(Dungeon.java:180) ~[?:1.4.0]
        at net.minecraft.world.gen.feature.structure.Structure.func_212245_a(SourceFile:69) ~[?:?]
        at net.minecraft.world.gen.feature.ConfiguredFeature.func_222734_a(SourceFile:36) ~[?:?]
        at net.minecraft.world.gen.placement.Placement.lambda$place$0(Placement.java:72) ~[?:?]
        at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419) ~[?:1.8.0_222]
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647) ~[?:1.8.0_222]
        at net.minecraft.world.gen.placement.Placement.func_214998_a(Placement.java:71) ~[?:?]
        at net.minecraft.world.gen.placement.ConfiguredPlacement.func_215093_a(SourceFile:35) ~[?:?]
        at net.minecraft.world.gen.feature.DecoratedFeature.func_212245_a(SourceFile:20) ~[?:?]
        at net.minecraft.world.gen.feature.DecoratedFeature.func_212245_a(SourceFile:13) ~[?:?]
        at net.minecraft.world.gen.feature.ConfiguredFeature.func_222734_a(SourceFile:36) ~[?:?]
        at net.minecraft.world.biome.Biome.func_203608_a(Biome.java:283) ~[?:?]
        at net.minecraft.world.gen.ChunkGenerator.func_202092_b(SourceFile:130) ~[?:?]
        at net.minecraft.world.chunk.ChunkStatus.lambda$static$9(ChunkStatus.java:73) ~[?:?]
        at net.minecraft.world.chunk.ChunkStatus.func_223198_a(ChunkStatus.java:196) ~[?:?]
        at net.minecraft.world.server.ChunkManager.lambda$null$17(ChunkManager.java:509) ~[?:?]
        at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[?:?]
        at net.minecraft.world.server.ChunkManager.lambda$func_223156_b$19(ChunkManager.java:507) ~[?:?]
        at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952) ~[?:1.8.0_222]
        at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926) ~[?:1.8.0_222]
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442) ~[?:1.8.0_222]
        at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter.func_219083_b(SourceFile:58) ~[?:?]
        at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213148_e(SourceFile:83) ~[?:?]
        at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213145_a(SourceFile:123) ~[?:?]
        at net.minecraft.util.concurrent.DelegatedTaskExecutor.run(SourceFile:91) ~[?:?]
        at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) ~[?:1.8.0_222]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_222]
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_222]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[?:1.8.0_222]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) ~[?:1.8.0_222]

I tried deleting the region and let it regenerate, and I'm still getting this crash. So I tried upgrading Dungeon Crawl from 1.4.0 to 1.5.2. Starting up the server with 1.5.2 causes a null pointer during chunk generation:

[26Nov2019 23:06:18.242] [Server thread/ERROR] [net.minecraft.world.gen.feature.structure.Structures/]: Unknown feature id: minecraft:dcdungeon
[26Nov2019 23:06:21.548] [Server thread/FATAL] [net.minecraft.util.concurrent.ThreadTaskExecutor/]: Error executing task on Chunk source main thread executor for minecraft:overworld
java.util.concurrent.CompletionException: net.minecraft.crash.ReportedException: Exception generating new chunk
        at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_222]
        at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) ~[?:1.8.0_222]
        at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:961) ~[?:1.8.0_222]
        at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926) ~[?:1.8.0_222]
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442) ~[?:1.8.0_222]
        at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter.func_219083_b(SourceFile:58) ~[?:?]
        at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213148_e(SourceFile:83) ~[?:?]
        at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213145_a(SourceFile:123) ~[?:?]
        at net.minecraft.util.concurrent.DelegatedTaskExecutor.run(SourceFile:91) ~[?:?]
        at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) ~[?:1.8.0_222]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_222]
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_222]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[?:1.8.0_222]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) ~[?:1.8.0_222]
Caused by: net.minecraft.crash.ReportedException: Exception generating new chunk
        at net.minecraft.world.server.ChunkManager.lambda$null$17(ChunkManager.java:520) ~[?:?]
        at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[?:?]
        at net.minecraft.world.server.ChunkManager.lambda$func_223156_b$19(ChunkManager.java:507) ~[?:?]
        at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952) ~[?:1.8.0_222]
        ... 11 more
Caused by: java.lang.NullPointerException
        at net.minecraft.world.gen.ChunkGenerator.func_222528_a(SourceFile:223) ~[?:?]
        at net.minecraft.world.chunk.ChunkStatus.lambda$static$3(ChunkStatus.java:52) ~[?:?]
        at net.minecraft.world.chunk.ChunkStatus$ISelectiveWorker.doWork(ChunkStatus.java:238) ~[?:?]
        at net.minecraft.world.chunk.ChunkStatus.func_223198_a(ChunkStatus.java:196) ~[?:?]
        at net.minecraft.world.server.ChunkManager.lambda$null$17(ChunkManager.java:509) ~[?:?]
        at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[?:?]
        at net.minecraft.world.server.ChunkManager.lambda$func_223156_b$19(ChunkManager.java:507) ~[?:?]
        at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952) ~[?:1.8.0_222]
        ... 11 more

with a curious log entry about "Unknown feature id: minecraft:dcdungeon". Is v1.5.2 meant to be incompatible with a world from v1.4.0?

Versions

Minecraft: 1.14.4
Forge: 28.1.0
DungeonCrawl: 1.4.0 (old)
DungeonCrawl: 1.5.2 (new)

commented

It's not really an issue. I was able to patch the 1.4.0 version by just adding an instanceof check in the method that was failing.

Updating the mod from 1.4.0 to 1.5.2 on an already existing world does not appear to work because of some null pointer exception. Now that may be due to a dungeon being half generated in 1.4.0 and being resumed in 1.5.2. It's not an issue. I was mainly curious to know if you intended them to be compatible.

commented

The first crash was caused by an issue that exists in the older versions. The second error is, indeed, because 1.5.0+ is not directly compatible with older worlds. I dont think that it would break anything if you load an older world with it apart from a broken dungeon maybe.