When a structure:
Contains a campfire
The campfire is placed where a fluid was previously
During world generation (does NOT occur by placing the structure with a structure block)
Then the following crash occurs:
java.lang.NullPointerException: Feature placement
at bwo.f(SourceFile:201)
at bpr.a(SourceFile:181)
at cms.a(SourceFile:280)
at clx.a(SourceFile:62)
at clq$a.a(SourceFile:139)
at clv.a(SourceFile:63)
at cfl.a(SourceFile:78)
at cdc.a(SourceFile:53)
at cka.a(SourceFile:91)
at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
at cka.a(SourceFile:90)
at cjj.a(SourceFile:36)
at cdi.a(SourceFile:21)
at cdi.a(SourceFile:14)
at cdc.a(SourceFile:53)
at bkt.a(SourceFile:417)
at caa.a(SourceFile:125)
at cae.c(SourceFile:84)
at cae.a(SourceFile:214)
at wp.a(SourceFile:549)
at com.mojang.datafixers.util.Either$Left.map(Either.java:38)
at wp.a(SourceFile:543)
at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:966)
at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:940)
at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:456)
at wr.b(SourceFile:58)
at aiv.e(SourceFile:83)
at aiv.a(SourceFile:123)
at aiv.run(SourceFile:91)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Steps to reproduce:
Create a new world with default world generation settings
Install the attached datapack, which adds some campfires to the "minecraft:shipwreck/with_mast" structure. Don't forget to /reload.
Search for shipwrecks. Note that it may take a few attempts as not all shipwrecks use the with_mast template, and not all shipwrecks generate underwater.
Attachments
Comments 5
Happens when a campfire is placed in water during world generation:
The campfire is placed in water
The campfire tries to drop the items that it was baking
The tile entity is referenced to drop the items
As this happens during world generation, no world was assigned to the tile entity yet, the world being null
The tile entity checks if the world it is in is the server world by accessing a field on that null world
An NPE shows up, crashing the game
Affects 20w13b. Reproduced with the exact same data pack.