summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-06 23:29:29 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-06 23:29:29 +0100
commitafdbb1d71bb69cf20cd7458e192be0c9308515ba (patch)
tree47ca77980e18d96bb3da82f7fc60448fbe92d12d /MCServer/Plugins
parentAdded a new API call to cBlockArea: Crop(). (diff)
downloadcuberite-afdbb1d71bb69cf20cd7458e192be0c9308515ba.tar
cuberite-afdbb1d71bb69cf20cd7458e192be0c9308515ba.tar.gz
cuberite-afdbb1d71bb69cf20cd7458e192be0c9308515ba.tar.bz2
cuberite-afdbb1d71bb69cf20cd7458e192be0c9308515ba.tar.lz
cuberite-afdbb1d71bb69cf20cd7458e192be0c9308515ba.tar.xz
cuberite-afdbb1d71bb69cf20cd7458e192be0c9308515ba.tar.zst
cuberite-afdbb1d71bb69cf20cd7458e192be0c9308515ba.zip
Diffstat (limited to 'MCServer/Plugins')
-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