summaryrefslogtreecommitdiffstats
path: root/source/PluginLua.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-11 14:57:07 +0200
committermadmaxoft <github@xoft.cz>2013-08-11 14:57:07 +0200
commitdd60f55bccd603650906d5025f689a82d00b3718 (patch)
tree773db077844972b21488c448f88572ca691baa51 /source/PluginLua.cpp
parentAdded an AllowEmptyStacks param to cItemGrid::HowManyCanFit(). (diff)
downloadcuberite-dd60f55bccd603650906d5025f689a82d00b3718.tar
cuberite-dd60f55bccd603650906d5025f689a82d00b3718.tar.gz
cuberite-dd60f55bccd603650906d5025f689a82d00b3718.tar.bz2
cuberite-dd60f55bccd603650906d5025f689a82d00b3718.tar.lz
cuberite-dd60f55bccd603650906d5025f689a82d00b3718.tar.xz
cuberite-dd60f55bccd603650906d5025f689a82d00b3718.tar.zst
cuberite-dd60f55bccd603650906d5025f689a82d00b3718.zip
Diffstat (limited to 'source/PluginLua.cpp')
-rw-r--r--source/PluginLua.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/source/PluginLua.cpp b/source/PluginLua.cpp
index 5ee4fe9f2..62911a31c 100644
--- a/source/PluginLua.cpp
+++ b/source/PluginLua.cpp
@@ -326,6 +326,30 @@ bool cPlugin_NewLua::OnHandshake(cClientHandle * a_Client, const AString & a_Use
+bool cPlugin_NewLua::OnHopperPullingItem(cWorld & a_World, cHopperEntity & a_Hopper, int a_DstSlotNum, cBlockEntityWithItems & a_SrcEntity, int a_SrcSlotNum)
+{
+ cCSLock Lock(m_CriticalSection);
+ bool res = false;
+ m_LuaState.Call(GetHookFnName(cPluginManager::HOOK_HOPPER_PULLING_ITEM), &a_World, &a_Hopper, a_DstSlotNum, &a_SrcEntity, a_SrcSlotNum, cLuaState::Return, res);
+ return res;
+}
+
+
+
+
+
+bool cPlugin_NewLua::OnHopperPushingItem(cWorld & a_World, cHopperEntity & a_Hopper, int a_SrcSlotNum, cBlockEntityWithItems & a_DstEntity, int a_DstSlotNum)
+{
+ cCSLock Lock(m_CriticalSection);
+ bool res = false;
+ m_LuaState.Call(GetHookFnName(cPluginManager::HOOK_HOPPER_PUSHING_ITEM), &a_World, &a_Hopper, a_SrcSlotNum, &a_DstEntity, a_DstSlotNum, cLuaState::Return, res);
+ return res;
+}
+
+
+
+
+
bool cPlugin_NewLua::OnKilling(cEntity & a_Victim, cEntity * a_Killer)
{
cCSLock Lock(m_CriticalSection);