mojira.dev
MC-220652

IndexOutOfBound exception hard crash when loading a simple custom dimension datapack

'data/foo/dimension/custom.json' : 
{
  "generator": {
    "biome_source": {
      "biome": "minecraft:giant_tree_taiga_hills",
      "seed": 6068332230356764769,
      "type": "minecraft:fixed"
    },
    "seed": 6068332230356764769,
    "settings": "minecraft:overworld",
    "type": "minecraft:noise"
  },
  "type": "minecraft:the_nether"
}

Key is that nether world type defines world bounds of 0-256 and overworld generator settings define them from -64 to 320.
Suggesting using only one set of world limits to prevent from accessing a chunk array element below index 0.

To reproduce

  1. Download the attached data pack

[media]
  1. Create a new world with that data pack and load it

  2. /execute in rift:dimn10n8 run tp @s ~ ~ ~
    → ❌ The game crashes

Stack trace

21w11a\: [^crash-2021-03-24_20.57.40-server.txt]

Description: Feature placement

java.lang.ArrayIndexOutOfBoundsException: Index 16 out of bounds for length 16
	at cks.b(SourceFile:62)
	at ckr.a(SourceFile:30)
	at it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap.computeIfAbsent(Long2ObjectOpenHashMap.java:479)
	at ckr.a(SourceFile:28)
	at ckr.b(SourceFile:40)
	at cqe.a(SourceFile:173)
	at cqe.a(SourceFile:181)
	at crh.a(SourceFile:180)
	at crh.a(SourceFile:155)
	at crh.a(SourceFile:53)
	at cpm.a(SourceFile:55)
	at cps.a(SourceFile:29)
	at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at cps.a(SourceFile:28)
	at cpm.a(SourceFile:55)
	at cps.a(SourceFile:29)
	at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at cps.a(SourceFile:28)
	at cpm.a(SourceFile:55)
	at cps.a(SourceFile:29)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180)
	at java.base/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:104)
	at java.base/java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:699)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
	at cps.a(SourceFile:28)
	at cpm.a(SourceFile:55)
	at bvz.a(SourceFile:382)
	at cku.a(SourceFile:233)
	at ckw.c(SourceFile:100)
	at ckw.a(SourceFile:231)
	at aas.a(SourceFile:563)
	at com.mojang.datafixers.util.Either$Left.map(Either.java:38)
	at aas.a(SourceFile:557)
	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1146)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
	at aau.b(SourceFile:58)
	at aqc.f(SourceFile:92)
	at aqc.a(SourceFile:132)
	at aqc.run(SourceFile:100)
	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1429)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

Attachments

Comments 2

This also happens when a dimension defines a lower bounds than a previous usual 0-256, for instance the following datapack (attached) requests height to be limited to 160 blocks, and that crashes vanilla feature decorators.

[media]

Confirmed; however, please remember to attach the crash report when reporting a crash in the future.

gnembon

Panda4994

Confirmed

Very Important

Crash, Custom Worlds

21w11a

21w14a

Retrieved