1
0

More Vector3 in cBlockHandler (#4644)

* cBlockHandler.OnUpdate uses Vector3 params.

Also slightly changed how block ticking works.
This commit is contained in:
Mattes D
2020-04-17 11:36:37 +02:00
committed by GitHub
parent 96bd4637d7
commit 26ac146f41
27 changed files with 406 additions and 253 deletions

View File

@@ -580,7 +580,7 @@ function OnPlayerUsingItem(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, C
if (HeldItemType == E_ITEM_STICK) then
-- Magic sTick of ticking: set the pointed block for ticking at the next tick
Player:SendMessage(cChatColor.LightGray .. "Setting next block tick to {" .. BlockX .. ", " .. BlockY .. ", " .. BlockZ .. "}")
Player:GetWorld():SetNextBlockTick(BlockX, BlockY, BlockZ);
Player:GetWorld():SetNextBlockToTick(Vector3i(BlockX, BlockY, BlockZ));
return true
elseif (HeldItemType == E_ITEM_BLAZE_ROD) then
return OnUsingBlazeRod(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, CursorY, CursorZ);