diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-30 22:03:56 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-30 22:03:56 +0100 |
commit | ad10b8718fe337fb2dab8d0315cb6ba338479e75 (patch) | |
tree | 64cb9e033b40dc0e51f4469882a2a751ffc2db94 /source/Generating/ChunkDesc.h | |
parent | MineShafts: added supports in corridors (diff) | |
download | cuberite-ad10b8718fe337fb2dab8d0315cb6ba338479e75.tar cuberite-ad10b8718fe337fb2dab8d0315cb6ba338479e75.tar.gz cuberite-ad10b8718fe337fb2dab8d0315cb6ba338479e75.tar.bz2 cuberite-ad10b8718fe337fb2dab8d0315cb6ba338479e75.tar.lz cuberite-ad10b8718fe337fb2dab8d0315cb6ba338479e75.tar.xz cuberite-ad10b8718fe337fb2dab8d0315cb6ba338479e75.tar.zst cuberite-ad10b8718fe337fb2dab8d0315cb6ba338479e75.zip |
Diffstat (limited to 'source/Generating/ChunkDesc.h')
-rw-r--r-- | source/Generating/ChunkDesc.h | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/source/Generating/ChunkDesc.h b/source/Generating/ChunkDesc.h index d4b0c4d91..a73a175a3 100644 --- a/source/Generating/ChunkDesc.h +++ b/source/Generating/ChunkDesc.h @@ -9,8 +9,9 @@ #pragma once -#include "../ChunkDef.h" #include "../BlockArea.h" +#include "../ChunkDef.h" +#include "../Cuboid.h" @@ -19,9 +20,6 @@ // fwd: ../BlockArea.h class cBlockArea; -// fwd: ../Cuboid.h -class cCuboid; - @@ -80,11 +78,49 @@ public: HEIGHTTYPE GetMaxHeight(void) const; /// Fills the relative cuboid with specified block; allows cuboid out of range of this chunk - void FillRelCuboid(const cCuboid & a_RelCuboid, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta); + void FillRelCuboid( + int a_MinX, int a_MaxX, + int a_MinY, int a_MaxY, + int a_MinZ, int a_MaxZ, + BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta + ); + + /// Fills the relative cuboid with specified block; allows cuboid out of range of this chunk + void FillRelCuboid(const cCuboid & a_RelCuboid, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) + { + FillRelCuboid( + 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 + ); + } /// Replaces the specified src blocks in the cuboid by the dst blocks; allows cuboid out of range of this chunk - void ReplaceRelCuboid(const cCuboid & a_RelCuboid, BLOCKTYPE a_SrcType, NIBBLETYPE a_SrcMeta, BLOCKTYPE a_DstType, NIBBLETYPE a_DstMeta); + void ReplaceRelCuboid( + int a_MinX, int a_MaxX, + int a_MinY, int a_MaxY, + int a_MinZ, int a_MaxZ, + BLOCKTYPE a_SrcType, NIBBLETYPE a_SrcMeta, + BLOCKTYPE a_DstType, NIBBLETYPE a_DstMeta + ); + /// Replaces the specified src blocks in the cuboid by the dst blocks; allows cuboid out of range of this chunk + void ReplaceRelCuboid( + const cCuboid & a_RelCuboid, + BLOCKTYPE a_SrcType, NIBBLETYPE a_SrcMeta, + BLOCKTYPE a_DstType, NIBBLETYPE a_DstMeta + ) + { + ReplaceRelCuboid( + 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_SrcType, a_SrcMeta, + a_DstType, a_DstMeta + ); + } + // tolua_end |