diff options
author | Mattes D <github@xoft.cz> | 2014-09-06 19:01:30 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-09-06 19:01:30 +0200 |
commit | e1a9a6291b98126dad993009bb184c963bd9765b (patch) | |
tree | 5f10be544536464a67ce6bb05fbabadaea3de93a /src | |
parent | Added Y-wise asserts to signs. (diff) | |
download | cuberite-e1a9a6291b98126dad993009bb184c963bd9765b.tar cuberite-e1a9a6291b98126dad993009bb184c963bd9765b.tar.gz cuberite-e1a9a6291b98126dad993009bb184c963bd9765b.tar.bz2 cuberite-e1a9a6291b98126dad993009bb184c963bd9765b.tar.lz cuberite-e1a9a6291b98126dad993009bb184c963bd9765b.tar.xz cuberite-e1a9a6291b98126dad993009bb184c963bd9765b.tar.zst cuberite-e1a9a6291b98126dad993009bb184c963bd9765b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Chunk.cpp | 6 | ||||
-rw-r--r-- | src/Chunk.h | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp index caace5024..99e48df95 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -1345,11 +1345,11 @@ void cChunk::CreateBlockEntities(void) case E_BLOCK_JUKEBOX: case E_BLOCK_FLOWER_POT: { - if (!HasBlockEntityAt(x + m_PosX * Width, y + m_PosY * Height, z + m_PosZ * Width)) + if (!HasBlockEntityAt(x + m_PosX * Width, y, z + m_PosZ * Width)) { m_BlockEntities.push_back(cBlockEntity::CreateByBlockType( BlockType, GetMeta(x, y, z), - x + m_PosX * Width, y + m_PosY * Height, z + m_PosZ * Width, m_World + x + m_PosX * Width, y, z + m_PosZ * Width, m_World )); } break; @@ -3178,7 +3178,7 @@ void cChunk::PositionToWorldPosition(int a_RelX, int a_RelY, int a_RelZ, int & a Vector3i cChunk::PositionToWorldPosition(int a_RelX, int a_RelY, int a_RelZ) { - return Vector3i(m_PosX * Width + a_RelX, m_PosY * Height + a_RelY, m_PosZ * Width + a_RelZ); + return Vector3i(m_PosX * Width + a_RelX, a_RelY, m_PosZ * Width + a_RelZ); } diff --git a/src/Chunk.h b/src/Chunk.h index 81862f2e7..f282694c2 100644 --- a/src/Chunk.h +++ b/src/Chunk.h @@ -160,7 +160,6 @@ public: void TickBlock(int a_RelX, int a_RelY, int a_RelZ); int GetPosX(void) const { return m_PosX; } - int GetPosY(void) const { return m_PosY; } int GetPosZ(void) const { return m_PosZ; } cWorld * GetWorld(void) const { return m_World; } @@ -483,7 +482,7 @@ private: /** Number of times the chunk has been requested to stay (by various cChunkStay objects); if zero, the chunk can be unloaded */ int m_StayCount; - int m_PosX, m_PosY, m_PosZ; + int m_PosX, m_PosZ; cWorld * m_World; cChunkMap * m_ChunkMap; |