summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-02 14:41:42 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-02 14:41:42 +0100
commiteceead8394188af25c97af1c129bb66a3aa8c0a6 (patch)
treedfffe052679e760bfe11581c51443f21762bcdff /source/cChunk.cpp
parentMultiBlock packet is working partly.. I really don't understand what's wrong with this packet :/ (diff)
downloadcuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.tar
cuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.tar.gz
cuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.tar.bz2
cuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.tar.lz
cuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.tar.xz
cuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.tar.zst
cuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.zip
Diffstat (limited to '')
-rw-r--r--source/cChunk.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index 9a18ab0fe..0578f3d20 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -358,11 +358,9 @@ void cChunk::Tick(float a_Dt, MTRand & a_TickRandom)
unsigned int X = (index / (128*16));
#if (MINECRAFT_1_2_2 == 1)
- unsigned int Coords = Z | (X << 4) | (Y << 8);
- unsigned int Blocks = E_BLOCK_DIRT;//E_BLOCK_STONE;
- MultiBlock.m_Data[i].Data = Coords | (E_BLOCK_STONE) << 16;
-// MultiBlock.m_Data[i].Coords = E_BLOCK_STONE;//(Z&0xf) | (X&0xf)<<4 | (Y&0xff)<<8;//(Y&0xff) | (Z&0xf) << 8 | (X&0xf) << 12;
-
+ unsigned int Coords = Y | Z << 8 | X << 12;
+ unsigned int Blocks = GetLight( m_BlockMeta, index ) | (m_BlockType[index]<<4);
+ MultiBlock.m_Data[i].Data = Coords << 16 | Blocks;
#else
MultiBlock.m_BlockCoordinates[i] = (Z&0xf) | (X&0xf)<<4 | (Y&0xff)<<8;
//LOG("X: %i Y: %i Z: %i Combo: 0x%04x", X, Y, Z, MultiBlock.m_BlockCoordinates[i] );