mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
feat: ocean (#16)
* feat(gameplay): add Ocean biome with water generation and heightmap adjustments - Introduce Ocean biome enum, builder, and detection logic. - Add ocean water building to all existing biomes and modify heightmap thresholds for low mountainous areas. - Skip cave and river generation in Ocean (and River) biomes; avoid carving water blocks. - Comment out border blending call and update block fill logic. * fix(gameplay): re-enable border blending and protect water in cave gen * refactor(generation): move ocean water build to later phase * feat(block): add is_transitional property and refine border blending * fix(block): set stone block as transitional * fix(world): generate temporary chunks for surface blend neighbor data * fix(gameplay): simplify block fill logic in blend_surface_blocks_borders * refactor(tree): remove debug logging and unused include
This commit is contained in:
@@ -62,6 +62,10 @@ std::string get_biome_str(BiomeType biome) {
|
||||
break;
|
||||
case SNOWY_PLAIN:
|
||||
str = "Snowy Plain";
|
||||
break;
|
||||
case OCEAN:
|
||||
str = "Ocean";
|
||||
break;
|
||||
case NONE:
|
||||
str = "Unknown";
|
||||
break;
|
||||
@@ -190,6 +194,9 @@ BiomeType determine_biome(const BiomeConditions& conditions) {
|
||||
if (conditions.mountainous > 0.75) {
|
||||
return MOUNTAIN;
|
||||
}
|
||||
if (conditions.mountainous < 0.25) {
|
||||
return OCEAN;
|
||||
}
|
||||
auto temp = conditions.temp;
|
||||
auto humid = conditions.humid;
|
||||
if (temp < 0.5) {
|
||||
|
||||
Reference in New Issue
Block a user