]> git.lizzy.rs Git - dragonblocks_alpha.git/blob - src/server/trees.h
Add trees
[dragonblocks_alpha.git] / src / server / trees.h
1 #ifndef _TREES_H_
2 #define _TREES_H_
3
4 #include <dragontype/list.h>
5 #include <dragontype/number.h>
6 #include "perlin.h"
7
8 #define NUM_TREES 3
9
10 typedef struct
11 {
12         f32 spread;
13         f32 probability;
14         f32 area_probability;
15         SeedOffset offset;
16         SeedOffset area_offset;
17         bool (*condition)(v3s32 pos, f64 humidity, f64 temperature, Biome biome, f64 factor, MapBlock *block, void *row_data, void *block_data);
18         void (*generate)(v3s32 pos, List *changed_blocks);
19 } TreeDef;
20
21 extern TreeDef tree_definitions[];
22
23 #endif