I created a custom world by adjusting the "continentalness" setting to enlarge oceans. I edited 7500 biome settings in minecraft/dimension/overworld.json
and 18 noise settings in minecraft/worldgen/noise_settings/overworld.json
. This worked fine, except the spawn point for the world was in the ocean.
The spawn point matches closely the spawn point for the unmodified world with the same seed. It appears the algorithm for spawn point is not taking into account these changes to the terrain generation.
To reproduce:
1. Create a vanilla datapack, or use this one: https://drive.google.com/file/d/1OyLG704MKEILKQGY9utUreFms7G7v2jw/view?usp=sharing (described here: https://www.reddit.com/r/minecraft_configs/comments/rbfyay/i_set_up_a_vanilla_118_worldgen_datapack_template/).
2. Copy the altered files to the correct locations.
3. Start a new world with the datapack. Give the world a seed of 1. --> Player spawns in the ocean.
Suggested fixes:
(1) When searching for the spawn point, remove hardcoded settings and take into account any changes to the terrain. A possible way of doing this is to expose the settings for the spawn point algorithm. For example, if the "continentalness" for beaches is changed from -0.15 to +0.30, it should be possible to configure this for the purposes of locating a spawn point.
(2) Searching for the spawn point should not use steps of 16 at all distances, but use larger steps farther out. This could locate a spawn point faster, at the cost of lower precision.
Attachments: dimension.overworld.json, worldgen.noise_settings.overworld.json.
Linked issues
Attachments
Comments 6
22w11a appears to have added some configuration for the world spawn point per suggested fix (1) in this bug report. It is described in https://www.youtube.com/watch?v=Az_BA5ka8C4 at 8 minutes 11 seconds (Noise Settings).
Does the spawn_target
configuration option solve your issue, or is some aspect of this still an issue in the latest version/snapshot?
I have been unable to verify that this issue is fixed due to changes to the terrain generation settings. The pre-1.19 settings of "Continentalness", "Erosion" etc have been changed to "Argument1" etc and it is difficult to tell which is which.
Also, it is not possible to access these settings since the "Export Settings" button was removed from the Edit World screen in 1.19.4.
After some effort, I have figured out how to alter the terrain generation of a 1.20.4 world. (Three files needed to be changed for it to work properly: "dimension\overworld.json", "worldgen\noise_settings\overworld.json" and "worldgen\density_function\overworld\offset.json").
I altered the terrain generation to make an island world by altering "continentalness". Then I created a world with seed 1 (a known problematic seed, see description). The player was spawned on a beach. This was expected behaviour.
This bug is FIXED.
The reason for this is that the spawn target is hardcoded in
OverworldBiomeBuilder.spawntarget()
, which is directly used inNoiseSampler
. So the real "bug" is that there is no configuration option for this.