summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginLua.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-10-16 10:06:34 +0200
committerGitHub <noreply@github.com>2019-10-16 10:06:34 +0200
commit221cc4ec5cb6301743e947eaabed3fecedba796f (patch)
tree4e44c8bb7523e5d1d04468fc906ae24674c10abc /src/Bindings/PluginLua.cpp
parentFixed crash in hopper while pulling items from blockentity above itself (#4412) (diff)
downloadcuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.gz
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.bz2
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.lz
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.xz
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.zst
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.zip
Diffstat (limited to 'src/Bindings/PluginLua.cpp')
-rw-r--r--src/Bindings/PluginLua.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp
index ba09b9752..e2062117a 100644
--- a/src/Bindings/PluginLua.cpp
+++ b/src/Bindings/PluginLua.cpp
@@ -227,9 +227,24 @@ bool cPluginLua::OnBlockSpread(cWorld & a_World, int a_BlockX, int a_BlockY, int
-bool cPluginLua::OnBlockToPickups(cWorld & a_World, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, cItems & a_Pickups)
+bool cPluginLua::OnBlockToPickups(
+ cWorld & a_World,
+ Vector3i a_BlockPos,
+ BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta,
+ const cBlockEntity * a_BlockEntity,
+ const cEntity * a_Digger,
+ const cItem * a_Tool,
+ cItems & a_Pickups
+)
{
- return CallSimpleHooks(cPluginManager::HOOK_BLOCK_TO_PICKUPS, &a_World, a_Digger, a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta, &a_Pickups);
+ // TODO: Change the hook signature to reflect the real parameters to this function, once we are allowed to make breaking API changes
+ return CallSimpleHooks(
+ cPluginManager::HOOK_BLOCK_TO_PICKUPS,
+ &a_World,
+ a_Digger,
+ a_BlockPos.x, a_BlockPos.y, a_BlockPos.z,
+ a_BlockType, a_BlockMeta, &a_Pickups
+ );
}