Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-182514

15 Block States per SubChunk Limit during World Upgrade


    • Icon: Bug Bug
    • Resolution: Fixed
    • 20w21a
    • 20w18a
    • None
    • Confirmed
    • Datafixer
    • Very Important

      The bug

      If there are more than 15 different block states (Excluding air) in a single subchunk when upgrading the world from 1.12.2 to 20w18a, the entire 256 high chunk will be reset back to default terrain.

      It was working perfectly fine in 20w16a, but broke in 20w17a.
      Upgrading the world from 1.13.0 works perfectly fine in 20w18a

      To reproduce

      1. Create a normal superflat world in 1.12.2
      2. Add 12 different blocks to a single subchunk (12 blocks + grass + dirt + bedrock = 15 blocks)
      3. Add 13 different blocks to a different subchunk (13 blocks + grass + dirt + bedrock = 16 blocks)
      4. Upgrade the world to 20w17a+
        The 1st chunk will be perfectly fine
        The entire 2nd chunk will be reset to default terrain

      Stack trace

      [12:38:43] [Server thread/ERROR]: Couldn't load chunk [-64, 40]
      java.lang.NullPointerException: null
      	at cgo.a(SourceFile:122) ~[20w18a.jar:?]
      	at cgu.a(SourceFile:249) ~[20w18a.jar:?]
      	at it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap$MapEntrySet.forEach(Int2IntOpenHashMap.java:927) ~[fastutil-8.2.1.jar:?]
      	at cgu.a(SourceFile:249) ~[20w18a.jar:?]
      	at cgo.h(SourceFile:121) ~[20w18a.jar:?]
      	at cgz.a(SourceFile:101) ~[20w18a.jar:?]
      	at yf.l(SourceFile:525) ~[20w18a.jar:?]
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1771) [?:?]
      	at alu.c(SourceFile:144) [20w18a.jar:?]
      	at yr$a.c(SourceFile:540) [20w18a.jar:?]
      	at alu.w(SourceFile:118) [20w18a.jar:?]
      	at yr$a.w(SourceFile:549) [20w18a.jar:?]
      	at yr.d(SourceFile:280) [20w18a.jar:?]
      	at net.minecraft.server.MinecraftServer.bc(SourceFile:777) [20w18a.jar:?]
      	at net.minecraft.server.MinecraftServer.w(SourceFile:765) [20w18a.jar:?]
      	at alu.c(SourceFile:127) [20w18a.jar:?]
      	at net.minecraft.server.MinecraftServer.v(SourceFile:750) [20w18a.jar:?]
      	at net.minecraft.server.MinecraftServer.b(SourceFile:532) [20w18a.jar:?]
      	at net.minecraft.server.MinecraftServer.i_(SourceFile:372) [20w18a.jar:?]
      	at enx.d(SourceFile:65) [20w18a.jar:?]
      	at net.minecraft.server.MinecraftServer.run(SourceFile:673) [20w18a.jar:?]
      	at java.lang.Thread.run(Thread.java:835) [?:?]

            boq [Mojang] Bartosz Bok
            RedCMD RedCMD
            13 Vote for this issue
            7 Start watching this issue