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

Setting "width_smoothness" in file configured_carver to 0 causes the game to freeze or crash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 24w33a, 1.21.1, 24w35a, 24w40a, 1.21.2, 24w44a, 1.21.3, 1.21.4
    • None
    • windows 11
    • Community Consensus
    • Crash, Data Packs, World generation
    • Normal
    • Platform

      In data pack file worldgen/configured_carver/*.json, if you set value "width_smoothness" a negative number like -1, the game outputs:

      at net.minecraft.client.main.Main.main(SourceFile:256)
      Caused by: java.lang.IllegalStateException: Value must be non-negative: -1
      at com.mojang.serialization.DataResult$Error.getOrThrow(DataResult.java:287)
      

      0 is a non-negative and integer number. When you try to load a data pack where the value "width_smoothness" is 0 before you create a new world, the game output doesn't throw errors. 
      I made this carver be enabled only in the dimension "test:width_smoothness_value_0", not in "minecraft:overworld".
      Next, create a new world. You are spawned in the dimension "minecraft:overworld". Run this command: /execute in test:width_smoothness_value_0 run tp ~ ~ ~

      The game attempt to load new terrain on new dimension and the game outputs:

      ---- Minecraft Crash Report ----
      ...
      Description: Exception generating new chunk
      java.lang.IllegalArgumentException: Bound must be positive
      ...
      

      You will see the "Loading Terrain" screen for a long time. If you are lucky you will enter a completely empty world. if you quit the world you only see the "Saving world" screen. Only Task Manager can close the game.

      What I expected to happen was...:
      If players attempt to add these data packs, the game outputs a warning that the "width_smoothness" only accepts positive integers, not only warning that it needs a non-negative.
      Or: The game accepts the value 0 and generates terrain normally.

      What actually happened was...:
      The game accepts the value 0 but the game freezes or crashes, the game output throws errors.

      Steps to Reproduce:

      1. (Optional)Load the data pack "value_-1.zip" and check the content of the game output.
      2. Load the data pack "value_0.zip" and select the world preset "value_0".
      3. Create the world.
      4. When you enter the overworld, run the command: /execute in test:width_smoothness_value_0 run tp ~ ~ ~
      5. You will see the game freezes or crashes.

        1. crash-2024-08-15_23.58.54-server.txt
          7 kB
        2. deobf_crash-2024-08-15_23.58.54-server.txt
          18 kB
        3. image-2024-08-15-19-47-38-402.png
          image-2024-08-15-19-47-38-402.png
          27 kB
        4. latest.log
          10 kB
        5. value_0.zip
          5 kB
        6. value_-1.zip
          5 kB

            Unassigned Unassigned
            wplxfore wplxfore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              CHK: