diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-20 13:40:34 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-20 13:40:34 +0200 |
commit | d006ea533763c19d0c35877e87c1384bdd65630d (patch) | |
tree | 24d45e32142ac5b9553caa47c62e4e71e45bceaf /source/Chunk.cpp | |
parent | PACKET_DESTROY_ENTITY isn't sent for self when the player is kicked (FS #254) (diff) | |
download | cuberite-d006ea533763c19d0c35877e87c1384bdd65630d.tar cuberite-d006ea533763c19d0c35877e87c1384bdd65630d.tar.gz cuberite-d006ea533763c19d0c35877e87c1384bdd65630d.tar.bz2 cuberite-d006ea533763c19d0c35877e87c1384bdd65630d.tar.lz cuberite-d006ea533763c19d0c35877e87c1384bdd65630d.tar.xz cuberite-d006ea533763c19d0c35877e87c1384bdd65630d.tar.zst cuberite-d006ea533763c19d0c35877e87c1384bdd65630d.zip |
Diffstat (limited to 'source/Chunk.cpp')
-rw-r--r-- | source/Chunk.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/Chunk.cpp b/source/Chunk.cpp index 1db7b3507..7f1c94a07 100644 --- a/source/Chunk.cpp +++ b/source/Chunk.cpp @@ -1520,6 +1520,19 @@ void cChunk::GetBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE & a_ +void cChunk::GetBlockInfo(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_Meta, NIBBLETYPE & a_SkyLight, NIBBLETYPE & a_BlockLight) +{ + int Idx = cChunkDef::MakeIndexNoCheck(a_RelX, a_RelY, a_RelZ); + a_BlockType = cChunkDef::GetBlock (m_BlockTypes, Idx); + a_Meta = cChunkDef::GetNibble(m_BlockMeta, Idx); + a_SkyLight = cChunkDef::GetNibble(m_BlockSkyLight, Idx); + a_BlockLight = cChunkDef::GetNibble(m_BlockLight, Idx); +} + + + + + void cChunk::BroadcastPlayerAnimation(const cPlayer & a_Player, char a_Animation, const cClientHandle * a_Exclude) { for (cClientHandleList::const_iterator itr = m_LoadedByClient.begin(); itr != m_LoadedByClient.end(); ++itr ) |