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

Trying to modify the world height of a world after it's already been generated gives a null pointer exception

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 20w49a, 20w51a
    • Fix Version/s: 21w20a
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Crash
    • Mojang Priority:
      Very Important

      Description

      The bug

      When adding a datapack to modify the world height limits of any world that was previously loaded with the default height limits causes a crash. This also occurs when you load a world with the datapack, then disable it, and then attempt to re-enable it.

      This doesn't occur when you remove said datapack from a world that has been loaded using it, which leads me to believe this is a bug, and not intentional.

      How to reproduce

      1. Generate any world without using a datapack to change the world height limits
      2. Close out of the world and add the datapack
        The world will crash upon any attempt to load it

      or:

      1. Generate a world with the datapack
        → You will notice the world height limits are different (you will be able to build above y=256 and below y=0 with this specific datapack)
      2. Use /datapack disable to disable it
      3. Exit the world and then re-enter it
        → The world height limits will be reverted to default (any blocks you've placed above y=256 or below y=0 will be gone completely)
      4. Re-enable the datapack using /datapack enable
      5. Exit the world
        The world will crash upon any attempt to open it

      THE DATAPACK USED TO TEST THIS:

      Linked via attachment

      CRASH LOG:

      ---- Minecraft Crash Report -------- Minecraft Crash Report ----// Don't be sad, have a hug! <3
      Time: 12/2/20 6:40 PMDescription: Exception ticking world
      java.lang.NullPointerException: Exception ticking world at btl.a(SourceFile:371) at btl.a(SourceFile:252) at btl.a(SourceFile:199) at btl.a(SourceFile:187) at aaq.a(SourceFile:381) at aaq$$Lambda$4856/1014682598.accept(Unknown Source) at java.util.ArrayList.forEach(ArrayList.java:1249) at aaq.p(SourceFile:361) at aaq.a(SourceFile:330) at aas.a(SourceFile:361) at net.minecraft.server.MinecraftServer.b(SourceFile:870) at net.minecraft.server.MinecraftServer.a(SourceFile:810) at esz.a(SourceFile:93) at net.minecraft.server.MinecraftServer.w(SourceFile:669) at net.minecraft.server.MinecraftServer.a(SourceFile:257) at net.minecraft.server.MinecraftServer$$Lambda$4484/2060857092.run(Unknown Source) at java.lang.Thread.run(Thread.java:745)
      
      A detailed walkthrough of the error, its code path and all known details is as follows:---------------------------------------------------------------------------------------
      -- Head --Thread: Server threadStacktrace: at btl.a(SourceFile:371) at btl.a(SourceFile:252) at btl.a(SourceFile:199) at btl.a(SourceFile:187) at aaq.a(SourceFile:381) at aaq$$Lambda$4856/1014682598.accept(Unknown Source) at java.util.ArrayList.forEach(ArrayList.java:1249) at aaq.p(SourceFile:361) at aaq.a(SourceFile:330) at aas.a(SourceFile:361)
      -- Affected level --Details: All players: 1 total; [aat['BoxOfWood'/6435, l='ServerLevel[Test World Height]', x=-58.12, y=92.00, z=-106.32]] Chunk stats: 2025 Level dimension: minecraft:overworld Level spawn location: World: (-96,92,-48), Section: (at 0,12,0 in -6,5,-3; chunk contains blocks -96,-128,-48 to -81,511,-33), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,-128,-512 to -1,511,-1) Level time: 3353 game time, 3353 day time Level name: Test World Height Level game mode: Game mode: survival (ID 0). Hardcore: true. Cheats: false Level weather: Rain time: 100253 (now: false), thunder time: 116384 (now: false) Known server brands: vanilla Level was modded: false Level storage version: 0x04ABD - AnvilStacktrace: at net.minecraft.server.MinecraftServer.b(SourceFile:870) at net.minecraft.server.MinecraftServer.a(SourceFile:810) at esz.a(SourceFile:93) at net.minecraft.server.MinecraftServer.w(SourceFile:669) at net.minecraft.server.MinecraftServer.a(SourceFile:257) at net.minecraft.server.MinecraftServer$$Lambda$4484/2060857092.run(Unknown Source) at java.lang.Thread.run(Thread.java:745)
      -- System Details --Details: Minecraft Version: 20w49a Minecraft Version ID: 20w49a Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 2166725320 bytes (2066 MB) / 3288334336 bytes (3136 MB) up to 4294967296 bytes (4096 MB) CPUs: 4 JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx4G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M Player Count: 1 / 8; [aat['BoxOfWood'/6435, l='ServerLevel[Test World Height]', x=-58.12, y=92.00, z=-106.32]] Data Packs: vanilla, file/negative_height Type: Integrated Server (map_client.txt) Is Modded: Probably not. Jar signature remains and both client + server brands are untouched.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              fry [Mojang] Georgii Gavrichev
              Reporter:
              SailorDoge Random Guyson
              Votes:
              7 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                CHK: