summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-19 17:33:58 +0200
committerMattes D <github@xoft.cz>2015-04-19 17:33:58 +0200
commitfd497b8269340c8c29fa6cadc464c2dc4c645eb9 (patch)
tree9fef6e8d02ec03439287f2b1f752c2cdc9bca9b6
parentHTTP: Error message is sent as the payload as well. (diff)
downloadcuberite-fd497b8269340c8c29fa6cadc464c2dc4c645eb9.tar
cuberite-fd497b8269340c8c29fa6cadc464c2dc4c645eb9.tar.gz
cuberite-fd497b8269340c8c29fa6cadc464c2dc4c645eb9.tar.bz2
cuberite-fd497b8269340c8c29fa6cadc464c2dc4c645eb9.tar.lz
cuberite-fd497b8269340c8c29fa6cadc464c2dc4c645eb9.tar.xz
cuberite-fd497b8269340c8c29fa6cadc464c2dc4c645eb9.tar.zst
cuberite-fd497b8269340c8c29fa6cadc464c2dc4c645eb9.zip
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 29ed55bd6..60a2f8873 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1341,7 +1341,14 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e
{
AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace);
World->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player);
- World->SendBlockTo(a_BlockX, a_BlockY + 1, a_BlockZ, m_Player); // 2 block high things
+ if (a_BlockY < cChunkDef::Height - 1)
+ {
+ World->SendBlockTo(a_BlockX, a_BlockY + 1, a_BlockZ, m_Player); // 2 block high things
+ }
+ if (a_BlockY > 1)
+ {
+ World->SendBlockTo(a_BlockX, a_BlockY - 1, a_BlockZ, m_Player); // 2 block high things
+ }
m_Player->GetInventory().SendEquippedSlot();
}
}