Improve roads, cabins, forests, and woodland communities

This commit is contained in:
root
2026-07-11 20:00:19 +00:00
parent afbf333622
commit e2436f6e24
5 changed files with 459 additions and 60 deletions

View File

@@ -10,6 +10,7 @@ static int is_cabin_block(uint16_t block) {
block == BLOCK_OAK_LOG_X || block == BLOCK_OAK_LOG_Z ||
block == BLOCK_SPRUCE_LOG_X || block == BLOCK_SPRUCE_LOG_Z ||
block == BLOCK_GLASS_PANE || block == BLOCK_GLASS || block == BLOCK_SPRUCE_STAIRS_E || block == BLOCK_SPRUCE_STAIRS_W ||
block == BLOCK_SPRUCE_STAIRS_N || block == BLOCK_SPRUCE_STAIRS_S ||
block == BLOCK_LADDER_N || block == BLOCK_LADDER_S || block == BLOCK_LADDER_E || block == BLOCK_LADDER_W ||
block == BLOCK_SPRUCE_DOOR_N_LOWER || block == BLOCK_SPRUCE_DOOR_N_UPPER ||
block == BLOCK_SPRUCE_DOOR_S_LOWER || block == BLOCK_SPRUCE_DOOR_S_UPPER ||
@@ -78,6 +79,8 @@ int main(int argc, char **argv) {
long cabin_columns = 0;
long gravel_columns = 0;
long cabin_gravel_columns = 0;
long bridge_deck_columns = 0;
long eligible_bridge_columns = 0;
long tall_log_columns = 0;
long max_oak_log_run = 0;
long biome_columns[4] = {0, 0, 0, 0};
@@ -96,8 +99,11 @@ int main(int argc, char **argv) {
if (biome >= 0 && biome < 4) ++biome_columns[biome];
double redwood_mask = worldgen_debug_redwood_mask(&ctx, wx, wz);
if (redwood_mask > max_redwood_mask) max_redwood_mask = redwood_mask;
if (worldgen_debug_bridge_site(&ctx, wx, wz, 1, 0) ||
worldgen_debug_bridge_site(&ctx, wx, wz, 0, 1)) ++eligible_bridge_columns;
int has_cabin = 0;
int has_gravel = 0;
int has_bridge_deck = 0;
int current_run = 0;
int best_run = 0;
for (int y = 1; y < CHUNK_HEIGHT; ++y) {
@@ -109,6 +115,8 @@ int main(int argc, char **argv) {
if (block == BLOCK_GRAVEL) {
has_gravel = 1;
}
if (block == BLOCK_SPRUCE_PLANKS && y > 1 && chunk.blocks[y - 1][lx][lz] == BLOCK_WATER)
has_bridge_deck = 1;
if (block == BLOCK_OAK_LOG) {
++current_run;
if (current_run > best_run) best_run = current_run;
@@ -120,6 +128,7 @@ int main(int argc, char **argv) {
if (best_run >= 40) ++tall_log_columns;
if (has_cabin) ++cabin_columns;
if (has_gravel) ++gravel_columns;
if (has_bridge_deck) ++bridge_deck_columns;
if (has_cabin && has_gravel) {
++cabin_gravel_columns;
}
@@ -133,6 +142,8 @@ int main(int argc, char **argv) {
printf("cabin_columns=%ld\n", cabin_columns);
printf("gravel_columns=%ld\n", gravel_columns);
printf("cabin_gravel_columns=%ld\n", cabin_gravel_columns);
printf("bridge_deck_columns=%ld\n", bridge_deck_columns);
printf("eligible_bridge_columns=%ld\n", eligible_bridge_columns);
printf("tall_oak_log_columns=%ld\n", tall_log_columns);
printf("max_oak_log_run=%ld\n", max_oak_log_run);
printf("biome_west_ky=%ld\n", biome_columns[0]);