8 #include "../BlockType.h"
37 static const std::array<Vector3d, 32> directions =
40 { -1, 0, 0 }, { 0, 0, -1 },
41 { -1, 0, 1 }, { -1, 0, -1 },
42 { 1, 0, 1 }, { 1, 0, -1 },
43 { 1, 0, 0 }, { 0, 0, 1 },
45 { -0.5, 0, 0 }, { 0, 0, -0.5 },
46 { -0.5, 0, 0.5 }, { -0.5, 0, -0.5 },
47 { 0.5, 0, 0.5 }, { 0.5, 0, -0.5 },
48 { 0.5, 0, 0 }, { 0, 0, 0.5 },
50 { -1, 0.5, 0 }, { 0, 0.5, -1 },
51 { -1, 0.5, 1 }, { -1, 0.5, -1 },
52 { 1, 0.5, 1 }, { 1, 0.5, -1 },
53 { 1, 0.5, 0 }, { 0, 0.5, 1 },
55 { -0.5, 0.5, 0 }, { 0, 0.5, -0.5 },
56 { -0.5, 0.5, 0.5 }, { -0.5, 0.5, -0.5 },
57 { 0.5, 0.5, 0.5 }, { 0.5, 0.5, -0.5 },
58 { 0.5, 0.5, 0 }, { 0, 0.5, 0.5 },
62 size_t index =
static_cast<size_t>(a_Noise.
IntNoise3DInt(a_BlockPos * a_Seq)) % directions.size();
63 return directions[index];
77 {-1, -2}, {0, -2}, {1, -2},
78 {-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1},
79 {-2, 0}, {-1, 0}, {1, 0}, {2, 0},
80 {-2, 1}, {-1, 1}, {0, 1}, {1, 1}, {2, 1},
81 {-1, 2}, {0, 2}, {1, 2},
86 {-2, -3}, {-1, -3}, {0, -3}, {1, -3}, {2, -3},
87 {-3, -2}, {-2, -2}, {-1, -2}, {0, -2}, {1, -2}, {2, -2}, {3, -2},
88 {-3, -1}, {-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1}, {3, -1},
89 {-3, 0}, {-2, 0}, {-1, 0}, {1, 0}, {2, 0}, {3, 0},
90 {-3, 1}, {-2, 1}, {-1, 1}, {0, 1}, {1, 1}, {2, 1}, {3, 1},
91 {-3, 2}, {-2, 2}, {-1, 2}, {0, 2}, {1, 2}, {2, 2}, {3, 2},
92 {-2, 3}, {-1, 3}, {0, 3}, {1, 3}, {2, 3},
98 {-2, -4}, {-1, -4}, {0, -4}, {1, -4}, {2, -4},
99 {-3, -3}, {-2, -3}, {-1, -3}, {0, -3}, {1, -3}, {2, -3}, {3, -3},
100 {-4, -2}, {-3, -2}, {-2, -2}, {-1, -2}, {0, -2}, {1, -2}, {2, -2}, {3, -2}, {4, -2},
101 {-4, -1}, {-3, -1}, {-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1}, {3, -1}, {4, -1},
102 {-4, 0}, {-3, 0}, {-2, 0}, {-1, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0},
103 {-4, 1}, {-3, 1}, {-2, 1}, {-1, 1}, {0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1},
104 {-4, 2}, {-3, 2}, {-2, 2}, {-1, 2}, {0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2},
105 {-3, 3}, {-2, 3}, {-1, 3}, {0, 3}, {1, 3}, {2, 3}, {3, 3},
106 {-2, 4}, {-1, 4}, {0, 4}, {1, 4}, {2, 4},
112 {-1, -2}, {0, -2}, {1, -2}, {2, -2},
113 {-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1}, {3, -1},
114 {-3, 0}, {-2, 0}, {-1, 0}, {0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0},
115 {-3, 1}, {-2, 1}, {-1, 1}, {0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1},
116 {-2, 2}, {-1, 2}, {0, 2}, {1, 2}, {2, 2}, {3, 2},
117 {-1, 3}, {0, 3}, {1, 3}, {2, 3},
124 {-2, -3}, {-1, -3}, {0, -3}, {1, -3}, {2, -3}, {3, -3},
125 {-3, -2}, {-2, -2}, {-1, -2}, {0, -2}, {1, -2}, {2, -2}, {3, -2}, {4, -2},
126 {-3, -1}, {-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1}, {3, -1}, {4, -1},
127 {-4, 0}, {-3, 0}, {-2, 0}, {-1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0},
128 {-4, 1}, {-3, 1}, {-2, 1}, {-1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1},
129 {-3, 2}, {-2, 2}, {-1, 2}, {0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2},
130 {-3, 3}, {-2, 3}, {-1, 3}, {0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3},
131 {-2, 4}, {-1, 4}, {0, 4}, {1, 4}, {2, 4}, {3, 4},
138 {-2, -4}, {-1, -4}, {0, -4}, {1, -4}, {2, -4}, {3, -4},
139 {-3, -3}, {-2, -3}, {-1, -3}, {0, -3}, {1, -3}, {2, -3}, {3, -3}, {4, -3},
140 {-4, -2}, {-3, -2}, {-2, -2}, {-1, -2}, {0, -2}, {1, -2}, {2, -2}, {3, -2}, {4, -2}, {5, -2},
141 {-4, -1}, {-3, -1}, {-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1}, {3, -1}, {4, -1}, {5, -1},
142 {-5, 0}, {-4, 0}, {-3, 0}, {-2, 0}, {-1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0},
143 {-5, 1}, {-4, 1}, {-3, 1}, {-2, 1}, {-1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1},
144 {-4, 2}, {-3, 2}, {-2, 2}, {-1, 2}, {0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2},
145 {-4, 3}, {-3, 3}, {-2, 3}, {-1, 3}, {0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3},
146 {-3, 4}, {-2, 4}, {-1, 4}, {0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4},
147 {-2, 5}, {-1, 5}, {0, 5}, {1, 5}, {2, 5}, {3, 5},
160 {-1, 0}, {0, 0}, {1, 0}, {2, 0},
161 {-1, 1}, {0, 1}, {1, 1}, {2, 1},
168 {-1, -1}, {0, -1}, {1, -1}, {2, -1},
169 {-2, 0}, {-1, 0}, {2, 0}, {3, 0},
170 {-2, 1}, {-1, 1}, {2, 1}, {3, 1},
171 {-1, 2}, {0, 2}, {1, 2}, {2, 2},
178 {-1, -2}, {0, -2}, {1, -2}, {2, -2},
179 {-2, -1}, {-1, -1}, {0, -1}, {1, -1}, {2, -1}, {3, -1},
180 {-3, 0}, {-2, 0}, {-1, 0}, {2, 0}, {3, 0}, {4, 0},
181 {-3, 1}, {-2, 1}, {-1, 1}, {2, 1}, {3, 1}, {4, 1},
182 {-2, 2}, {-1, 2}, {0, 2}, {1, 2}, {2, 2}, {3, 2},
183 {-1, 3}, {0, 3}, {1, 3}, {2, 3},
263 for (
size_t i = 0; i < a_NumCoords; i++)
265 a_Blocks.emplace_back(a_BlockX + a_Coords[i].x, a_Height, a_BlockZ + a_Coords[i].z, a_BlockType, a_Meta);
279 if (a_Noise.
IntNoise3DInt(x + 64 * a_Seq, a_Height, z + 64 * a_Seq) <= a_Chance)
281 a_Blocks.emplace_back(x, a_Height, z, a_BlockType, a_Meta);
290 inline void PushSomeColumns(
int a_BlockX,
int a_Height,
int a_BlockZ,
int a_ColumnHeight,
int a_Seq,
cNoise & a_Noise,
int a_Chance,
sSetBlockVector & a_Blocks,
const sMetaCoords * a_Coords,
size_t a_NumCoords,
BLOCKTYPE a_BlockType)
292 for (
size_t i = 0; i < a_NumCoords; i++)
294 int x = a_BlockX + a_Coords[i].
x;
295 int z = a_BlockZ + a_Coords[i].
z;
296 if (a_Noise.
IntNoise3DInt(x + 64 * a_Seq, a_Height +
static_cast<int>(i), z + 64 * a_Seq) <= a_Chance)
298 for (
int j = 0; j < a_ColumnHeight; j++)
300 a_Blocks.emplace_back(x, a_Height - j, z, a_BlockType, a_Coords[i].Meta);
440 const int DarkOakProb = 53;
441 const int SmallAppleTreeProb = DarkOakProb + 23;
442 const int RedMushroomProb = SmallAppleTreeProb + 16;
443 const int BrownMushroomProb = RedMushroomProb + 4;
445 static_assert(BrownMushroomProb + 4 == 100);
448 if (RandomValue < DarkOakProb)
452 else if ((RandomValue >= DarkOakProb) && (RandomValue < SmallAppleTreeProb))
456 else if ((RandomValue >= SmallAppleTreeProb) && (RandomValue < RedMushroomProb))
460 else if ((RandomValue >= RedMushroomProb) && (RandomValue < BrownMushroomProb))
515 ASSERT(!
"Invalid biome type!");
553 a_LogBlocks.reserve(
static_cast<size_t>(Height + 5));
557 for (
int i = 0; i < Height; i++)
561 int Hei = a_BlockPos.
y + Height;
564 for (
int i = 0; i < 2; i++)
573 if ((Random & 1) == 0)
595 for (
int i = 4; i < Height; i++)
601 int BranchLength = 2 + a_Noise.
IntNoise3DInt(a_BlockPos * a_Seq) % 3;
606 for (
auto itr : a_LogBlocks)
614 for (
int y = -1; y <= 1; y++)
623 for (
int i = 0; i < Height; i++)
637 for (
int i = 0; i < a_BranchLength; i++)
655 if ((a_Direction.
y > a_Direction.
x) && (a_Direction.
y > a_Direction.
z))
659 else if (a_Direction.
x > a_Direction.
z)
661 return a_BlockMeta + 4;
665 return a_BlockMeta + 8;
678 a_LogBlocks.reserve(
static_cast<size_t>(Height));
679 a_OtherBlocks.reserve(80);
682 for (
int i = Height - 1; i >= 0; --i)
686 int h = a_BlockPos.
y + Height;
699 for (
int Row = 0; Row < 2; Row++)
714 int Height = 2 + (a_Noise.
IntNoise3DInt(a_BlockPos) / 11 % 3);
717 for (
int i = 0; i < Height; i++)
723 const Vector3i AvailableDirections[] =
725 { -1, 1, 0 }, { 0, 1, -1 },
726 { -1, 1, 1 }, { -1, 1, -1 },
727 { 1, 1, 1 }, { 1, 1, -1 },
728 { 1, 1, 0 }, { 0, 1, 1 },
735 int BranchHeight = a_Noise.
IntNoise3DInt(a_BlockPos) % 3 + 1;
745 bool TwoTop = (a_Noise.
IntNoise3D(a_BlockPos) < 0);
752 BranchDirection =
Vector3d(-BranchDirection.
x, 1, -BranchDirection.
z);
755 BranchHeight = a_Noise.
IntNoise3DInt(a_BlockPos * a_Seq) % 3 + 1;
775 for (
int i = 0; i < Height; i++)
784 for (
int i = 1; i < 5; i++)
793 for (
int i = 0; i < 3; i++)
799 if ((x >= a_BlockPos.
x) && (x <= a_BlockPos.
x + 1) && (z >= a_BlockPos.
z) && (z <= a_BlockPos.
z + 1))
804 x = a_BlockPos.
x + ((Val1 < -0.5) ? -1 : 3);
808 z = a_BlockPos.
z + ((Val1 < 0.5) ? -1 : 3);
814 for (
int Y = y; Y < Height; Y++)
820 int hei = a_BlockPos.
y + Height - 2;
823 for (
int i = 0; i < 2; i++)
845 a_LogBlocks.reserve(
static_cast<size_t>(Height));
846 a_OtherBlocks.reserve(80);
849 for (
int i = Height - 1; i >= 0; --i)
853 int h = a_BlockPos.
y + Height;
866 for (
int Row = 0; Row < 2; Row++)
887 GetPineTreeImage(a_BlockPos, a_Noise, a_Seq, a_LogBlocks, a_OtherBlocks, a_Large);
939 static const HEIGHTTYPE sHeights[] = {1, 2, 2, 3};
944 a_LogBlocks.reserve(
static_cast<size_t>(Height));
945 a_OtherBlocks.reserve(180);
948 for (
int i = 0; i < Height; i++)
955 if ((MyRandom & 1) == 0)
964 static const int sNumSections[] = {1, 2, 2, 3};
965 int NumSections = sNumSections[MyRandom & 3];
967 for (
int i = 0; i < NumSections; i++)
969 switch (MyRandom & 3)
1005 if ((MyRandom & 1) == 0)
1028 for (
size_t i = 0; i < a_RingCount ; i++)
1042 int Height = 20 + (a_Noise.
IntNoise3DInt(a_BlockPos.
addedXZ(32 * a_Seq, 32 * a_Seq)) / 11) % 12;
1043 int LeavesRingCount =
1049 a_LogBlocks.reserve(
static_cast<size_t>(Height) * 4);
1053 for (
int i = 0; i < Height; i++)
1060 int hei = a_BlockPos.
y + Height - 1;
1063 for (
int i = 1; i < 5; i++)
1077 hei = a_BlockPos.
y + Height - 2;
1079 for (
int i = 0; i < LeavesRingCount; i++)
1081 unsigned int Val =
static_cast<unsigned int>(a_Noise.
IntNoise3DInt(a_BlockPos.
addedXZ(32 * a_Seq, 32 * i)) / 23) % 8;
1082 if ((Val < 4) && RingRadius < 3)
1086 else if ((Val == 7) && (RingRadius > 0))
1119 if (hei - a_BlockPos.
y <= 2)
1137 int TrunkHeight = 8 + (MyRandom % 3);
1138 int SameSizeMax = ((MyRandom & 8) == 0) ? 1 : 0;
1140 int NumLeavesLayers = 2 + (MyRandom % 3);
1141 if (NumLeavesLayers == 2)
1147 a_LogBlocks.reserve(
static_cast<size_t>(TrunkHeight));
1148 a_OtherBlocks.reserve(
static_cast<size_t>(NumLeavesLayers * 25));
1151 for (
int i = TrunkHeight; i >= 0; --i)
1155 int h = a_BlockPos.
y + TrunkHeight + 2;
1166 for (
int i = 0; i < NumLeavesLayers; ++i)
1168 int LayerSize = std::min(i, NumLeavesLayers - i + SameSizeMax - 1);
1186 int Height = 20 + (a_Noise.
IntNoise3DInt(a_BlockPos.
addedXZ(32 * a_Seq, 32 * a_Seq)) / 11) % 12;
1188 a_LogBlocks.reserve(
static_cast<size_t>(Height) * 4);
1191 for (
int i = 0; i < Height; i++)
1198 int hei = a_BlockPos.
y + Height - 2;
1201 for (
int i = 1; i < 5; i++)
1225 {-2, -4, 1}, {-1, -4, 1}, {0, -4, 1}, {1, -4, 1}, {2, -4, 1},
1226 {-2, 4, 4}, {-1, 4, 4}, {0, 4, 4}, {1, 4, 4}, {2, 4, 4},
1227 {4, -2, 2}, {4, -1, 2}, {4, 0, 2}, {4, 1, 2}, {4, 2, 2},
1228 {-4, -2, 8}, {-4, -1, 8}, {-4, 0, 8}, {-4, 1, 8}, {-4, 2, 8},
1233 a_LogBlocks.reserve(
static_cast<size_t>(Height));
1236 for (
int i = 0; i < Height; i++)
1240 int hei = a_BlockPos.
y + Height - 2;
1243 PushSomeColumns(a_BlockPos.
x, hei, a_BlockPos.
z, Height, a_Seq, a_Noise, 0x3fffffff, a_OtherBlocks, Vines,
ARRAYCOUNT(Vines),
E_BLOCK_VINES);
1246 for (
int i = 0; i < 2; i++)
1254 for (
int i = 0; i < 2; i++)
1271 int hei = a_BlockPos.
y;
1307 {0, -1, 1}, {1, -1, 1},
1308 {0, 2, 4}, {1, 2, 4},
1309 {-1, 1, 8}, {-1, 0, 8},
1310 {2, 1, 2}, {2, 0, 2},
1313 int Height = 10 + ((a_Noise.
IntNoise3DInt(a_BlockPos.
addedXZ(32 * a_Seq, 32 * a_Seq)) / 11) % 20);
1315 a_LogBlocks.reserve(
static_cast<size_t>(Height) * 4);
1319 for (
int i = 0; i < Height; i++)
1327 for (
size_t j = 0; j <
ARRAYCOUNT(VinesTrunk); j++)
1338 for (
int i = 1; i < 5; i++)
1346 int NumBranches = std::max(
1347 (a_Noise.
IntNoise2DInt(a_BlockPos.
x * a_Seq, a_BlockPos.
z * a_Seq) / 10) % 4,
1350 int BranchStartHeight = 6 + Height % 5;
1351 int BranchInterval = (Height - 6 - BranchStartHeight) / NumBranches;
1352 for (
int i = BranchStartHeight; i < (Height - 6); i += BranchInterval)
1357 int BranchLength = 2 + a_Noise.
IntNoise3DInt(a_BlockPos * a_Seq) % 2;
1361 if ((a_Noise.
IntNoise3DInt(a_BlockPos.
x * a_Seq, a_BlockPos.
y * a_Seq, a_BlockPos.
z * a_Seq) % 4) == 0)
1377 int CanopyHeight = a_BlockPos.
y + Height - 2;
1393 {-2, -4, 1}, {-1, -4, 1}, {0, -4, 1}, {1, -4, 1}, {2, -4, 1},
1394 {-2, 4, 4}, {-1, 4, 4}, {0, 4, 4}, {1, 4, 4}, {2, 4, 4},
1395 {4, -2, 2}, {4, -1, 2}, {4, 0, 2}, {4, 1, 2}, {4, 2, 2},
1396 {-4, -2, 8}, {-4, -1, 8}, {-4, 0, 8}, {-4, 1, 8},
1402 a_LogBlocks.reserve(
static_cast<size_t>(Height));
1403 a_OtherBlocks.reserve(
1407 static_cast<size_t>(Height) *
ARRAYCOUNT(Vines) +
1411 for (
int i = 0; i < Height; i++)
1415 int hei = a_BlockPos.
y + Height - 3;
1418 PushSomeColumns(a_BlockPos.
x, hei, a_BlockPos.
z, Height, a_Seq, a_Noise, 0x3fffffff, a_OtherBlocks, Vines,
ARRAYCOUNT(Vines),
E_BLOCK_VINES);
1421 for (
int i = 0; i < 2; i++)
1429 for (
int i = 0; i < 1; i++)
1447 static constexpr
int Height = 4;
1449 for (
int i = 0; i < Height; i++)
1494 static constexpr
int Height = 4;
1495 static constexpr
int Radius = 2;
1496 static constexpr
int Border = 3;
1498 for (
int i = 0; i < Height; i++)
1503 for (
int x = -Radius; x <= Radius; x++)
1505 for (
int z = -Radius; z <= Radius; z++)
1511 for (
int i = 0; i <
Border; i++)
EMCSBiome
Biome IDs The first batch corresponds to the clientside biomes, used by MineCraft.
@ E_META_NEW_LOG_ACACIA_WOOD
@ E_META_MUSHROOM_SOUTH_EAST
@ E_META_MUSHROOM_SOUTH_WEST
@ E_META_MUSHROOM_NORTH_WEST
@ E_META_MUSHROOM_NORTH_EAST
@ E_META_NEWLEAVES_ACACIA
@ E_META_NEW_LOG_DARK_OAK_WOOD
@ E_META_NEWLEAVES_DARK_OAK
@ E_BLOCK_HUGE_BROWN_MUSHROOM
@ E_BLOCK_HUGE_RED_MUSHROOM
std::vector< sSetBlock > sSetBlockVector
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char HEIGHTTYPE
The type used by the heightmap.
unsigned char BLOCKTYPE
The datatype used by blockdata.
void GetSmallPineTreeImage(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 small p...
static const sCoordsArr BigOLayers[]
static const sCoords BigO2Pine[]
static const sCoordsArr BigOSpruceLayersV1[]
static const sCoordsArr BigOSpruceLayersV3[]
static const sCoordsArr BigOSpruceLayersV4[]
static const sCoords TopLargePine[]
static const sCoords BigO4Jungle[]
static const sCoords BigO2[]
void GetPineTreeImage(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 pine.
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.
void PushCornerBlocks(int a_BlockX, int a_Height, int a_BlockZ, int a_Seq, cNoise &a_Noise, int a_Chance, sSetBlockVector &a_Blocks, int a_CornersDist, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta)
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 t...
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 swampla...
static const sCoords BigO3[]
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 b...
static const sCoordsArr BigOSpruceLayersV2[]
const int MAX_LARGE_SPRUCE_TREE_RINGS
static const sCoords BigO3Pine[]
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...
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 b...
static const sCoordsArr BigOSpruceTop[]
void GetLargePineTreeImage(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 p...
static const sCoords BigO4[]
static const sCoords BigO5Jungle[]
void GetBrownMushroomTreeImage(Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
Fills a_LogBlocks and a_OtherBlocks with the blocks required to form the brown mushroom.
static const sCoords BigO1Spruce[]
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 sp...
void PushSomeColumns(int a_BlockX, int a_Height, int a_BlockZ, int a_ColumnHeight, int a_Seq, cNoise &a_Noise, int a_Chance, sSetBlockVector &a_Blocks, const sMetaCoords *a_Coords, size_t a_NumCoords, BLOCKTYPE a_BlockType)
void GetRedMushroomTreeImage(Vector3i a_BlockPos, cNoise &a_Noise, int a_Seq, sSetBlockVector &a_LogBlocks, sSetBlockVector &a_OtherBlocks)
Fills a_LogBlocks and a_OtherBlocks with the blocks required to form the red mushroom.
static const sCoords Corners[]
static const sCoordsArr BigOJungleLayers[]
void GetLargeSpruceTreeImage(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 s...
static const sCoords BigOF2Pine[]
static const Vector3d & pickBranchDirection(const cNoise a_Noise, Vector3i a_BlockPos, int a_Seq)
Chooses a direction for a branch to go to based on the start position (a_BlockPos) and a_Seq.
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 (nonbran...
void GetSmallSpruceTreeImage(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 small s...
const int MIN_LARGE_SPRUCE_TREE_RINGS
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 t...
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 ...
static const sCoords BigO1[]
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 t...
static const sCoords BigO3Jungle[]
void GetSpruceTreeImage(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 spruce.
void PushCoordBlocks(int a_BlockX, int a_Height, int a_BlockZ, sSetBlockVector &a_Blocks, const sCoords *a_Coords, size_t a_NumCoords, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta)
Pushes a specified layer of blocks of the same type around (x, h, z) into a_Blocks.
void GetConiferTreeImage(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 conifer...
static const sCoordsArr BigOPineLayers[]
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 ...
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 t...
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 (branchi...
NIBBLETYPE GetLogMetaFromDirection(NIBBLETYPE a_BlockMeta, Vector3d a_Direction)
Returns the meta for a log from the given direction.
static void LargeSpruceAddRing(Vector3i a_BlockPos, int &a_Height, const sCoordsArr *const a_Ring, size_t a_RingCount, sSetBlockVector &a_OtherBlocks)
#define ARRAYCOUNT(X)
Evaluates to the number of elements in an array (compile-time!)
std::enable_if< std::is_arithmetic< T >::value, C >::type FloorC(T a_Value)
Floors a value, then casts it to C (an int by default).
float NOISE_DATATYPE
The datatype used by all the noise generators.
Vector3< double > Vector3d
NOISE_DATATYPE IntNoise2D(int a_X, int a_Y) const
int IntNoise3DInt(int a_X, int a_Y, int a_Z) const
int IntNoise2DInt(int a_X, int a_Y) const
NOISE_DATATYPE IntNoise3D(int a_X, int a_Y, int a_Z) const
Vector3< T > addedY(T a_AddY) const
Returns a copy of this vector moved by the specified amount on the y axis.
Vector3< int > Floor(void) const
Returns a new Vector3i with coords set to std::floor() of this vector's coords.
Vector3< T > addedXZ(T a_AddX, T a_AddZ) const
Returns a copy of this vector moved by the specified amount on the X and Z axes.
Vector3< T > addedZ(T a_AddZ) const
Returns a copy of this vector moved by the specified amount on the Z axis.
void Clamp(T a_Min, T a_Max)
Clamps each coord into the specified range.
void Abs()
Updates each coord to its absolute value.
Vector3< T > addedX(T a_AddX) const
Returns a copy of this vector moved by the specified amount on the X axis.