mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-06-18 00:27:02 +08:00
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.
This commit is contained in:
@@ -15,6 +15,7 @@ enum class BiomeType {
|
||||
MOUNTAIN,
|
||||
RIVER,
|
||||
SNOWY_PLAIN,
|
||||
OCEAN,
|
||||
NONE
|
||||
};
|
||||
|
||||
|
||||
@@ -13,5 +13,6 @@ public:
|
||||
protected:
|
||||
void build_bottom();
|
||||
void place_grass();
|
||||
void ocean_water_build();
|
||||
};
|
||||
} // namespace Cubed
|
||||
23
include/Cubed/gameplay/builders/ocean_builder.hpp
Normal file
23
include/Cubed/gameplay/builders/ocean_builder.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Cubed/gameplay/builders/biome_builder.hpp"
|
||||
namespace Cubed {
|
||||
|
||||
class ChunkGenerator;
|
||||
|
||||
class OceanBuilder : public BiomeBuilder {
|
||||
public:
|
||||
OceanBuilder(ChunkGenerator& chunk_generator);
|
||||
void build_biome() override;
|
||||
ChunkGenerator& get_chunk_generator() override;
|
||||
void build_vegetation() override;
|
||||
|
||||
private:
|
||||
ChunkGenerator& m_chunk_generator;
|
||||
|
||||
void build_blocks();
|
||||
};
|
||||
|
||||
} // namespace Cubed
|
||||
Reference in New Issue
Block a user