summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/sTick/onblockplace.lua
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-03 09:24:25 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-03 09:24:25 +0200
commit9fa165488b2c5085c7f74e3ec8942c5bb152b1d3 (patch)
tree3ede567830e85912942f9eec7667c42b6292928b /MCServer/Plugins/sTick/onblockplace.lua
parentAdded BLOCK_FACE_NONE into the plugin API (diff)
downloadcuberite-9fa165488b2c5085c7f74e3ec8942c5bb152b1d3.tar
cuberite-9fa165488b2c5085c7f74e3ec8942c5bb152b1d3.tar.gz
cuberite-9fa165488b2c5085c7f74e3ec8942c5bb152b1d3.tar.bz2
cuberite-9fa165488b2c5085c7f74e3ec8942c5bb152b1d3.tar.lz
cuberite-9fa165488b2c5085c7f74e3ec8942c5bb152b1d3.tar.xz
cuberite-9fa165488b2c5085c7f74e3ec8942c5bb152b1d3.tar.zst
cuberite-9fa165488b2c5085c7f74e3ec8942c5bb152b1d3.zip
Diffstat (limited to 'MCServer/Plugins/sTick/onblockplace.lua')
-rw-r--r--MCServer/Plugins/sTick/onblockplace.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/MCServer/Plugins/sTick/onblockplace.lua b/MCServer/Plugins/sTick/onblockplace.lua
index 0216b580e..6bc2ce46a 100644
--- a/MCServer/Plugins/sTick/onblockplace.lua
+++ b/MCServer/Plugins/sTick/onblockplace.lua
@@ -1,17 +1,18 @@
-function OnBlockPlace( Block, Player )
+function OnBlockPlace(Player, BlockX, BlockY, BlockZ, BlockFace, HeldItem)
-- dont check if the direction is in the air
- if Block.m_Direction == -1 then
+ if BlockFace == BLOCK_FACE_NONE then
return false
end
- if (Block.m_ItemType ~= 280) then -- not a Stick of Ticking
+ if (HeldItem.m_ItemType ~= 280) then
+ -- not a Stick of Ticking
return false
end
- LOG("Setting next block tick to {" .. Block.m_PosX .. ", " .. Block.m_PosY .. ", " .. Block.m_PosZ .. "}")
+ LOG("Setting next block tick to {" .. BlockX .. ", " .. BlockY .. ", " .. BlockZ .. "}")
- Player:GetWorld():SetNextBlockTick(Block.m_PosX, Block.m_PosY, Block.m_PosZ);
+ Player:GetWorld():SetNextBlockTick(BlockX, BlockY, BlockZ);
return true