mojira.dev
MC-215120

World-gen datapacks can cause crashes when first generating world

The bug

I am trying to update a world-gen datapack from 21w05a to 21w06a. In doing so I need to load said datapack into a new world. However, the game crashes as soon as the game starts generating chunks.

How to reproduce

  1. Create a new world

  2. Add this datapack during world creation

  3. Begin generating the world

  4. Observe crash

Stack trace

21w06a\: [^crash-2021-02-11_12.59.47-server.txt]

Description: Exception generating new chunk

java.lang.ArrayIndexOutOfBoundsException: 247
	at cme.a(SourceFile:146)
	at cmq.a(SourceFile:246)
	at cmq.a(SourceFile:224)
	at cmq.a(SourceFile:162)
	at cpz$a.a(SourceFile:123)
	at cpz$a.a(SourceFile:62)
	at cqk.a(SourceFile:268)
	at cnz.a(SourceFile:36)
	at cjo.a(SourceFile:294)
	at cjo.a(SourceFile:277)
	at cjq.e(SourceFile:53)
	at cjq.a(SourceFile:231)
	at aai.a(SourceFile:563)
	at com.mojang.datafixers.util.Either$Left.map(Either.java:38)
	at aai.a(SourceFile:557)
	at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952)
	at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926)
	at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
	at aak.b(SourceFile:58)
	at apb.e(SourceFile:84)
	at apb.a(SourceFile:124)
	at apb.run(SourceFile:92)
	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)

Attachments

Comments 2

It looks like some of your features have a spread count above 128, I think that could potentially cause something like this to happen. I've had a similar issue (crash and new chunk out of bounds exception) when loading a biome with an invalid configured feature.

@Alex Lecuyer All of the features in this pack were valid in 21w05a. There is nothing there that would have caused this issue in 21w06a. After 21w07a a large number of features were broken due to the decorator revamps however.

Starmute

Panda4994

Confirmed

Very Important

Crash, Custom Worlds

21w06a, 21w07a

21w14a

Retrieved