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

Modifying a world preset to not include overworld settings will not give a datapack error, but selecting the world type will instantly crash your game

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 22w11a, 22w13a, 22w17a, 1.19 Pre-release 1
    • 1.19 Pre-release 5
    • None
    • Confirmed
    • Crash
    • Important

    Description

      Adding a world preset via datapack without the overworld will not give an error when validating datapacks. However, the game will immediately crash due to "Overworld settings missing".

      To Reproduce

      1. Enable the attached data pack (bug_report.zip) in the world creation screen.
      2. Cycle through the world type setting.

      Observed Result

      No error when validating datapack, but the game crashes when the world preset is on screen.

      Description: mouseClicked event handler
      java.lang.IllegalStateException: Overworld settings missing
      	at net.minecraft.world.level.levelgen.WorldGenSettings.void <init>(long,boolean,boolean,net.minecraft.core.Registry)(WorldGenSettings.java:67)
      	at net.minecraft.world.level.levelgen.presets.WorldPreset.net.minecraft.world.level.levelgen.WorldGenSettings createWorldGenSettings(long,boolean,boolean)(WorldPreset.java:43)
      	at net.minecraft.world.level.levelgen.presets.WorldPreset.net.minecraft.world.level.levelgen.WorldGenSettings recreateWorldGenSettings(net.minecraft.world.level.levelgen.WorldGenSettings)(WorldPreset.java:47)
      	at net.minecraft.client.gui.screens.worldselection.WorldGenSettingsComponent.void init(net.minecraft.client.gui.screens.worldselection.CreateWorldScreen,net.minecraft.client.Minecraft,net.minecraft.client.gui.Font)(WorldGenSettingsComponent.java:111)
      	at net.minecraft.client.gui.screens.worldselection.WorldGenSettingsComponent.void lambda$init$7(net.minecraft.client.gui.screens.worldselection.CreateWorldScreen,net.minecraft.client.gui.components.CycleButton,net.minecraft.core.Holder)(WorldGenSettingsComponent.java:111)
      	at net.minecraft.client.gui.screens.worldselection.WorldGenSettingsComponent.net.minecraft.world.level.levelgen.WorldGenSettings lambda$init$6(net.minecraft.core.Holder,net.minecraft.world.level.levelgen.WorldGenSettings)(WorldGenSettingsComponent.java:111)
      	at net.minecraft.client.gui.screens.worldselection.WorldCreationContext.net.minecraft.client.gui.screens.worldselection.WorldCreationContext withSettings(net.minecraft.client.gui.screens.worldselection.WorldCreationContext$SimpleUpdater)(WorldCreationContext.java:25)
      	at net.minecraft.client.gui.screens.worldselection.WorldGenSettingsComponent.void updateSettings(net.minecraft.client.gui.screens.worldselection.WorldCreationContext$SimpleUpdater)(WorldGenSettingsComponent.java:208)
      	at net.minecraft.client.gui.screens.worldselection.WorldGenSettingsComponent.void init(net.minecraft.client.gui.screens.worldselection.CreateWorldScreen,net.minecraft.client.Minecraft,net.minecraft.client.gui.Font)(WorldGenSettingsComponent.java:111)
      	at net.minecraft.client.gui.screens.worldselection.WorldGenSettingsComponent.void lambda$init$7(net.minecraft.client.gui.screens.worldselection.CreateWorldScreen,net.minecraft.client.gui.components.CycleButton,net.minecraft.core.Holder)(WorldGenSettingsComponent.java:111)
      	at net.minecraft.client.gui.screens.worldselection.WorldGenSettingsComponent.net.minecraft.world.level.levelgen.WorldGenSettings lambda$init$6(net.minecraft.core.Holder,net.minecraft.world.level.levelgen.WorldGenSettings)(WorldGenSettingsComponent.java:111)
      	at net.minecraft.client.gui.components.CycleButton.void cycleValue(int)(CycleButton.java:68)
      	at net.minecraft.client.gui.components.CycleButton.void onPress()(CycleButton.java:58)
      	at net.minecraft.client.gui.components.AbstractButton.void onClick(double,double)(AbstractButton.java:16)
      	at net.minecraft.client.gui.components.AbstractWidget.boolean mouseClicked(double,double,int)(AbstractWidget.java:121)
      	at net.minecraft.client.gui.components.events.ContainerEventHandler.boolean mouseClicked(double,double,int)(ContainerEventHandler.java:27)
      	at net.minecraft.client.gui.components.events.ContainerEventHandler.void setFocused(net.minecraft.client.gui.components.events.GuiEventListener)(ContainerEventHandler.java:27)
      	at net.minecraft.client.MouseHandler.void lambda$onPress$0(boolean[],net.minecraft.client.gui.screens.Screen,double,double,int)(MouseHandler.java:94)
      	at net.minecraft.client.gui.screens.Screen.void wrapScreenError(java.lang.Runnable,java.lang.String,java.lang.String)(Screen.java:496)
      	at net.minecraft.client.MouseHandler.void onPress(long,int,int,int)(MouseHandler.java:94)
      	at net.minecraft.client.MouseHandler.void lambda$setup$4(long,int,int,int)(MouseHandler.java:165)
      	at net.minecraft.util.thread.BlockableEventLoop.void execute(java.lang.Runnable)(BlockableEventLoop.java:103)
      	at net.minecraft.client.MouseHandler.void lambda$setup$5(long,int,int,int)(MouseHandler.java:165)
      	at org.lwjgl.glfw.GLFWMouseButtonCallbackI.null callback(null)(GLFWMouseButtonCallbackI.java:36)
      	at org.lwjgl.system.JNI.null invokeV(null)(JNI.java)
      	at org.lwjgl.glfw.GLFW.null glfwPollEvents(null)(GLFW.java:3101)
      	at com.mojang.blaze3d.systems.RenderSystem.void flipFrame(long)(RenderSystem.java:197)
      	at com.mojang.blaze3d.platform.Window.void updateDisplay()(Window.java:310)
      	at net.minecraft.client.Minecraft.void runTick(boolean)(Minecraft.java:1154)
      	at net.minecraft.client.Minecraft.void run()(Minecraft.java:728)
      	at net.minecraft.client.main.Main.void main(java.lang.String[])(Main.java:236)
      

      Expected Result

      The datapack validation will fail.

      Attachments

        Activity

          People

            boq [Mojang] Bartosz Bok
            LegoEmmetMC Apollo
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              CHK: