Cuberite
A lightweight, fast and extensible game server for Minecraft
Macros | Functions
Trees.h File Reference
#include "../Noise/Noise.h"
Include dependency graph for Trees.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CASE_TREE_ALLOWED_BLOCKS
 
#define CASE_TREE_OVERWRITTEN_BLOCKS
 

Functions

void GetAcaciaTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random acacia tree. More...
 
void GetAppleBushImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random apple bush (for jungles) More...
 
void GetAppleTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random apple tree. More...
 
void GetBirchTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random birch tree. More...
 
void GetConiferTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random conifer tree. More...
 
void GetDarkoakTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random darkoak tree. More...
 
void GetJungleTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks, bool a_Large)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random jungle tree. More...
 
void GetLargeAppleTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a large (branching) apple tree. More...
 
void GetLargeJungleTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a large jungle tree (2x2 trunk) More...
 
NIBBLETYPE GetLogMetaFromDirection (NIBBLETYPE a_BlockMeta, Vector3d a_Direction)
 Returns the meta for a log from the given direction. More...
 
void GetPineTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random pine (tall conifer, little leaves at top) More...
 
void GetSmallAppleTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a small (nonbranching) apple tree. More...
 
void GetSmallJungleTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a small jungle tree (1x1 trunk) More...
 
void GetSpruceTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random spruce (short conifer, two layers of leaves) More...
 
void GetSwampTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random swampland tree. More...
 
void GetTallBirchTreeImage (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random large birch tree. More...
 
Vector3d GetTreeBranch (BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_BlockPos, int a_BranchLength, Vector3d a_StartDirection, Vector3d a_Direction, sSetBlockVector &a_LogBlocks)
 Fills a_LogBlocks with the logs of a tree branch of the provided log type. More...
 
void GetTreeImageByBiome (Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, EMCSBiome a_Biome, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
 Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a tree at the specified coords (lowest trunk block) in the specified biome. More...
 

Macro Definition Documentation

#define CASE_TREE_ALLOWED_BLOCKS
#define CASE_TREE_OVERWRITTEN_BLOCKS
Value:
case E_BLOCK_AIR: \
/* case E_BLOCK_LEAVES: LEAVES are a special case, they can be overwritten only by log. Handled in cChunkMap::ReplaceTreeBlocks(). */ \
case E_BLOCK_SNOW: \

Definition at line 38 of file Trees.h.

Function Documentation

void GetAcaciaTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random acacia tree.

Definition at line 567 of file Trees.cpp.

void GetAppleBushImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random apple bush (for jungles)

Definition at line 948 of file Trees.cpp.

void GetAppleTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random apple tree.

Definition at line 378 of file Trees.cpp.

void GetBirchTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random birch tree.

Definition at line 529 of file Trees.cpp.

void GetConiferTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random conifer tree.

Definition at line 734 of file Trees.cpp.

void GetDarkoakTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random darkoak tree.

Definition at line 625 of file Trees.cpp.

void GetJungleTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks,
bool  a_Large 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random jungle tree.

Definition at line 968 of file Trees.cpp.

void GetLargeAppleTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a large (branching) apple tree.

Definition at line 446 of file Trees.cpp.

void GetLargeJungleTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a large jungle tree (2x2 trunk)

Definition at line 984 of file Trees.cpp.

NIBBLETYPE GetLogMetaFromDirection ( NIBBLETYPE  a_BlockMeta,
Vector3d  a_Direction 
)

Returns the meta for a log from the given direction.

Definition at line 507 of file Trees.cpp.

void GetPineTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random pine (tall conifer, little leaves at top)

Definition at line 848 of file Trees.cpp.

void GetSmallAppleTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a small (nonbranching) apple tree.

Definition at line 394 of file Trees.cpp.

void GetSmallJungleTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a small jungle tree (1x1 trunk)

Definition at line 1054 of file Trees.cpp.

void GetSpruceTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random spruce (short conifer, two layers of leaves)

Definition at line 751 of file Trees.cpp.

void GetSwampTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random swampland tree.

Definition at line 901 of file Trees.cpp.

void GetTallBirchTreeImage ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a random large birch tree.

Definition at line 696 of file Trees.cpp.

Vector3d GetTreeBranch ( BLOCKTYPE  a_BlockType,
NIBBLETYPE  a_BlockMeta,
Vector3i  a_BlockPos,
int  a_BranchLength,
Vector3d  a_StartDirection,
Vector3d  a_Direction,
sSetBlockVector a_LogBlocks 
)

Fills a_LogBlocks with the logs of a tree branch of the provided log type.

The length of the branch can be changed with the a_BranchLength. The initial direction is a_StartDirection. The direction can be manipulated with a_Direction to create a curve. Returns the position of the last log block placed.

Definition at line 489 of file Trees.cpp.

void GetTreeImageByBiome ( Vector3i  a_BlockPos,
cNoise a_Noise,
int  a_Seq,
EMCSBiome  a_Biome,
sSetBlockVector a_LogBlocks,
sSetBlockVector a_OtherBlocks 
)

Fills a_LogBlocks and a_OtherBlocks (dirt & leaves) with the blocks required to form a tree at the specified coords (lowest trunk block) in the specified biome.

Definition at line 227 of file Trees.cpp.