diff options
author | madmaxoft <github@xoft.cz> | 2014-05-25 23:50:16 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-05-25 23:50:16 +0200 |
commit | 1a742a2b52d32bd22cd57b4d462bee312717e010 (patch) | |
tree | 65657eb46ac05e24b101a14f45a9d124212322cd /src/Generating/Prefab.h | |
parent | Added Japanese village prefabs. (diff) | |
download | cuberite-1a742a2b52d32bd22cd57b4d462bee312717e010.tar cuberite-1a742a2b52d32bd22cd57b4d462bee312717e010.tar.gz cuberite-1a742a2b52d32bd22cd57b4d462bee312717e010.tar.bz2 cuberite-1a742a2b52d32bd22cd57b4d462bee312717e010.tar.lz cuberite-1a742a2b52d32bd22cd57b4d462bee312717e010.tar.xz cuberite-1a742a2b52d32bd22cd57b4d462bee312717e010.tar.zst cuberite-1a742a2b52d32bd22cd57b4d462bee312717e010.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/Prefab.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Generating/Prefab.h b/src/Generating/Prefab.h index adc0e688e..8b4e4b4ef 100644 --- a/src/Generating/Prefab.h +++ b/src/Generating/Prefab.h @@ -82,6 +82,10 @@ public: Can be positive or negative. This is used e. g. to make nether bridges prefer spanning multiple segments or to penalize turrets next to each other. */ int m_AddWeightIfSame; + + /** If true, the piece will be moved Y-wise so that its first connector is sitting on the terrain. + This is used e. g. for village houses. */ + bool m_MoveToGround; }; @@ -115,6 +119,10 @@ public: /** Adds the specified connector to the list of connectors this piece supports. */ void AddConnector(int a_RelX, int a_RelY, int a_RelZ, eBlockFace a_Direction, int a_Type); + + /** Returns whether the prefab should be moved Y-wise to ground before drawing, rather than staying + at the coords governed by the connectors. */ + bool ShouldMoveToGround(void) const { return m_MoveToGround; } protected: /** Packs complete definition of a single block, for per-letter assignment. */ @@ -169,6 +177,10 @@ protected: Can be positive or negative. This is used e. g. to make nether bridges prefer spanning multiple segments or to penalize turrets next to each other. */ int m_AddWeightIfSame; + + /** If true, the piece will be moved Y-wise so that its first connector is sitting on the terrain. + This is used e. g. for village houses. */ + bool m_MoveToGround; // cPiece overrides: |