summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-06 19:22:30 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-06 19:22:30 +0100
commita0914131253ed9ecb39e3e7eb10fa25d6ee27512 (patch)
tree5c4a64fdf67342f56eb929f044820f40e1a74ada /MCServer
parentAdded new hooks: OnChunkAvailable(), OnChunkUnloaded() and OnChunkUnloading(). Modified OnChunkGenerated() signature. (diff)
downloadcuberite-a0914131253ed9ecb39e3e7eb10fa25d6ee27512.tar
cuberite-a0914131253ed9ecb39e3e7eb10fa25d6ee27512.tar.gz
cuberite-a0914131253ed9ecb39e3e7eb10fa25d6ee27512.tar.bz2
cuberite-a0914131253ed9ecb39e3e7eb10fa25d6ee27512.tar.lz
cuberite-a0914131253ed9ecb39e3e7eb10fa25d6ee27512.tar.xz
cuberite-a0914131253ed9ecb39e3e7eb10fa25d6ee27512.tar.zst
cuberite-a0914131253ed9ecb39e3e7eb10fa25d6ee27512.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua31
1 files changed, 30 insertions, 1 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 3e1a1ba5d..6776fa480 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -1,7 +1,7 @@
-- Global variables
PLUGIN = {}; -- Reference to own plugin object
-ShouldDumpFunctions = true; -- If set to true, all available functions are logged upon plugin initialization
+ShouldDumpFunctions = false; -- If set to true, all available functions are logged upon plugin initialization
@@ -103,6 +103,35 @@ function OnPlayerUsingItem(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, C
return true;
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();
+ Area:Read(Player:GetWorld(),
+ BlockX - 9, BlockX + 9,
+ BlockY - 7, BlockY + 7,
+ BlockZ - 9, BlockZ + 9
+ );
+
+ LOG("Size before cropping: " .. Area:GetSizeX() .. " x " .. Area:GetSizeY() .. " x " .. Area:GetSizeZ());
+ Area:DumpToRawFile("crop0.dat");
+ Area:Crop(2, 3, 0, 0, 0, 0);
+ LOG("Size after cropping 1: " .. Area:GetSizeX() .. " x " .. Area:GetSizeY() .. " x " .. Area:GetSizeZ());
+ Area:DumpToRawFile("crop1.dat");
+ Area:Crop(2, 3, 0, 0, 0, 0);
+ LOG("Size after cropping 2: " .. Area:GetSizeX() .. " x " .. Area:GetSizeY() .. " x " .. Area:GetSizeZ());
+ Area:DumpToRawFile("crop2.dat");
+ Area:Crop(0, 0, 0, 0, 3, 2);
+ LOG("Size after cropping 3: " .. Area:GetSizeX() .. " x " .. Area:GetSizeY() .. " x " .. Area:GetSizeZ());
+ Area:DumpToRawFile("crop3.dat");
+ Area:Crop(0, 0, 3, 2, 0, 0);
+ LOG("Size after cropping 4: " .. Area:GetSizeX() .. " x " .. Area:GetSizeY() .. " x " .. Area:GetSizeZ());
+ Area:DumpToRawFile("crop4.dat");
+
+ LOG("Crop test done");
+ return false;
+ end
+
end