From 41e0927843a8060fc381e7695faf4cf8d3c875e6 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 31 Mar 2013 19:05:41 +0000 Subject: cChunkDesc: Added the RandomFillRelCuboid() function git-svn-id: http://mc-server.googlecode.com/svn/trunk@1341 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Generating/ChunkDesc.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'source/Generating/ChunkDesc.h') diff --git a/source/Generating/ChunkDesc.h b/source/Generating/ChunkDesc.h index a18b26142..5ec3759a9 100644 --- a/source/Generating/ChunkDesc.h +++ b/source/Generating/ChunkDesc.h @@ -142,7 +142,31 @@ public: a_DstType, a_DstMeta ); } - + + /// Fills the relative cuboid with specified block with a random chance; allows cuboid out of range of this chunk + void RandomFillRelCuboid( + int a_MinX, int a_MaxX, + int a_MinY, int a_MaxY, + int a_MinZ, int a_MaxZ, + BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, + int a_RandomSeed, int a_ChanceOutOf10k + ); + + /// Fills the relative cuboid with specified block with a random chance; allows cuboid out of range of this chunk + void RandomFillRelCuboid( + const cCuboid & a_RelCuboid, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, + int a_RandomSeed, int a_ChanceOutOf10k + ) + { + RandomFillRelCuboid( + a_RelCuboid.p1.x, a_RelCuboid.p2.x, + a_RelCuboid.p1.y, a_RelCuboid.p2.y, + a_RelCuboid.p1.z, a_RelCuboid.p2.z, + a_BlockType, a_BlockMeta, + a_RandomSeed, a_ChanceOutOf10k + ); + } + // tolua_end -- cgit v1.2.3