summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-07 13:57:51 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-07 13:57:51 +0200
commitc0a73ef89d13841fa98b8541ea801cfaa817eb35 (patch)
treecfa795d9082cae65d8a03758e753cea8c1ad41fc /source/cClientHandle.cpp
parentGrass grows under vines (diff)
downloadcuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.tar
cuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.tar.gz
cuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.tar.bz2
cuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.tar.lz
cuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.tar.xz
cuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.tar.zst
cuberite-c0a73ef89d13841fa98b8541ea801cfaa817eb35.zip
Diffstat (limited to '')
-rw-r--r--source/cClientHandle.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp
index 966270321..96ee3fcbd 100644
--- a/source/cClientHandle.cpp
+++ b/source/cClientHandle.cpp
@@ -939,14 +939,19 @@ void cClientHandle::HandleBlockPlace(cPacket_BlockPlace * a_Packet)
if (a_Packet->m_Direction >= 0)
{
- ENUM_BLOCK_ID BlockID = (ENUM_BLOCK_ID)m_Player->GetWorld()->GetBlock(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ);
- switch (BlockID)
+ cWorld * World = m_Player->GetWorld();
+ BLOCKTYPE BlockType = 0;
+ NIBBLETYPE BlockMeta;
+ World->GetBlockTypeMeta(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ, BlockType, BlockMeta);
+ switch (BlockType)
{
case E_BLOCK_REDSTONE_REPEATER_ON:
case E_BLOCK_REDSTONE_REPEATER_OFF:
{
// no need to update redstone current with a repeater
- // TODO: Find meta value of repeater and change it to one step more.
+ // Find meta value of repeater and change it to one step more:
+ World->FastSetBlock(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ, BlockType, ((BlockMeta + 0x04) & 0x0f));
+ bPlaceBlock = false;
break;
}