summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-12-02 20:38:22 +0100
committerMattes D <github@xoft.cz>2013-12-02 20:38:22 +0100
commit1c384ec1d748b19a00f8d26985bd209a8a45a131 (patch)
tree6edc2dd2770d64a0df0bb72f975ae62b6a72c5f3 /src
parentFixed compiler warnings in LightingThread.cpp. (diff)
parentRemoved stray printf, again. (diff)
downloadcuberite-1c384ec1d748b19a00f8d26985bd209a8a45a131.tar
cuberite-1c384ec1d748b19a00f8d26985bd209a8a45a131.tar.gz
cuberite-1c384ec1d748b19a00f8d26985bd209a8a45a131.tar.bz2
cuberite-1c384ec1d748b19a00f8d26985bd209a8a45a131.tar.lz
cuberite-1c384ec1d748b19a00f8d26985bd209a8a45a131.tar.xz
cuberite-1c384ec1d748b19a00f8d26985bd209a8a45a131.tar.zst
cuberite-1c384ec1d748b19a00f8d26985bd209a8a45a131.zip
Diffstat (limited to 'src')
-rw-r--r--src/ClientHandle.cpp9
-rw-r--r--src/Protocol/Protocol17x.cpp3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index f9a48003e..95d8f23e5 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -887,6 +887,15 @@ void cClientHandle::HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, c
)
{
// Coordinates at CLICKED block, don't move them anywhere
+ if((ClickedBlockMeta & 0x08) && (a_BlockFace == BLOCK_FACE_TOP))
+ {
+ ++a_BlockY;
+ }
+ else if (!(ClickedBlockMeta & 0x08) && (a_BlockFace == BLOCK_FACE_BOTTOM))
+ {
+ --a_BlockY;
+ }
+ World->GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, ClickedBlock, ClickedBlockMeta);
}
else
{
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 746e1c127..5f5864f2a 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -1152,6 +1152,9 @@ void cProtocol172::HandlePacketBlockPlace(UInt32 a_RemainingBytes)
HANDLE_READ(ReadByte, Byte, BlockY);
HANDLE_READ(ReadBEInt, int, BlockZ);
HANDLE_READ(ReadByte, Byte, Face);
+ cItem Item;
+ ReadItem(Item);
+
HANDLE_READ(ReadByte, Byte, CursorX);
HANDLE_READ(ReadByte, Byte, CursorY);
HANDLE_READ(ReadByte, Byte, CursorZ);