Mojira Archive
MC-68124

Game crashes with superflat preset is above 256: java.lang.ArrayIndexOutOfBoundsException: 256

The bug

If the player makes a preset for superflat that goes over the build limit, the game hangs on the loading screen.

Example preset:

minecraft:bedrock,255*minecraft:dirt,minecraft:grass;1;

Crash report

Description: mouseClicked event handler

java.lang.ArrayIndexOutOfBoundsException: 256
	at buc.w(SourceFile:205)
	at buc.b(SourceFile:383)
	at cjl.a(SourceFile:70)
	at cjz$1.a(SourceFile:170)
	at cgt.mouseClicked(SourceFile:103)
	at chp.mouseClicked(SourceFile:46)
	at cfu.b(SourceFile:83)
	at cfu$$Lambda$1007/1799068185.run(Unknown Source)
	at ckc.a(SourceFile:430)
	at cfu.a(SourceFile:83)
	at cfu$$Lambda$839/270276013.invoke(Unknown Source)
	at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36)
	at org.lwjgl.system.JNI.invokeV(Native Method)
	at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3108)
	at cgc.a(SourceFile:321)
	at cfs.c(SourceFile:875)
	at cfs.a(SourceFile:395)
	at net.minecraft.client.main.Main.main(SourceFile:144)