summaryrefslogblamecommitdiffstats
path: root/Plugins/sTick/onblockplace.lua
blob: 0216b580e6b56259362f45d4b4526fef1aba5993 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                                                                                   
function OnBlockPlace( Block, Player )

	-- dont check if the direction is in the air
	if Block.m_Direction == -1 then
		return false
	end

	if (Block.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 .. "}")

	Player:GetWorld():SetNextBlockTick(Block.m_PosX, Block.m_PosY, Block.m_PosZ);

	return true

end