summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Debuggers/Debuggers.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 6776fa480..ba410dd49 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -69,6 +69,7 @@ function OnPlayerUsingItem(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, C
local HeldItem = Player:GetEquippedItem();
+
if (HeldItem.m_ItemType == 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 .. "}")
@@ -76,6 +77,7 @@ function OnPlayerUsingItem(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, C
return true
end
+
if (HeldItem.m_ItemType == E_ITEM_BLAZE_ROD) then
-- Magic rod of query: show block types and metas for both neighbors of the pointed face
local Type = 0;
@@ -104,6 +106,7 @@ function OnPlayerUsingItem(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, C
end
end
+
-- Rclk with a diamond to read a block area, dump it, crop it, dump it again, crop it again...
if (Player:GetEquippedItem().m_ItemType == E_ITEM_DIAMOND) then
local Area = cBlockArea();
@@ -132,6 +135,20 @@ function OnPlayerUsingItem(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, C
return false;
end
+
+ -- Rclk with an eye of ender places a predefined schematic at the cursor
+ if (Player:GetEquippedItem().m_ItemType == E_ITEM_EYE_OF_ENDER) then
+ local Area = cBlockArea();
+ if not(Area:LoadFromSchematicFile("schematics/test.schematic")) then
+ LOG("Loading failed");
+ return false;
+ end
+ LOG("Schematic loaded, placing now.");
+ Area:Write(Player:GetWorld(), BlockX, BlockY, BlockZ);
+ LOG("Done.");
+ return false;
+ end
+
end