summaryrefslogtreecommitdiffstats
path: root/src/ChunkDef.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-03 22:25:42 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-03 22:25:42 +0100
commita3759c1462fd2fe89a545fc9ece90559b4a2469a (patch)
treedc46c925aec3e28fdb610f55245377453e67fa73 /src/ChunkDef.h
parentFixed #626 (diff)
parentMerge pull request #623 from mc-server/tnt (diff)
downloadcuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.tar
cuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.tar.gz
cuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.tar.bz2
cuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.tar.lz
cuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.tar.xz
cuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.tar.zst
cuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.zip
Diffstat (limited to 'src/ChunkDef.h')
-rw-r--r--src/ChunkDef.h34
1 files changed, 31 insertions, 3 deletions
diff --git a/src/ChunkDef.h b/src/ChunkDef.h
index 09bd766da..1c4aa6aca 100644
--- a/src/ChunkDef.h
+++ b/src/ChunkDef.h
@@ -497,7 +497,7 @@ public:
-/// Generic template that can store any kind of data together with a triplet of 3 coords:
+/** Generic template that can store any kind of data together with a triplet of 3 coords*/
template <typename X> class cCoordWithData
{
public:
@@ -517,12 +517,40 @@ public:
}
} ;
-// Illegal in C++03: typedef std::list< cCoordWithData<X> > cCoordWithDataList<X>;
typedef cCoordWithData<int> cCoordWithInt;
typedef cCoordWithData<BLOCKTYPE> cCoordWithBlock;
+
typedef std::list<cCoordWithInt> cCoordWithIntList;
typedef std::vector<cCoordWithInt> cCoordWithIntVector;
-typedef std::vector<cCoordWithBlock> cCoordWithBlockVector;
+
+
+
+
+
+/** Generic template that can store two types of any kind of data together with a triplet of 3 coords */
+template <typename X, typename Z> class cCoordWithDoubleData
+{
+public:
+ int x;
+ int y;
+ int z;
+ X Data;
+ Z DataTwo;
+
+ cCoordWithDoubleData(int a_X, int a_Y, int a_Z) :
+ x(a_X), y(a_Y), z(a_Z)
+ {
+ }
+
+ cCoordWithDoubleData(int a_X, int a_Y, int a_Z, const X & a_Data, const Z & a_DataTwo) :
+ x(a_X), y(a_Y), z(a_Z), Data(a_Data), DataTwo(a_DataTwo)
+ {
+ }
+};
+
+typedef cCoordWithDoubleData <BLOCKTYPE, bool> cCoordWithBlockAndBool;
+
+typedef std::vector<cCoordWithBlockAndBool> cCoordWithBlockAndBoolVector;