summaryrefslogtreecommitdiffstats
path: root/src/ChunkDef.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2020-04-21 22:19:22 +0200
committerGitHub <noreply@github.com>2020-04-21 22:19:22 +0200
commit487f9a2aa9b5497495cef1ac3b9c7a603e69f862 (patch)
tree054a846942f414060e29c72f4a717c8a89e70893 /src/ChunkDef.h
parentDelet SpawnObject params (diff)
downloadcuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.tar
cuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.tar.gz
cuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.tar.bz2
cuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.tar.lz
cuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.tar.xz
cuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.tar.zst
cuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.zip
Diffstat (limited to 'src/ChunkDef.h')
-rw-r--r--src/ChunkDef.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ChunkDef.h b/src/ChunkDef.h
index f93fed249..8f46c5f8f 100644
--- a/src/ChunkDef.h
+++ b/src/ChunkDef.h
@@ -555,8 +555,17 @@ struct sSetBlock
/** Returns the absolute Z coord of the stored block. */
int GetZ(void) const { return m_RelZ + cChunkDef::Width * m_ChunkZ; }
- /** Returns the absolute position of the stored block. */
- Vector3i GetPos(void) const { return Vector3i(GetX(), GetY(), GetZ()); }
+ /** Returns the absolute coords of the stored block. */
+ Vector3i GetAbsolutePos() const
+ {
+ return Vector3i(GetX(), GetY(), GetZ());
+ }
+
+ /** Returns the relative position of the stored block within its chunk. */
+ Vector3i GetRelativePos() const
+ {
+ return Vector3i(m_RelX, m_RelY, m_RelZ);
+ }
};
typedef std::list<sSetBlock> sSetBlockList;