summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHandler.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2022-01-02 13:19:13 +0100
committerGitHub <noreply@github.com>2022-01-02 13:19:13 +0100
commit178d1d2bda75e26a9964d2afa2d7fa1210e7f2ea (patch)
treea3c5a1accd053b5191250b71aa9188f3e34b88f1 /src/Items/ItemHandler.h
parentHandlers: update item and block handlers (#5371) (diff)
downloadcuberite-178d1d2bda75e26a9964d2afa2d7fa1210e7f2ea.tar
cuberite-178d1d2bda75e26a9964d2afa2d7fa1210e7f2ea.tar.gz
cuberite-178d1d2bda75e26a9964d2afa2d7fa1210e7f2ea.tar.bz2
cuberite-178d1d2bda75e26a9964d2afa2d7fa1210e7f2ea.tar.lz
cuberite-178d1d2bda75e26a9964d2afa2d7fa1210e7f2ea.tar.xz
cuberite-178d1d2bda75e26a9964d2afa2d7fa1210e7f2ea.tar.zst
cuberite-178d1d2bda75e26a9964d2afa2d7fa1210e7f2ea.zip
Diffstat (limited to 'src/Items/ItemHandler.h')
-rw-r--r--src/Items/ItemHandler.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Items/ItemHandler.h b/src/Items/ItemHandler.h
index da573df9a..8b8c8d2d3 100644
--- a/src/Items/ItemHandler.h
+++ b/src/Items/ItemHandler.h
@@ -40,13 +40,11 @@ public:
/** Called when the player tries to place the item (right mouse button, IsPlaceable() == true).
- a_ClickedBlockPos is the (neighbor) block that has been clicked to place this item.
- a_ClickedBlockFace is the face of the neighbor that has been clicked to place this item.
- a_CursorPos is the position of the player's cursor within a_ClickedBlockFace.
- The default handler uses GetBlocksToPlace() and places the returned blocks.
- Override if the item needs advanced processing, such as spawning a mob based on the blocks being placed.
+ a_ClickedPosition is the block that has been clicked to place this item.
+ a_ClickedBlockFace is the face has been clicked to place this item.
+ a_CursorPosition is the position of the player's cursor within a_ClickedBlockFace.
If the block placement is refused inside this call, it will automatically revert the client-side changes. */
- void OnPlayerPlace(cPlayer & a_Player, const cItem & a_HeldItem, Vector3i a_ClickedBlockPosition, eBlockFace a_ClickedBlockFace, Vector3i a_CursorPosition) const;
+ void OnPlayerPlace(cPlayer & a_Player, const cItem & a_HeldItem, Vector3i a_ClickedPosition, BLOCKTYPE a_ClickedBlockType, NIBBLETYPE a_ClickedBlockMeta, eBlockFace a_ClickedBlockFace, Vector3i a_CursorPosition) const;
/** Called when the player tries to use the item (right mouse button).
Descendants can return false to abort the usage (default behavior). */