diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-02-11 20:53:52 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-02-11 20:53:52 +0100 |
commit | 22b71d041046112e38c7b395940e3d1ac36b0ca7 (patch) | |
tree | aa53ed6b6700ce03ca318e580dce7fe86db8ffc6 | |
parent | More API functions in cBlockArea: Create(), Fill(), FillRelArea() (diff) | |
download | cuberite-22b71d041046112e38c7b395940e3d1ac36b0ca7.tar cuberite-22b71d041046112e38c7b395940e3d1ac36b0ca7.tar.gz cuberite-22b71d041046112e38c7b395940e3d1ac36b0ca7.tar.bz2 cuberite-22b71d041046112e38c7b395940e3d1ac36b0ca7.tar.lz cuberite-22b71d041046112e38c7b395940e3d1ac36b0ca7.tar.xz cuberite-22b71d041046112e38c7b395940e3d1ac36b0ca7.tar.zst cuberite-22b71d041046112e38c7b395940e3d1ac36b0ca7.zip |
Diffstat (limited to '')
-rw-r--r-- | source/BlockArea.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/BlockArea.cpp b/source/BlockArea.cpp index b87d2ecfa..0386a74a5 100644 --- a/source/BlockArea.cpp +++ b/source/BlockArea.cpp @@ -695,6 +695,27 @@ void cBlockArea::FillRelCuboid(int a_MinRelX, int a_MaxRelX, int a_MinRelY, int m_BlockTypes[MakeIndex(x, y, z)] = a_BlockType;
} // for x, z, y
}
+ if ((a_DataTypes & baMetas) != 0)
+ {
+ for (int y = a_MinRelY; y <= a_MaxRelY; y++) for (int z = a_MinRelZ; z <= a_MaxRelZ; z++) for (int x = a_MinRelX; x <= a_MaxRelX; x++)
+ {
+ m_BlockMetas[MakeIndex(x, y, z)] = a_BlockMeta;
+ } // for x, z, y
+ }
+ if ((a_DataTypes & baLight) != 0)
+ {
+ for (int y = a_MinRelY; y <= a_MaxRelY; y++) for (int z = a_MinRelZ; z <= a_MaxRelZ; z++) for (int x = a_MinRelX; x <= a_MaxRelX; x++)
+ {
+ m_BlockLight[MakeIndex(x, y, z)] = a_BlockLight;
+ } // for x, z, y
+ }
+ if ((a_DataTypes & baSkyLight) != 0)
+ {
+ for (int y = a_MinRelY; y <= a_MaxRelY; y++) for (int z = a_MinRelZ; z <= a_MaxRelZ; z++) for (int x = a_MinRelX; x <= a_MaxRelX; x++)
+ {
+ m_BlockSkyLight[MakeIndex(x, y, z)] = a_BlockSkyLight;
+ } // for x, z, y
+ }
}
|