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:
(Optional)Load the data pack "value_-1.zip" and check the content of the game output.
Load the data pack "value_0.zip" and select the world preset "value_0".
Create the world.
When you enter the overworld, run the command:
/execute in test:width_smoothness_value_0 run tp ~ ~ ~
You will see the game freezes or crashes.
Please attach the full game output log showing the error.