Some features and decorators use Random.randInt with a configurable value as input. This input is not always validated to be above 0 and can crash the game.
|random_patch||xspread < 0
or yspread < 0
or zspread < 0
|flower||xspread <= 0
or yspread <= 0
or zspread <= 0
|block_placer.type is "column_placer"
and block_placer.extra_size < 0
|geode||min_distribution_points >= max_distribution_points
or min_point_offset >= max_point_offset
|simple_random_selector||features is empty|
|tree||foliage_placer.type is "pine_foliage_placer"
and calculated trunk height < foliage_placer.height 
|depth_average||spread < 0|
|glowstone||count < 0|
- Download the attached data pack Crashland.zip and add it to a new world
- Teleport to the mojira:crashland dimension
- The game crashes
- To test each of the above cases, open data/mojira/worldgen/biome/crashland.json and edit the configured feature on line 21.
Method and class names using Mojang names.
1. The reason only the PineFoliagePlacer can crash is because it uses nextInt in PineFoliagePlacer.foliageRadius. The value that is used for this is computed by trunkPlacer.getTreeHeight(...) - foliagePlacer.foliageHeight(...) + 1.