diff options
author | Lukas Pioch <lukas@zgow.de> | 2019-10-03 12:34:15 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2019-10-03 12:34:15 +0200 |
commit | 7b603f3c9553690f9d7a334b6fb3f6e47eb10ee5 (patch) | |
tree | faa4874825acb3c9ca6ea5b4f620075e668ca631 /src | |
parent | Refactored more of Entities and BlockEntities to use Vector3. (#4403) (diff) | |
download | cuberite-7b603f3c9553690f9d7a334b6fb3f6e47eb10ee5.tar cuberite-7b603f3c9553690f9d7a334b6fb3f6e47eb10ee5.tar.gz cuberite-7b603f3c9553690f9d7a334b6fb3f6e47eb10ee5.tar.bz2 cuberite-7b603f3c9553690f9d7a334b6fb3f6e47eb10ee5.tar.lz cuberite-7b603f3c9553690f9d7a334b6fb3f6e47eb10ee5.tar.xz cuberite-7b603f3c9553690f9d7a334b6fb3f6e47eb10ee5.tar.zst cuberite-7b603f3c9553690f9d7a334b6fb3f6e47eb10ee5.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/ClientHandle.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index f80b5c5af..79698ad64 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1461,6 +1461,13 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e PlgMgr->CallHookPlayerUsedBlock(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, BlockType, BlockMeta); Success = true; } + + // Check if the item is place able, for example a torch on a fence + if (!Success && Placeable) + { + // place a block + Success = ItemHandler->OnPlayerPlace(*World, *m_Player, HeldItem, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ); + } } else { |